Skip to content

Commit

Permalink
Support DSSE signature extension for Sigstore (sigstore#145)
Browse files Browse the repository at this point in the history
DSSE is adding support for signature extensions where a signature can
include signing-ecosystem specific information for each signature. The
first extension is for Sigstore. This commit allows for using
VerificationMaterial as the structure for the DSSE extension.

Signed-off-by: Aditya Sirish <[email protected]>
  • Loading branch information
adityasaky authored Jan 8, 2024
1 parent 68b19c2 commit d96fa44
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gen/jsonschema/schemas/Bundle.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.common.v1.HashOutput": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gen/jsonschema/schemas/Input.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.common.v1.DistinguishedName": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gen/jsonschema/schemas/VerificationMaterial.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.bundle.v1.TimestampVerificationData": {
"properties": {
Expand Down
9 changes: 8 additions & 1 deletion gen/pb-go/bundle/v1/sigstore_bundle.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/pb-rust/schemas/Bundle.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.common.v1.HashOutput": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gen/pb-rust/schemas/Input.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.common.v1.DistinguishedName": {
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion gen/pb-rust/schemas/VerificationMaterial.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
],
"title": "Verification Material",
"description": "VerificationMaterial captures details on the materials used to verify signatures."
"description": "VerificationMaterial captures details on the materials used to verify signatures. This message may be embedded in a DSSE envelope as a signature extension. Specifically, the `ext` field of the extension will expect this message when the signature extension is for Sigstore. This is identified by the `kind` field in the extension, which must be set to application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore. When used as a DSSE extension, if the `public_key` field is used to indicate the key identifier, it MUST match the `keyid` field of the signature the extension is attached to."
},
"dev.sigstore.bundle.v1.TimestampVerificationData": {
"properties": {
Expand Down
9 changes: 8 additions & 1 deletion gen/pb-typescript/src/__generated__/sigstore_bundle.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion protos/sigstore_bundle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ message TimestampVerificationData {
}

// VerificationMaterial captures details on the materials used to verify
// signatures.
// signatures. This message may be embedded in a DSSE envelope as a signature
// extension. Specifically, the `ext` field of the extension will expect this
// message when the signature extension is for Sigstore. This is identified by
// the `kind` field in the extension, which must be set to
// application/vnd.dev.sigstore.verificationmaterial;version=0.1 for Sigstore.
// When used as a DSSE extension, if the `public_key` field is used to indicate
// the key identifier, it MUST match the `keyid` field of the signature the
// extension is attached to.
message VerificationMaterial {
oneof content {
dev.sigstore.common.v1.PublicKeyIdentifier public_key = 1 [(google.api.field_behavior) = REQUIRED];
Expand Down

0 comments on commit d96fa44

Please sign in to comment.