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

feat: add debug information to cert validation error #2579

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

asraa
Copy link
Contributor

@asraa asraa commented Dec 27, 2022

Signed-off-by: Asra Ali asraa@google.com

Summary

  • Adds debug information to the cert validation error for issuer/subject.

I found that when using these flags, it was difficult to know the expected calls. I think allowing users to see the failing information (did I get the issuer right?) would help with using the CLI.

Displays like:

$ ./cosign verify-blob README.md --bundle bundle1.sig  --certificate-identity asraa@google.com --certificate-oidc-issuer-regexp .*google.*
Error: verifying blob [README.md]: none of the expected identities matched what was in the certificate, got subjects [asraa@google.com] with issuer https://github.com/login/oauth
main.go:62: error during command execution: verifying blob [README.md]: none of the expected identities matched what was in the certificate, got subjects [asraa@google.com] with issuer https://github.com/login/oauth

Release Note

Documentation

Signed-off-by: Asra Ali <asraa@google.com>
@asraa asraa requested a review from kpk47 December 27, 2022 19:36
@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2022

Codecov Report

Merging #2579 (4dc63f2) into main (fa6c58f) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2579      +/-   ##
==========================================
+ Coverage   30.02%   30.05%   +0.02%     
==========================================
  Files         141      141              
  Lines        8659     8662       +3     
==========================================
+ Hits         2600     2603       +3     
  Misses       5678     5678              
  Partials      381      381              
Impacted Files Coverage Δ
pkg/cosign/verify.go 39.41% <100.00%> (+0.21%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dlorenc dlorenc merged commit 7bbfea7 into sigstore:main Dec 28, 2022
@github-actions github-actions bot added this to the v1.14.0 milestone Dec 28, 2022
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.

4 participants