Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

POSTGRES_PASSWORD is required to be set when using POSTGRES_HOST_AUTH_METHOD=cert

Aperta
#977 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
postgresql, shell
Ambito
databases

Direzione di ricerca

Inizia da docker-entrypoint.sh, in particolare da docker_verify_minimum_env e pg_setup_hba_conf nelle posizioni collegate, per tracciare come POSTGRES_HOST_AUTH_METHOD viene convalidato e scritto in pg_hba.conf. Definisci l’input supportato per l’autenticazione tramite certificato, incluse eventuali opzioni di autenticazione o il comportamento di hostssl, e considera come verificare il completamento della configurazione risultante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'd like to be able to write a configuration that uses mutual TLS with the auth method cert, which does not require a password and instead enforces that the user is equal to the common name of the authenticated client certificate.

However, the only passwordless auth method permitted by by the docker entrypoint script's docker_verify_minimum_env function is trust:

https://github.com/docker-library/postgres/blob/74e51d102aede317665f2b4a9b89362135402fe7/docker-entrypoint.sh#L119

It seems like adding another case to this check to allow for using certificate-based authentication. One concern I have, though, is that there are auth options as well that may be needed, e.g., looking at the pg_setup_hba_conf function below, it appears that if I want to end up with a pg_hba.conf file with cert clientcert=verify-full, that full string (i.e., including the auth options) would need to be set in the POSTGRES_HOST_AUTH_METHOD environment variable as written. I'm not sure if it would make more sense to add a new environment variable for that purpose? There is also no way that I can identify to use hostssl instead of host, though with cert authentication I'm not sure that actually matters.

https://github.com/docker-library/postgres/blob/74e51d102aede317665f2b4a9b89362135402fe7/docker-entrypoint.sh#L251

Lingua principale
Shell
Stelle
2.5k
Fork
1.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker-library/postgres

Tutte le issue di docker-library/postgres

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.