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

gcpkms:// parsing is broken in 1.4.x #1259

Closed
woohgit opened this issue Dec 30, 2021 · 5 comments · Fixed by #1260
Closed

gcpkms:// parsing is broken in 1.4.x #1259

woohgit opened this issue Dec 30, 2021 · 5 comments · Fixed by #1260
Assignees
Labels
bug Something isn't working

Comments

@woohgit
Copy link

woohgit commented Dec 30, 2021

Symptom

When trying to use cosign with GCP KMS, the --key gcpkms:// is not parsed properly and handled as a local file path.

Affected versions:

  • v1.4.0
  • v1.4.1

Example run error below:

$ cosign public-key --key "gcpkms://projects/xxx/locations/global/keyRings/container-images/cryptoKeys/xxx/versions/1"
Error: open gcpkms:/projects/xxx/locations/global/keyRings/container-images/cryptoKeys/xxx/versions/1: no such file or directory
main.go:46: error during command execution: open gcpkms:/projects/xxx/locations/global/keyRings/container-images/cryptoKeys/xxx/versions/1: no such file or directory

It works well with v1.3.x

@woohgit woohgit added the bug Something isn't working label Dec 30, 2021
@woohgit woohgit changed the title gcpkms:// parsing is broken in 14.x gcpkms:// parsing is broken in 1.4.x Dec 30, 2021
@developer-guy developer-guy self-assigned this Dec 30, 2021
@developer-guy
Copy link
Member

thank you for letting us know about the bug @woohgit, I noticed that we called the wrong method which cause searching key from the file 🙋🏻‍♂️

@developer-guy
Copy link
Member

Ah, I think there is an error with the key you store in GCP KMS because code will try to retrieve the key from KMS if an error occurred then it will try to download it from the file, please see.

@developer-guy
Copy link
Member

but yeah, we can be more helpful by logging the error before searching it in disk

@woohgit
Copy link
Author

woohgit commented Dec 30, 2021

@developer-guy Do you think that there is anything with the key?

It's working with 1.3.x with all our keys, and 1.4.x is not working with any of the keys.

I'll build a local copy from your PR and see what's the error.

@woohgit
Copy link
Author

woohgit commented Dec 30, 2021

Nah it looks good. No error this time, probably my GSA permissions / ADC permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants