Repository navigation
gcs: Expose transparency-trust-list-base64 in security-context based on injected TTLs - #2991
Conversation
…on injected TTLs In order to enable the application to provide with a relying party a full set of transparent endorsements, we also expose a "first party" TTL in the security context that we believe allows verification of the transparent UVM reference info and TCB reference info. Such a TTL will be delivered via the fragment injection mechanism like for TTLs for transparent fragments, and GCS identifies such a TTL via hard-coded issuer and subject strings. When such a TTL is injected, it is used to populate the transparency-trust-list-base64 file on next container start. Using it as the content of transparency-trust-list-base64 is the only "special treatment" applied to such TTLs. GCS does not otherwise give it any more trust than allowed by the policy. COSE signature and issuer certificate checks are applied to all injected TTLs, before this matching is done. A malformed or not-correctly-signed TTL would not be used for the security context file even if the COSE envelope header claims the correct issuer and subject. Assisted-by: GitHub-Copilot Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new first-party TTL selection and export path lacks regression coverage for matching, SVN ordering, invalid-input cache preservation, and export behavior after policy rejection or in TTL-only cases.
1 open issue
What changed in this PR
This PR exposes an injected first-party transparency trust list (TTL) in the container security context, allowing applications to provide it alongside reference information to relying parties without granting it additional policy trust.
Changes:
- Defines the
transparency-trust-list-base64filename. - Caches validated TTLs matching designated issuer/subject pairs, retaining the highest received SVN.
- Exports the cached COSE bytes as base64 when creating a container’s security context.
| File | Description |
|---|---|
pkg/securitypolicy/securitypolicy.go |
Adds the TTL security-context filename constant. |
pkg/securitypolicy/securitypolicy_options.go |
Adds TTL matching, synchronized caching, SVN ordering, and security-context export. |
Review effort: Balanced
| if len(s.transparencyTrustList) == 0 || s.transparencyTrustListSVN <= *svnFromCwt { | ||
| s.transparencyTrustList = append(s.transparencyTrustList[:0], raw...) | ||
| s.transparencyTrustListSVN = *svnFromCwt |
| // purely infromative, and we do not otherwise give such a TTL special | ||
| // privileges or use keys in it without first consulting the policy). | ||
| const ( | ||
| firstPartyTTLIssuer = "did:x509:0:sha256:I__iuL25oXEVFdTP_aBLx_eT1RPHbCQ_ECBQfYZpt9s::eku:1.3.6.1.4.1.311.76.59.1.3" |
There was a problem hiding this comment.
how like are these to change in the future? Would we rather (e.g.) go embed and supply a JSON array with values at compile time?
There was a problem hiding this comment.
The same as the issuer for fragments and UVM endorsements. Hopefully not likely, because this value needs to be communicated to Relying Parties, who need to pin it and use to verify the TTLs we publish, it's not something we can change unilaterally without breaking RPs.
There was a problem hiding this comment.
Agree with Amaury, I think basically once this goes live we will not have an easy way to change it anymore (same for issuer of UVM endorsement etc)
|
Tested injecting a TTL, it is added to security context correctly regardless of policy. A newer TTL with a higher SVN overrides the older one. I think this is ready to merge. |
0eabd8b to
b73cc7c
Compare
|
For reference, this should be the schema for a TTL payload: and the envelope: |

In order to enable the application to provide with a relying party a full set of transparent endorsements, we also expose a "first party" TTL in the security context that we believe allows verification of the transparent UVM reference info and TCB reference info. Such a TTL will be delivered via the fragment injection mechanism like for TTLs for transparent fragments, and GCS identifies such a TTL via hard-coded issuer and subject strings. When such a TTL is injected, it is used to populate the transparency-trust-list-base64 file on next container start.
Using it as the content of transparency-trust-list-base64 is the only "special treatment" applied to such TTLs. GCS does not otherwise give it any more trust than allowed by the policy.
COSE signature and issuer certificate checks are applied to all injected TTLs, before this matching is done. A malformed or not-correctly-signed TTL would not be used for the security context file even if the COSE envelope header claims the correct issuer and subject.
Assisted-by: GitHub-Copilot