From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4251: OAuth implementation
Date: Wed, 09 Sep 2026 15:45:36 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4251-rc3970363340@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4251@github.com>
References: <gh-pgjdbc-pgjdbc-4251@github.com>
(on docker/bin/postgres-server)
The header of this script says it "respects all the same environment variables used by the CI matrix", and for `OAUTH` it does not. The matrix uses `no`, `smoke`, and `all` (`matrix.mjs` lines 197-201), `entrypoint.sh` tests `!= "no"` and separately `= "all"`, and this line tests `= "yes"`, a value the matrix never produces.
So `OAUTH=smoke docker/bin/postgres-server` and `OAUTH=all docker/bin/postgres-server` both install `pg_oidc_validator`, write an `oauth` rule into `pg_hba.conf` pointing at `issuer=http://keycloak:8080/...`, and start no Keycloak, because the compose profile is only exported here. On arm64 they also skip `PG_PLATFORM`, and the amd64-only package fails to install.
`if [ "${OAUTH:-no}" != "no" ]` fixes the profile. The header on line 14 and `docker/postgres-server/README.md` line 22 both need the three real values, plus the two effects a reader only discovers by running it: Keycloak takes `127.0.0.1:8080`, and on arm64 the server runs emulated under `linux/amd64`.
There is a missing space after `available:` in the TODO on line 66, and the same in `docker-compose.yml` line 7, which keeps the URL from linking.