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

[Bug]: Unable to use yubikey with step certificate create #1282

Closed
udf2457 opened this issue Sep 18, 2024 · 3 comments
Closed

[Bug]: Unable to use yubikey with step certificate create #1282

udf2457 opened this issue Sep 18, 2024 · 3 comments
Assignees
Labels
bug needs triage Waiting for discussion / prioritization by team

Comments

@udf2457
Copy link

udf2457 commented Sep 18, 2024

Steps to Reproduce

According to the docs, this:

step certificate create --profile root-ca "FOO" --ca-kms yubikey:pin-value=1234567 --ca-key yubikey:slot-id=82

Should work because ca-kms and ca-key are valid options flags ?

The same thing happens if you use --kms and --key.

But step insists on pushing keys to disk ?

not enough positional arguments were provided in 'step certificate create '

Your Environment

Smallstep CLI/0.27.4 (darwin/arm64)

Expected Behavior

Generate cert using yubikey

Actual Behavior

Errors out with:

not enough positional arguments were provided in 'step certificate create '

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).

@udf2457 udf2457 added bug needs triage Waiting for discussion / prioritization by team labels Sep 18, 2024
@hslatman
Copy link
Member

hslatman commented Sep 24, 2024

Hey @udf2457,

What happens if you try this:

step certificate create --profile root-ca --kms 'yubikey:pin-value=1234567' --key 'yubikey:slot-id=82' 'FOO' root_ca.crt

It's possible you got the error because of the order of arguments provided and how they're evaluated. In this case FOO is placed at the end, and the certificate will be written to root_ca.crt.

In this case you'll need --kms and --key, as you're using the root-ca profile. For the intermediate you would need to specify the --ca-kms and --ca-key, and point those to the values you used for the root.

@udf2457
Copy link
Author

udf2457 commented Sep 24, 2024

@hslatman Yeah, reworking in that order fixed it. Thanks.

@hslatman hslatman self-assigned this Sep 24, 2024
@hslatman
Copy link
Member

Great to hear 🙂

Unfortunately, I don't think we can handle this in a better way at the moment due to the packages we use for handling the command line flags, so I'll close the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

No branches or pull requests

2 participants