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

Support Adding External Keys #528

Closed
ChevronTango opened this issue Jul 28, 2023 · 1 comment · Fixed by #535
Closed

Support Adding External Keys #528

ChevronTango opened this issue Jul 28, 2023 · 1 comment · Fixed by #535

Comments

@ChevronTango
Copy link
Contributor

The CLI currently has a gen-key method and a revoke-key method, but not an add-key method. This makes it hard for users with external keys, for example KMS or otherwised managed key services, to add their keys to the root.json. Whilst it can be done with json manipulation, it would be much nicer if the tuf cli supported it natively to avoid mistakes or misconfiguration.

I propose the following

tuff add-key <role>
--keytype # eg. "rsa"
--public-value # The value of the public key
--scheme #eg "rsassa-pss-sha256"

# Returns the key-id

This will then add the key to the root,json in both the keys, and the roles fields with the correct hashed key id, and will return a key id which can then be used in subsequent signing requests.

@ChevronTango
Copy link
Contributor Author

This was partly in response to #525 (comment) where adding a KMS key required the use of tuftool rather than being able to be done entirely with go-tuf

ChevronTango added a commit to ChevronTango/go-tuf that referenced this issue Jul 31, 2023
Signed-off-by: Edward Brough <edward.brough@gmail.com>
rdimitrov pushed a commit that referenced this issue Sep 16, 2023
* 528 Add-Key to a role

Introduces the add-key command

Signed-off-by: Edward Brough <edward.brough@gmail.com>

* Make sure error message ends with a newline

Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>

---------

Signed-off-by: Edward Brough <edward.brough@gmail.com>
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
Co-authored-by: Fredrik Skogman <kommendorkapten@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants