Skip to content

Commit

Permalink
Clarify what is interpretted as trust anchor for chain (#245)
Browse files Browse the repository at this point in the history
This standardizes client behavior on considering the last certificate in
the chain as a trust anchor, regardless if it's a root or intermediate.
This means clients should use all preceding CA certificates as
chain-builders or intermediates.

We do document the case where an intermediate may be issued from
multiple roots, specifying that multiple chains should be provided.
Another solution for a later PR could be to provide two pools, trusted
and untrusted, as an alternative to chains.

Signed-off-by: Hayden Blauzvern <[email protected]>
  • Loading branch information
haydentherapper authored Mar 6, 2024
1 parent 98f337e commit 49f0435
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gen/jsonschema/schemas/CertificateAuthority.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"certChain": {
"$ref": "#/definitions/dev.sigstore.common.v1.X509CertificateChain",
"additionalProperties": false,
"description": "The certificate chain for this CA."
"description": "The certificate chain for this CA. The last certificate in the chain MUST be the trust anchor. The trust anchor MAY be a self-signed root CA certificate or MAY be an intermediate CA certificate."
},
"validFor": {
"$ref": "#/definitions/dev.sigstore.common.v1.TimeRange",
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 @@ -545,7 +545,7 @@
"certChain": {
"$ref": "#/definitions/dev.sigstore.common.v1.X509CertificateChain",
"additionalProperties": false,
"description": "The certificate chain for this CA."
"description": "The certificate chain for this CA. The last certificate in the chain MUST be the trust anchor. The trust anchor MAY be a self-signed root CA certificate or MAY be an intermediate CA certificate."
},
"validFor": {
"$ref": "#/definitions/dev.sigstore.common.v1.TimeRange",
Expand Down
2 changes: 1 addition & 1 deletion gen/jsonschema/schemas/TrustedRoot.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"certChain": {
"$ref": "#/definitions/dev.sigstore.common.v1.X509CertificateChain",
"additionalProperties": false,
"description": "The certificate chain for this CA."
"description": "The certificate chain for this CA. The last certificate in the chain MUST be the trust anchor. The trust anchor MAY be a self-signed root CA certificate or MAY be an intermediate CA certificate."
},
"validFor": {
"$ref": "#/definitions/dev.sigstore.common.v1.TimeRange",
Expand Down
4 changes: 3 additions & 1 deletion gen/pb-go/trustroot/v1/sigstore_trustroot.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.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ pub struct CertificateAuthority {
/// authority.
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
/// The certificate chain for this CA.
/// The certificate chain for this CA. The last certificate in the chain
/// MUST be the trust anchor. The trust anchor MAY be a self-signed root
/// CA certificate or MAY be an intermediate CA certificate.
#[prost(message, optional, tag = "3")]
pub cert_chain: ::core::option::Option<
super::super::common::v1::X509CertificateChain,
Expand Down
Binary file not shown.
6 changes: 5 additions & 1 deletion gen/pb-typescript/src/__generated__/sigstore_trustroot.ts

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

4 changes: 3 additions & 1 deletion protos/sigstore_trustroot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ message CertificateAuthority {
// by the certificate authority to interact with the certificate
// authority.
string uri = 2;
// The certificate chain for this CA.
// The certificate chain for this CA. The last certificate in the chain
// MUST be the trust anchor. The trust anchor MAY be a self-signed root
// CA certificate or MAY be an intermediate CA certificate.
dev.sigstore.common.v1.X509CertificateChain cert_chain = 3;
// The time the *entire* chain was valid. This is at max the
// longest interval when *all* certificates in the chain were valid,
Expand Down

0 comments on commit 49f0435

Please sign in to comment.