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

Proof of key possession is inconsistent with Fulcio #282

Closed
adityasaky opened this issue Aug 27, 2024 · 4 comments · Fixed by #283
Closed

Proof of key possession is inconsistent with Fulcio #282

adityasaky opened this issue Aug 27, 2024 · 4 comments · Fixed by #283
Labels
bug Something isn't working

Comments

@adityasaky
Copy link
Contributor

Description

sigstore-go computes the proof of key possession signature over the token's subject, while Fulcio verifies it using the token's email address. This results in the signing flow (using the public good instance) failing:

Error: Fulcio returned 400: {"code":3,"message":"The signature supplied in the request could not be verified","details":[]}

Related: sigstore/cosign#3777

Version

v0.5.1

@adityasaky adityasaky added the bug Something isn't working label Aug 27, 2024
@adityasaky
Copy link
Contributor Author

@haydentherapper suggested using sigstore/sigstore's SubjectFromToken so that the behavior is consistent. Happy to submit a patch!

@haydentherapper
Copy link
Contributor

Thanks for finding this! Yes, I think using that function would be a good fix.

I think we didn't catch this because sigstore-go signing was only used for CI identities whose tokens don't have the email_address claim. Handling tokens with emails is an exception - in a future v2 of Fulcio, we should sign over only one value, not dynamically choose, but in the meantime, using SubjectFromToken should be sufficient.

@steiza
Copy link
Member

steiza commented Aug 28, 2024

Changing the behavior is a little strange, in that what sigstore-go signing does now is the desired end behavior - but I understand we're a bit away from a Fulcio v2.0 release. @adityasaky it sounds like you'll post a patch?

@haydentherapper
Copy link
Contributor

Changing this behavior should be in line with all other clients as well - if they support email-based identity providers, this patch is needed.

We could support multiple PoPs in Fulcio as well, but with how the code is set up currently, that is not possible.

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.

3 participants