clientCommonName returns a client certificate common name (CN) for cluster.
(cluster metav1.Object)
| 78 | |
| 79 | // clientCommonName returns a client certificate common name (CN) for cluster. |
| 80 | func clientCommonName(cluster metav1.Object) string { |
| 81 | // The common name (ASN.1 OID 2.5.4.3) of a certificate must be |
| 82 | // 64 characters or less. ObjectMeta.UID is a UUID in its 36-character |
| 83 | // string representation. |
| 84 | // - https://tools.ietf.org/html/rfc5280#appendix-A |
| 85 | // - https://docs.k8s.io/concepts/overview/working-with-objects/names/#uids |
| 86 | // - https://releases.k8s.io/v1.22.0/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go#L111 |
| 87 | // - https://releases.k8s.io/v1.22.0/staging/src/k8s.io/apiserver/pkg/registry/rest/meta.go#L30 |
| 88 | return "pgbackrest@" + string(cluster.GetUID()) |
| 89 | } |
| 90 | |
| 91 | // instanceServerCertificates returns projections of keys and certificates to |
| 92 | // include in a server volume from an instance Secret. |
no outgoing calls