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

should support KMS key generation/import #446

Closed
jku opened this issue Oct 26, 2022 · 3 comments
Closed

should support KMS key generation/import #446

jku opened this issue Oct 26, 2022 · 3 comments

Comments

@jku
Copy link
Collaborator

jku commented Oct 26, 2022

This depends on #445.

If we have KMS signing, we should consider key generation using the KMS: currently the process of rotating KMS keys would be very manual.

Key update process for a TUF key looks like this in general:

  1. create key (locally, KMS, HW key)
    • if KMS: export the public key
    • elif HW key: export public key
    • else: upload the private key to signing key storage
  2. convert public key to TUF format
  3. add the key to delegating metadata
  4. get metadata signed by delegating keys

I think securesystemslib should aim to provide steps 1-3 (or at least 2-3) for all key types with easy method calls.

  • This is already somewhat true for normal file based keys (just call keys.generate_*() and you're done)
  • I am not sure if you can create a GPG key with securesystemslib but gpg.export_pubkeys() handles numbers 2 & 3

For KMS (this is based on GCP experience, should roughly apply to others):

  1. key generation is a KMS method and requires some specific permission. Takes some service specific algorithm parameters and returns a KMS key identifier -- this step could still stay manual (but note that the algorithm parameters are needed in step 3)
  2. public key export is a KMS method and requires another permission. Takes key identifier as input and returns public key content
  3. TUF public key can be created using the algorithm parameters and the public key content
@jku
Copy link
Collaborator Author

jku commented Oct 26, 2022

cc @kairoaraujo based on earlier discussion

@jku jku changed the title should support KMS key generation should support KMS key generation/import Dec 29, 2022
@jku
Copy link
Collaborator Author

jku commented Dec 29, 2022

Current thinking: I believe most users would not want code that creates new keys. At least I don't want to give that permission on my projects... So key generation is not a super interesting feature.

Key import however is something useful: this is implemented in #480

@jku
Copy link
Collaborator Author

jku commented Mar 20, 2023

Closing this: key import is supported (requires cloudkms.publicKeyViewer permission on google cloud), new key generation is not supported

@jku jku closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant