[Bug]: step-ca https certificate does not respect issuing CA's EKU

Open
#2,536 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@hslatman is already working on this.

Since Mar 17, 2026.

Assessment

This issue has not been assessed yet.

Description

bug needs triage
Steps to Reproduce
  • Create issuing certificate with extKeyUsage = 'serverCert'.
  • Run step-ca with this issuing certificate configured.
Your Environment
  • OS - docker image smallstep/step-ca:0.29.0
  • step-ca Version - 0.29.0
Expected Behavior

When step-ca issues certificate for it's own HTTPS:

  • step-ca should validate if issuing CA certificate has extKeyUsage
    • If no extKeyUsage extension exists, step-ca should issue HTTPS certificate with extKeyUsage = serverCert, clientCert
    • If extKeyUsage extension exists and it has anyExtendedKeyUsage, step-ca should issue HTTPS certificate with extKeyUsage = serverCert, clientCert
    • If extKeyUsage extension exists and it does not have serverCert usage, step-ca should fail
    • step-ca should take into account if issuing CA certificate has clientCert in extKeyUsage and issue it's HTTPS certificate with or without clientCert EKU. Also warning should be printed. Also DisableTLSClientAuth should be enforced for WebHooks.
Actual Behavior

step-ca ignores if issuing CA has EKU constraints and issues it's own HTTPS certificate with clientAuth and serverAuth EKUs.

Issuing CA certificates MUST contain extKeyUsage extension, and MAY/MAY NOT contain clientAuth EKU

This means, HTTPS certificate issued with clientAuth by CA with serverAuth-only EKU, violates restrictions.

Additional Context

No response

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from smallstep/certificates

All issues in smallstep/certificates

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.