Skip to content

Commit

Permalink
bundle: Just use email OID regardless of actual value
Browse files Browse the repository at this point in the history
Apparently Fulcio does not care about the CSR subject: just claim
everything is an email.

https://github.com/sigstore/fulcio/blob/main/fulcio.proto#L106

Signed-off-by: Jussi Kukkonen <[email protected]>
  • Loading branch information
jku committed Oct 23, 2024
1 parent 912186f commit 1f1e295
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/bundle/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ impl<'ctx> SigningSession<'ctx> {
fulcio: &FulcioClient,
token: &IdentityToken,
) -> SigstoreResult<(ecdsa::SigningKey<NistP256>, fulcio::CertificateResponse)> {
// NOTE: Currently both email and machine identities get wrapped in a "email" OID.
// Fulcio does not care about the content.
let identity = match &token.identity {
Identity::Sub(_) => {
return Err(SigstoreError::IdentityTokenError(
"Non-email identities are not yet supported".to_string(),
))
}
Identity::Sub(identity) |
Identity::Email(identity) => identity.as_str(),
};

Expand Down

0 comments on commit 1f1e295

Please sign in to comment.