You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/reference/access-authn-authz/certificate-signing-requests.md
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ the `spec.request` field. The CertificateSigningRequest denotes the signer (the
46
46
recipient that the request is being made to) using the `spec.signerName` field.
47
47
Note that `spec.signerName` is a required key after API version `certificates.k8s.io/v1`.
48
48
In Kubernetes v1.22 and later, clients may optionally set the `spec.expirationSeconds`
49
-
field to request a particular lifetime for the issued certificate. The minimum valid
49
+
field to request a particular lifetime for the issued certificate. The minimum valid
50
50
value for this field is `600`, i.e. ten minutes.
51
51
52
52
Once created, a CertificateSigningRequest must be approved before it can be signed.
@@ -113,13 +113,15 @@ signed, a security certificate.
113
113
114
114
Any signer that is made available for outside a particular cluster should provide information
115
115
about how the signer works, so that consumers can understand what that means for CertifcateSigningRequests
116
-
and (if enabled) [ClusterTrustBundles](#cluster-trust-bundles).
116
+
and (if enabled) [ClusterTrustBundles](#cluster-trust-bundles).
117
117
This includes:
118
118
119
119
1.**Trust distribution**: how trust anchors (CA certificates or certificate bundles) are distributed.
120
120
1.**Permitted subjects**: any restrictions on and behavior when a disallowed subject is requested.
121
-
1.**Permitted x509 extensions**: including IP subjectAltNames, DNS subjectAltNames, Email subjectAltNames, URI subjectAltNames etc, and behavior when a disallowed extension is requested.
122
-
1.**Permitted key usages / extended key usages**: any restrictions on and behavior when usages different than the signer-determined usages are specified in the CSR.
121
+
1.**Permitted x509 extensions**: including IP subjectAltNames, DNS subjectAltNames,
122
+
Email subjectAltNames, URI subjectAltNames etc, and behavior when a disallowed extension is requested.
123
+
1.**Permitted key usages / extended key usages**: any restrictions on and behavior
124
+
when usages different than the signer-determined usages are specified in the CSR.
123
125
1.**Expiration/certificate lifetime**: whether it is fixed by the signer, configurable by the admin, determined by the CSR `spec.expirationSeconds` field, etc
124
126
and the behavior when the signer-determined expiration is different from the CSR `spec.expirationSeconds` field.
125
127
1.**CA bit allowed/disallowed**: and behavior if a CSR contains a request a for a CA certificate when the signer does not permit it.
@@ -140,12 +142,12 @@ certificate expiration or lifetime. The expiration or lifetime therefore has to
140
142
through the `spec.expirationSeconds` field of the CSR object. The built-in signers
141
143
use the `ClusterSigningDuration` configuration option, which defaults to 1 year,
142
144
(the `--cluster-signing-duration` command-line flag of the kube-controller-manager)
143
-
as the default when no `spec.expirationSeconds` is specified. When `spec.expirationSeconds`
145
+
as the default when no `spec.expirationSeconds` is specified. When `spec.expirationSeconds`
144
146
is specified, the minimum of `spec.expirationSeconds` and `ClusterSigningDuration` is
145
147
used.
146
148
147
149
{{< note >}}
148
-
The `spec.expirationSeconds` field was added in Kubernetes v1.22. Earlier versions of Kubernetes do not honor this field.
150
+
The `spec.expirationSeconds` field was added in Kubernetes v1.22. Earlier versions of Kubernetes do not honor this field.
149
151
Kubernetes API servers prior to v1.22 will silently drop this field when the object is created.
150
152
{{< /note >}}
151
153
@@ -208,14 +210,14 @@ The kube-controller-manager implements [control plane signing](#signer-control-p
208
210
signers. Failures for all of these are only reported in kube-controller-manager logs.
209
211
210
212
{{< note >}}
211
-
The `spec.expirationSeconds` field was added in Kubernetes v1.22. Earlier versions of Kubernetes do not honor this field.
213
+
The `spec.expirationSeconds` field was added in Kubernetes v1.22. Earlier versions of Kubernetes do not honor this field.
212
214
Kubernetes API servers prior to v1.22 will silently drop this field when the object is created.
213
215
{{< /note >}}
214
216
215
-
Distribution of trust happens out of band for these signers. Any trust outside of those described above are strictly
217
+
Distribution of trust happens out of band for these signers. Any trust outside of those described above are strictly
216
218
coincidental. For instance, some distributions may honor `kubernetes.io/legacy-unknown` as client certificates for the
217
219
kube-apiserver, but this is not a standard.
218
-
None of these usages are related to ServiceAccount token secrets `.data[ca.crt]` in any way. That CA bundle is only
220
+
None of these usages are related to ServiceAccount token secrets `.data[ca.crt]` in any way. That CA bundle is only
219
221
guaranteed to verify a connection to the API server using the default service (`kubernetes.default.svc`).
220
222
221
223
### Custom signers
@@ -240,7 +242,8 @@ were marked as approved.
240
242
{{< /note >}}
241
243
242
244
{{< note >}}
243
-
The `spec.expirationSeconds` field was added in Kubernetes v1.22. Earlier versions of Kubernetes do not honor this field.
245
+
The `spec.expirationSeconds` field was added in Kubernetes v1.22.
246
+
Earlier versions of Kubernetes do not honor this field.
244
247
Kubernetes API servers prior to v1.22 will silently drop this field when the object is created.
245
248
{{< /note >}}
246
249
@@ -386,7 +389,7 @@ this API.
386
389
{{< /note >}}
387
390
388
391
A ClusterTrustBundles is a cluster-scoped object for distributing X.509 trust
389
-
anchors (root certificates) to workloads within the cluster. They're designed
392
+
anchors (root certificates) to workloads within the cluster. They're designed
390
393
to work well with the [signer](#signers) concept from CertificateSigningRequests.
391
394
392
395
ClusterTrustBundles can be used in two modes:
@@ -395,8 +398,8 @@ ClusterTrustBundles can be used in two modes:
395
398
### Common properties and validation {#ctb-common}
396
399
397
400
All ClusterTrustBundle objects have strong validation on the contents of their
398
-
`trustBundle`field. That field must contain one or more X.509 certificates,
399
-
DER-serialized, each wrapped in a PEM `CERTIFICATE` block. The certificates
401
+
`trustBundle`field. That field must contain one or more X.509 certificates,
402
+
DER-serialized, each wrapped in a PEM `CERTIFICATE` block. The certificates
400
403
must parse as valid X.509 certificates.
401
404
402
405
Esoteric PEM features like inter-block data and intra-block headers are either
@@ -444,8 +447,8 @@ controller in the cluster, so they have several security features:
444
447
`<signerNameDomain>/<signerNamePath>`or match a pattern such as
445
448
`<signerNameDomain>/*`.
446
449
* Signer-linked ClusterTrustBundles **must** be named with a prefix derived from
447
-
their `spec.signerName` field. Slashes (`/`) are replaced with colons (`:`),
448
-
and a final colon is appended. This is followed by an arbitrary name. For
450
+
their `spec.signerName` field. Slashes (`/`) are replaced with colons (`:`),
451
+
and a final colon is appended. This is followed by an arbitrary name. For
449
452
example, the signer `example.com/mysigner` can be linked to a
The contents of ClusterTrustBundles can be injected into the container filesystem, similar to ConfigMaps and Secrets. See the [clusterTrustBundle projected volume source](/docs/concepts/storage/projected-volumes#clustertrustbundle) for more details.
489
+
The contents of ClusterTrustBundles can be injected into the container filesystem, similar to ConfigMaps and Secrets.
490
+
See the [clusterTrustBundle projected volume source](/docs/concepts/storage/projected-volumes#clustertrustbundle) for more details.
487
491
488
492
<!-- TODO this should become a task page -->
489
493
## How to issue a certificate for a user {#normal-user}
@@ -609,12 +613,13 @@ To test it, change the context to `myuser`:
609
613
kubectl config use-context myuser
610
614
```
611
615
612
-
613
616
## {{% heading "whatsnext" %}}
614
617
615
618
* Read [Manage TLS Certificates in a Cluster](/docs/tasks/tls/managing-tls-in-a-cluster/)
616
-
* View the source code for the kube-controller-manager built in [signer](https://github.com/kubernetes/kubernetes/blob/32ec6c212ec9415f604ffc1f4c1f29b782968ff1/pkg/controller/certificates/signer/cfssl_signer.go)
617
-
* View the source code for the kube-controller-manager built in [approver](https://github.com/kubernetes/kubernetes/blob/32ec6c212ec9415f604ffc1f4c1f29b782968ff1/pkg/controller/certificates/approver/sarapprove.go)
619
+
* View the source code for the kube-controller-manager built in
0 commit comments