Skip to content

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

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

ret2libc
Copy link
Contributor

@ret2libc ret2libc commented Jan 23, 2024

Summary

Give the user the option to choose which signing algorithm to use when generating keypairs (#3271).

Code based on #4050 .

Release Note

Documentation

@ret2libc ret2libc closed this Jan 23, 2024
@ret2libc ret2libc reopened this Jan 23, 2024
@ret2libc
Copy link
Contributor Author

Shall we add the --signing-algorithm to the verify/verify-blob commands as well?

Copy link
Contributor

@haydentherapper haydentherapper left a 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.

@ret2libc ret2libc force-pushed the signing-algorithm-flag branch 2 times, most recently from c8076cb to 2990915 Compare January 29, 2024 17:08
Copy link
Contributor

@haydentherapper haydentherapper left a 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?

@ret2libc ret2libc force-pushed the signing-algorithm-flag branch from 2990915 to ca53935 Compare April 2, 2025 15:44
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 34.84163% with 144 lines in your changes missing coverage. Please review.

Project coverage is 36.28%. Comparing base (2ef6022) to head (06bafda).
Report is 363 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cosign/keys.go 33.33% 43 Missing and 3 partials ⚠️
cmd/cosign/cli/sign/sign.go 6.97% 40 Missing ⚠️
cmd/cosign/cli/sign/sign_blob.go 43.85% 27 Missing and 5 partials ⚠️
pkg/cosign/tlog.go 46.15% 14 Missing ⚠️
cmd/cosign/cli/options/signblob.go 0.00% 5 Missing ⚠️
...cosign/cli/fulcio/fulcioverifier/fulcioverifier.go 0.00% 3 Missing ⚠️
pkg/signature/keys.go 71.42% 2 Missing ⚠️
cmd/cosign/cli/signblob.go 0.00% 1 Missing ⚠️
internal/pkg/cosign/common.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3497      +/-   ##
==========================================
- Coverage   40.10%   36.28%   -3.82%     
==========================================
  Files         155      210      +55     
  Lines       10044    13916    +3872     
==========================================
+ Hits         4028     5050    +1022     
- Misses       5530     8232    +2702     
- Partials      486      634     +148     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ret2libc added 4 commits April 4, 2025 16:30
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Signed-off-by: Riccardo Schirone <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants