Skip to content

Commit 8377a67

Browse files
Tim Bannisterahmedtd
andcommitted
ClusterTrustBundles: Add section to certificates page
Document the API types as they exist today, plus a hint of the future integrations that will be available. Co-Authored-By: Taahir Ahmed <[email protected]>
1 parent bd456cf commit 8377a67

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

content/en/docs/reference/access-authn-authz/certificate-signing-requests.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,95 @@ status:
459459
certificate: "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JS..."
460460
```
461461

462+
## ClusterTrustBundles (Alpha Feature) {#ctb}
463+
464+
{{< feature-state for_k8s_version="v1.27" state="alpha" >}}
465+
466+
{{< note >}}
467+
Gated by the `ClusterTrustBundles` feature gate.
468+
{{< /note >}}
469+
470+
ClusterTrustBundles are a cluster-scoped object for distributing X.509 trust
471+
anchors (root certificates) to workloads within the cluster. They're designed
472+
to work well with the existing signer concept.
473+
474+
Future Kubernetes releases will build on them with integrations like the ability
475+
to project their contents into the pod filesystem.
476+
477+
ClusterTrustBundles can be used in two modes: signer-linked and signer-unlinked.
478+
479+
### Common properties and validation {#ctb-common}
480+
481+
All ClusterTrustBundle objects have strong validation on the contents of their
482+
`trustBundle` field. It must contain one or more X.509 certificates,
483+
DER-serialized, each wrapped in a PEM `CERTIFICATE` block. The certificates
484+
must parse as valid X.509 certificates.
485+
486+
Esoteric PEM features like inter-block data and intra-block headers are either
487+
rejected during object validation, or filtered by consumers of the object
488+
(primarily Kubelet). Additionally, consumers will reorder the certificates in
489+
the bundle with their own arbitrary but stable ordering.
490+
491+
ClusterTrustBundle objects should be considered world-readable within the
492+
cluster. All serviceaccounts have a default RBAC grant to get, list, and watch
493+
all ClusterTrustBundle objects.
494+
495+
### Signer-linked ClusterTrustBundles {#ctb-signer-linked}
496+
497+
Signer-linked ClusterTrustBundles are associated with a signer name, like this:
498+
499+
```yaml
500+
apiVersion: certificates.k8s.io/v1alpha1
501+
kind: ClusterTrustBundle
502+
metadata:
503+
name: example.com:mysigner:foo
504+
spec:
505+
signerName: example.com/mysigner
506+
trustBundle: "<... PEM data ...>"
507+
```
508+
509+
These ClusterTrustBundles are intended to be maintained by a signer-specific
510+
controller in the cluster, so they have several security features:
511+
512+
* To create or update a signer-linked ClusterTrustBundle, you must have the
513+
`attest` verb on the signer (verbs: `attest`, group: `certificates.k8s.io`,
514+
resource: `signers`, resourceName: `<signerNameDomain>/<signerNamePath>` or
515+
`<signerNameDomain>/*`).
516+
* Signer-linked ClusterTrustBundles must be named with a prefix derived from
517+
their `spec.signerName` field. Slashes (`/`) are replaced with colons (`:`),
518+
and a final colon is appended. This is followed by an arbitary name. For
519+
example, the signer `example.com/mysigner` becomes
520+
`example.com:mysigner:<arbitrary-name>`.
521+
522+
Signer-linked ClusterTrustBundles will be consumed in workloads by a combination
523+
of field selector on the signer name and a label selector. If this query
524+
matches multiple ClusterTrustBundle objects, their contents will be merged,
525+
deduplicated, and sorted before being provided to the workload.
526+
527+
### Signer-unlinked ClusterTrustBundles {#ctb-signer-unlinked}
528+
529+
Signer-unlinked ClusterTrustBundles have an empty `spec.signerName` field, like this:
530+
531+
```yaml
532+
apiVersion: certificates.k8s.io/v1alpha1
533+
kind: ClusterTrustBundle
534+
metadata:
535+
name: foo
536+
spec:
537+
signerName: ""
538+
trustBundle: "<... PEM data ...>"
539+
```
540+
541+
They are primarily intended for cluster configuration use cases. Each
542+
signer-unlinked ClusterTrustBundle is an independent object, in contrast to the
543+
customary grouping behavior of signer-linked ClusterTrustBundles.
544+
545+
Signer-unlinked ClusterTrustBundles have no `attest` verb requirement. Instead,
546+
control access to them using the standard RBAC verbs.
547+
548+
To distinguish them from signer-linked ClusterTrustBundles, the names of
549+
signer-unlinked ClusterTrustBundles must not contain a colon (`:`).
550+
462551
## {{% heading "whatsnext" %}}
463552

464553
* Read [Manage TLS Certificates in a Cluster](/docs/tasks/tls/managing-tls-in-a-cluster/)

0 commit comments

Comments
 (0)