Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow x5c to take certificate without KeyUsageCertSign #1329

Open
rmb938 opened this issue Dec 15, 2024 · 0 comments
Open

Allow x5c to take certificate without KeyUsageCertSign #1329

rmb938 opened this issue Dec 15, 2024 · 0 comments
Assignees
Labels
enhancement needs triage Waiting for discussion / prioritization by team

Comments

@rmb938
Copy link

rmb938 commented Dec 15, 2024

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently the CLI checks for KeyUsageCertSign when trying to create a x5c provisioner

if r.KeyUsage&x509.KeyUsageCertSign == 0 {

However the API does not require this enforcement. The only requirement is for the client certificate to have Digital Signature in it's Key Usage so it can sign the tokens.

Why is this needed?

The step API allows creating a x5c provisioner with certificates without KeyUsageCertSign. This is very useful if I want to create a X5C provisioner that is valid for only a single certificate and not every certificate signed by a CA.

This currently works as expected when creating a X5C provisioner via the API. i.e I can create a self-signed certificate and create a X5C provisioner via the API with it's public key. Then use the certificate in step ca certificate flags --x5c-cert and --x5c-key and it authenticates correctly while denying all other certificates.

I can make a PR to change this section of code to not require KeyUsageCertSign if folks think this is acceptable.

@rmb938 rmb938 added enhancement needs triage Waiting for discussion / prioritization by team labels Dec 15, 2024
@hslatman hslatman self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

No branches or pull requests

2 participants