An ACME `ClusterIssuer` cannot be used with `spec.tls.issuerConf`
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- go, kubernetes, postgresql
- Ambito
- backend, infrastructure, security
Direzione di ricerca
Traccia come spec.tls.issuerConf seleziona gli issuer e come vengono create le sei risorse Certificate leaf. Esamina internal/controller/postgrescluster/patroni.go:381 e internal/postgres/parameters.go:31, quindi ispeziona gli entry point correlati alla generazione dei certificati. Il lavoro è completo quando è possibile usare un ACME ClusterIssuer senza richiedere identificatori non DNS per i certificati client interni e il comportamento documentato dei certificati è coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Report
Setting spec.tls.issuerConf to an existing ACME ClusterIssuer (Let's Encrypt, or any ACME server) does not work. The Operator resolves this to external issuer mode and points all leaf Certificate resources at that issuer, but two of them request identifiers that ACME can never issue:
| Certificate | commonName and dnsNames |
|---|---|
<cluster>-replication-cert |
_crunchyrepl |
<cluster>-pgbackrest-client-cert |
pgbackrest@<cluster-uid> |
cert-manager submits commonName and every dnsNames entry to the ACME server as identifiers requiring an HTTP-01 or DNS-01 challenge. Neither of these strings is a resolvable DNS name, so the Order can never be fulfilled.
Both are client certificates whose identity is consumed by CN matching, not by hostname verification:
The other four certificates (cluster, instance, repo host, PgBouncer) are fine with an ACME issuer, given an ACME server that issues the clientAuth EKU and a spec.clusterServiceDNSSuffix set to a domain that server will validate.
More about the problem
There is also no usable workaround:
spec.secrets.customReplicationClientTLSSecretdoes bypass cert-manager for the replication cert (internal/controller/postgrescluster/patroni.go:381), but PostgreSQL validates that client cert againstssl_ca_file = /pgconf/tls/ca.crt(internal/postgres/parameters.go:31) - the CA of the cert-manager-issued server cert. A hand-supplied cert would have to be signed by the ACME CA, which is not possible.- The pgBackRest client cert has no equivalent field. The only opt-out is
spec.tls.certManagementPolicy: userProvidedOnly, which is all-or-nothing and disables cert-manager for the whole cluster.
Ideally the internal mTLS client certificates would be issued independently of spec.tls.issuerConf - either from the Operator's own CA or from a separately configurable issuer - since their identifiers are not DNS names and were never meant to be publicly validated.
Steps to reproduce
- Install cert-manager and create an ACME
ClusterIssuer. - Set
spec.tls.issuerConfto that issuer (kind: ClusterIssuer,group: cert-manager.io) and deploy a cluster.
Versions
not relevant
Anything else?
The in-flight cert-manager documentation for 3.1.0 (percona/k8spg-docs#414) lists ACME and Let's Encrypt as supported external issuers, and states that the configured issuer must sign every leaf certificate, including the replication and pgBackRest ones. That combination is not achievable, so the docs may need adjusting alongside the fix.
- Lingua principale
- Go
- Stelle
- 386
- Fork
- 84
- Merge medio
- 6g 3h
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di percona/percona-postgresql-operator
-
feature-request jira-task PG Proposed
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
percona/percona-postgresql-operator#1873 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug jira-task
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
percona/percona-postgresql-operator#1872 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 6/100
percona/percona-postgresql-operator#1871 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
percona/percona-postgresql-operator#1870 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
percona/percona-postgresql-operator#1869 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di percona/percona-postgresql-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Response matcher: a changed integer above 2^53 passes because JSON numbers are compared as float64Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
dec2hex rejects integer literals and accepts string literals in SQLForse già presa @NopeCharon l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Open-Meteo integration: selectable weather-models for temperature- and PV-forecastsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement tariffs
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
evcc-io/evcc#35698 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno