Skip to content

Commit 579be8d

Browse files
authored
Merge pull request #32648 from liggitt/cert-audit
Add audit annotations for invalid certificates
2 parents d9707ee + d9c1a07 commit 579be8d

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,11 @@ based on setting `securityContext` within the Pod's `.spec`.
495495

496496
## Annotations used for audit
497497

498+
<!-- sorted by annotation -->
498499
- [`authorization.k8s.io/decision`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-decision)
499500
- [`authorization.k8s.io/reason`](/docs/reference/labels-annotations-taints/audit-annotations/#authorization-k8s-io-reason)
501+
- [`insecure-sha1.invalid-cert.kubernetes.io/$hostname`](/docs/reference/labels-annotations-taints/audit-annotations/#insecure-sha1-invalid-cert-kubernetes-io-hostname)
502+
- [`missing-san.invalid-cert.kubernetes.io/$hostname`](/docs/reference/labels-annotations-taints/audit-annotations/#missing-san-invalid-cert-kubernetes-io-hostname)
500503
- [`pod-security.kubernetes.io/audit-violations`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-audit-violations)
501504
- [`pod-security.kubernetes.io/enforce-policy`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-enforce-policy)
502505
- [`pod-security.kubernetes.io/exempt`](/docs/reference/labels-annotations-taints/audit-annotations/#pod-security-kubernetes-io-exempt)

content/en/docs/reference/labels-annotations-taints/audit-annotations.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,38 @@ Example: `authorization.k8s.io/decision: "Human-readable reason for the decision
7373
This annotation gives reason for the [decision](#authorization-k8s-io-decision) in Kubernetes audit logs.
7474

7575
See [Auditing](/docs/tasks/debug-application-cluster/audit/) for more information.
76+
77+
## missing-san.invalid-cert.kubernetes.io/$hostname
78+
79+
Example: `missing-san.invalid-cert.kubernetes.io/example-svc.example-namespace.svc: "relies on a legacy Common Name field instead of the SAN extension for subject validation"`
80+
81+
Used by Kubernetes version v1.24 and later
82+
83+
This annotation indicates a webhook or aggregated API server
84+
is using an invalid certificate that is missing `subjectAltNames`.
85+
Support for these certificates was disabled by default in Kubernetes 1.19,
86+
and removed in Kubernetes 1.23.
87+
88+
Requests to endpoints using these certificates will fail.
89+
Services using these certificates should replace them as soon as possible
90+
to avoid disruption when running in Kubernetes 1.23+ environments.
91+
92+
There's more information about this in the Go documentation:
93+
[X.509 CommonName deprecation](https://go.dev/doc/go1.15#commonname).
94+
95+
## insecure-sha1.invalid-cert.kubernetes.io/$hostname
96+
97+
Example: `insecure-sha1.invalid-cert.kubernetes.io/example-svc.example-namespace.svc: "uses an insecure SHA-1 signature"`
98+
99+
Used by Kubernetes version v1.24 and later
100+
101+
This annotation indicates a webhook or aggregated API server
102+
is using an insecure certificate signed with a SHA-1 hash.
103+
Support for these insecure certificates is disabled by default in Kubernetes 1.24,
104+
and will be removed in a future release.
105+
106+
Services using these certificates should replace them as soon as possible,
107+
to ensure connections are secured properly and to avoid disruption in future releases.
108+
109+
There's more information about this in the Go documentation:
110+
[Rejecting SHA-1 certificates](https://go.dev/doc/go1.18#sha1).

0 commit comments

Comments
 (0)