[Bug]: can't remove or replace invalid x509 template
Maintainers usually reply within 1 day
@hslatman is already working on this.
Since Nov 11, 2025.
Assessment
This issue has not been assessed yet.
Description
Steps to Reproduce
- Import this template with
step ca provisioner update SSO --x509-template template.tpl
{
"subject": {{ toJson .Subject }},
"sans": {{ toJson .SANs }}
{{- if .Token.groups }}
{{- range .Token.groups }}
, {{ "urn:group:{{ . }}" | toJson }}
{{- end }}
{{- end }},
{{- if typeIs "*rsa.PublicKey" .Insecure.CR.PublicKey }}
"keyUsage": ["keyEncipherment", "digitalSignature"],
{{- else }}
"keyUsage": ["digitalSignature"],
{{- end }}
"extKeyUsage": ["serverAuth", "clientAuth"]
}
- try to get a new certificate with
step ca certificate "[email protected]" cert.pem key.pem --san "[email protected]" - error:
✔ Provisioner: SSO (OIDC) [client: ***********]
Your default web browser has been opened to visit:
https://login.microsoftonline.com/******
✔ CA: https://ca.example.org
error applying certificate template
- try to remove it with
step ca provisioner update SSO --x509-template "", error:
❯ step ca provisioner update SSO --x509-template ""
No admin credentials found. You must login to execute admin commands.
✔ Provisioner: SSO (OIDC) [client: ******]
Your default web browser has been opened to visit:
https://login.microsoftonline.com/*******
error applying certificate template
Your Environment
- OS - Docker
step-caVersion -
Smallstep CA/0.28.3 (linux/arm64)
Release Date: 2025-03-18 15:56 UTC
Expected Behavior
- server complains about wrong template before saving it
- server allows to remove invalid template
Actual Behavior
See errors above
Additional Context
in server's logs I see
time="2025-10-28T17:09:13Z" level=error duration=5.391514ms duration-ns=5391514 error="error applying certificate template: invalid character ',' after object key at offset 319" fields.time="2025-10-28T17:09:13Z" method=POST name=ca ott=*******
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 599
- Avg merge
- 21h 20m
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from smallstep/certificates
-
bug needs triage
Difficulty 1/5 Under an hour Newbie friendliness 84/100
smallstep/certificates#2863 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
smallstep/certificates#2788 ·
Maintainers usually reply within 1 day
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
smallstep/certificates#2730 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
smallstep/certificates#2860 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Tokens fail validation after the identity provider rotates its signing key until the JWKS cache expiresPossibly taken @APWHY claimed this 100 days ago. Openbug needs triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
smallstep/certificates#2831 · 3 comments ·
Maintainers usually reply within 1 day
All issues in smallstep/certificates
Similar issues
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
go good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Azure/prometheus-collector#1828 · 1 comment ·
Maintainers usually reply within 2 days