Repository navigation
Verify the Postgres certificate from the site and Ory - #131
Merged
Merged
Conversation
With pg serving a certificate from the internal CA and the CA mounted in the pods, the site and Ory can stop accepting any certificate: DSNs move from sslmode=require to verify-full with sslrootcert=/etc/internal-ca/ca.crt. The site no longer needs uselibpqcompat, which only kept node-postgres from verifying. Ory reads its DSNs from the Secret only at pod start, and nothing restarted it on a Secret change; the auth Flux Kustomization now stamps a secret-revision annotation on its Deployments, the same knob the site has. The unused OIDC_COOLIFY_CLIENT_SECRET leaves the Secret. Closes #94. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bulbashenko
force-pushed
the
verify-db-ca
branch
from
October 26, 2026 21:56
a4aa771 to
f404f52
Compare
bulbashenko
marked this pull request as ready for review
October 26, 2026 21:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Часть 3 из 3, закрывает #94.
sslmode=require→sslmode=verify-full&sslrootcert=/etc/internal-ca/ca.crt. Сайт больше не нуждается вuselibpqcompat=true: pg-connection-string 2.12 читаетsslrootcertи с verify-full проверяет и CA, и имя.site.yaml: монтирует ConfigMapinternal-ca,secret-revision2 → 3.clusters/hel1/auth.yaml: патч Flux ставит на все Deployments auth аннотациюbulbashenko.com/secret-revision(так же, как у сайта). Без неё Ory не перечитал бы DSN, потому что env из Secret берётся только при старте пода. Сейчас аннотация"1", это перезапустит все 5 Deployments auth.authубран неиспользуемыйOIDC_COOLIFY_CLIENT_SECRET(хвост Coolify; клиента в Hydra нет с auth@3ad304a).Stalwart переключается в bulbashenko-com/mail#7.
Порядок мержа
pg) live:kubectl -n data get cluster pg -o jsonpath='{.status.certificates.serverTLSSecret}'=pg-server-tls.deploy/auth: Ory монтирует CA./etc/internal-ca/ca.crtи упадёт на миграции.deploy/mail(можно в любой момент после п.1).Проверка после
kubectl -n auth get pods: все Ready, рестартов нет;x509.🤖 Generated with Claude Code