-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The keyspec
provided as input to the hsm generate
command includes an id
value that uniquely identifies the key in the HSM. If the id
value from the keyspec
is already in use by the HSM then the command will fail / refuse to create the key. We currently manage this by carefully selecting id
values but it's still a bit of a pitfall. The HSM can / will dynamically assign id
s for us though https://docs.yubico.com/hardware/yubihsm-2/hsm-2-user-guide/hsm2-cmd-reference.html#id178 and we should use this feature to generate key ids for us.
This seems pretty straight forward at first glance will require that we:
- make the
KeySpec.id
field anOption<Id>
- when we
hsm generate
a key we must catch theId
produced by the HSM and set it in theKeySpec
before persisting it in theca-state
- ensure that this field is
Some
when other commands use aKeySpec
that should / must have anId
Metadata
Metadata
Assignees
Labels
No labels