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

Disabling CreateKey for KMSs #1914

Open
ramonpetgrave64 opened this issue Dec 19, 2024 · 3 comments
Open

Disabling CreateKey for KMSs #1914

ramonpetgrave64 opened this issue Dec 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ramonpetgrave64
Copy link

Description

re: #1901 (review)

We should consider disabling the SignerVerifier.CreateKey() method for KMSs, since there may be no extra security benefit for the user.

@ramonpetgrave64 ramonpetgrave64 added the enhancement New feature or request label Dec 19, 2024
@ramonpetgrave64
Copy link
Author

ramonpetgrave64 commented Dec 19, 2024

One reason to keep it: Cosign, by default would create an ephemeral key for signing, if the user does not specify a KMS (with an existing stored key) to use. Although it may not be popular to have ephemeral keys with a KMS, I don't think it's invalid.

@haydentherapper
Copy link
Contributor

One detail, Cosign does not create ephemeral keys backed by KMS. Cosign either generates an ephemeral, in-memory key, or uses a provided key either in KMS, an HSM or on-disk.

The only place Cosign uses CreateKey is with cosign generate-key-pair, if a KMS resource is provided. Since it's a limited use case, removing CreateKey would likely have no impact. I might also argue that Cosign shouldn't support generating a key pair at all - either Cosign uses an ephemeral key, or you provide your own key.

@ramonpetgrave64
Copy link
Author

@haydentherapper yes, I edited my comment to clarify: " if the user does not specify a KMS (with an existing stored key)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants