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]: Broadcom Corp 58200 picked up by go-piv as "yubikey" KMS #649

Closed
tashian opened this issue Dec 10, 2024 · 1 comment
Closed

[Bug]: Broadcom Corp 58200 picked up by go-piv as "yubikey" KMS #649

tashian opened this issue Dec 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working needs triage

Comments

@tashian
Copy link

tashian commented Dec 10, 2024

Steps to Reproduce

Your Environment

  • OS - Ubuntu 20.04
  • step-ca Version - 0.28.1 HSM

In ca.json:

        "key": "yubikey:slot-id=9c",
        "kms": {
            "type": "yubikey",
            "pin": "123456"
        },

Expected Behavior

The server should start up.

Actual Behavior

$ sudo -u step step-ca /etc/step-ca/config/ca.json
badger 2024/12/09 22:34:45 INFO: All 1 tables opened in 0s 
badger 2024/12/09 22:34:45 INFO: Replaying file id: 0 at offset: 2974 
badger 2024/12/09 22:34:45 INFO: Replay took: 256.085µs 
error opening yubikey: connecting to smart card: the operation requires a Smart Card, but no Smart Card is currently in the device

Additional Context

step-ca attempts to use the Broadcom device because it is the first Smart Card and it presumably has PIV support.

A workaround is to provide the YubiKey's serial number in the URI:

        "kms": {
            "type": "yubikey",
            "pin": "123456",
            "uri": "yubikey:serial=XXXXXXXXX"
        },

The error comes from here:
https://github.com/smallstep/crypto/blob/master/kms/yubikey/yubikey.go#L160

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

@tashian tashian added bug Something isn't working needs triage labels Dec 10, 2024
@tashian tashian transferred this issue from smallstep/certificates Dec 10, 2024
@hslatman hslatman assigned tashian and unassigned maraino Dec 17, 2024
@tashian
Copy link
Author

tashian commented Dec 18, 2024

Added docs in smallstep/docs#365

@tashian tashian closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants