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

Manual rekor upload with cosign public key #1899

Open
lkatalin opened this issue Dec 11, 2023 · 2 comments
Open

Manual rekor upload with cosign public key #1899

lkatalin opened this issue Dec 11, 2023 · 2 comments
Labels
question Further information is requested

Comments

@lkatalin
Copy link
Contributor

There was a previous issue opened (#1573 ) asking about a manual Rekor upload of an artifact signed with a cosign public key. However, the proposed solution (using the --pki-format x509 flag) did not work when I tried it.

The same artifact, public key, and signature that verify correctly with cosign do not seem to verify correctly with the rekor-cli:

[lily@fedora cosign]$ cosign verify-blob --key keys/cosign.pub --signature blob_sig generated_payload --insecure-ignore-tlog=true
WARNING: Skipping tlog verification is an insecure practice that lacks of transparency and auditability verification for the blob.
Verified OK

[lily@fedora cosign]$ rekor-cli upload --artifact generated_payload --public-key keys/cosign.pub --pki-format x509 --signature blob_sig
error: error retrieving external entities: invalid signature when validating ASN.1 encoded signature

Is this expected? What am I missing from the command? Or is there a bug?

@lkatalin lkatalin added the question Further information is requested label Dec 11, 2023
@haydentherapper
Copy link
Contributor

My guess is that blob_sig cannot be base64 encoded. Try cat blob_sig | base64 -d > decoded_blob_sig and see if you can upload that with the same key and artifact. If that works, then we can add a feature to rekor-cli to support decoding base64 encoded sigs.

@lkatalin
Copy link
Contributor Author

Thanks @haydentherapper , base64 decoding worked! I can make a PR for base64 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants