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

Clarify error when KMS provider fails to load #2220

Merged
merged 1 commit into from Sep 4, 2022

Conversation

znewman01
Copy link
Contributor

Before:

$ KEY_REF=gcpkms://projects/test/locations/global/keyRings/test/cryptoKeys/mykey/cryptoKeyVersions/1
$ cosign verify-blob --key $KEY_REF --signature /dev/null /dev/null
Error: verifying blob [/dev/null]: loading public key: loading URL: unrecognized scheme: gcpkms://
main.go:62: error during command execution: verifying blob [/dev/null]: loading public key: loading URL: unrecognized scheme: gcpkms://

After:

$ KEY_REF=gcpkms://projects/test/locations/global/keyRings/test/cryptoKeys/mykey/cryptoKeyVersions/1
$ cosign verify-blob --key $KEY_REF --signature /dev/null /dev/null
Error: verifying blob [/dev/null]: loading public key: new gcp kms client: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
main.go:62: error during command execution: verifying blob [/dev/null]: loading public key: new gcp kms client: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

Addresses #2094; I'm not sure if this fixes it, but it'll give us more
information.

Signed-off-by: Zachary Newman z@znewman.net

Summary

Release Note

Documentation

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2022

Codecov Report

Merging #2220 (cee72e1) into main (1ca09f2) will increase coverage by 0.11%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #2220      +/-   ##
==========================================
+ Coverage   26.51%   26.62%   +0.11%     
==========================================
  Files         131      131              
  Lines        7671     7680       +9     
==========================================
+ Hits         2034     2045      +11     
  Misses       5376     5376              
+ Partials      261      259       -2     
Impacted Files Coverage Δ
pkg/blob/load.go 70.27% <33.33%> (-4.02%) ⬇️
pkg/signature/keys.go 23.02% <88.88%> (+6.47%) ⬆️

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

Before:

    $ KEY_REF=gcpkms://projects/test/locations/global/keyRings/test/cryptoKeys/mykey/cryptoKeyVersions/1
    $ cosign verify-blob --key $KEY_REF --signature /dev/null /dev/null
    Error: verifying blob [/dev/null]: loading public key: loading URL: unrecognized scheme: gcpkms://
    main.go:62: error during command execution: verifying blob [/dev/null]: loading public key: loading URL: unrecognized scheme: gcpkms://

After:

    $ KEY_REF=gcpkms://projects/test/locations/global/keyRings/test/cryptoKeys/mykey/cryptoKeyVersions/1
    $ cosign verify-blob --key $KEY_REF --signature /dev/null /dev/null
    Error: verifying blob [/dev/null]: loading public key: new gcp kms client: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
    main.go:62: error during command execution: verifying blob [/dev/null]: loading public key: new gcp kms client: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

Addresses sigstore#2094; I'm not sure if this fixes it, but it'll give us more
information.

Signed-off-by: Zachary Newman <z@znewman.net>
@dlorenc dlorenc merged commit 9d3101b into sigstore:main Sep 4, 2022
@github-actions github-actions bot added this to the v1.12.0 milestone Sep 4, 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.

None yet

3 participants