-
Notifications
You must be signed in to change notification settings - Fork 621
Add --signing-algorithm flag #3497
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
base: main
Are you sure you want to change the base?
Conversation
Shall we add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a client algorithm registry for the sign path? There are roughly three places the client interacts with a key: Generation, signing, and verification.
For generation, it makes sense that the client specify which algorithms are supported for the generated key. This can be for both ephemeral and long-lived key generation.
For the verification path, supported algorithms could be a part of the verification policy, so that makes sense to allow a user to specify a set of trusted algorithms.
For signing, I'm not sure it's needed. When a key is provided, the user is specifying that's the key they want to use (whether it was generated ephemerally or self-managed). The backend (fulcio or rekor) could choose to reject it, which will be surfaced as a response error.
c8076cb
to
2990915
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, I'll need to do a deep dive once this is out of draft but overall this seems solid. Can we add e2e tests that exercise generation, signing and verification?
2990915
to
ca53935
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3497 +/- ##
==========================================
- Coverage 40.10% 34.61% -5.49%
==========================================
Files 155 216 +61
Lines 10044 15256 +5212
==========================================
+ Hits 4028 5281 +1253
- Misses 5530 9288 +3758
- Partials 486 687 +201 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Would we want to have this only under the |
I can check |
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
55d7bba
to
f29d57e
Compare
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Ideally this would be supported for other commands as well and not only for sign-blob, but we need some extra work on those other commands first. |
Summary
This PR implements a configurable signing algorithm feature for Cosign by adding a
--signing-algorithm
flag to sign-blob commands. This partially addresses #3271 for configurable crypto algorithms.Key Changes:
--signing-algorithm
flag tosign-blob
commandThe implementation allows users to specify signing algorithms like:
This improves security by allowing users to choose stronger algorithms and provides cryptographic agility for different security requirements.
Release Note
--signing-algorithm
flag tosign-blob
command to allow configurable signing algorithms. Supported algorithms include ECDSA (P-256/384/521), RSA PKCS1v15, and Ed25519ph. ECDSA P-256 SHA-256 remains the default algorithm.How to test