fix: verify the metadata database certificate with sslmode=verify-full #235
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/metadata-db-verify-full"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of https://codefloe.com/rpkgs/bincraft/issues/225. Stacked on #234.
Every connection to the metadata database used
sslmode = 'require', which encrypts but does not authenticate the server, so anyone able to impersonater-binaries.devxy.io:15432would receivePGPASS.Changes
.crow/build-all-versions.yaml,process-updates.yaml,prune-stale-flat-binaries.yaml,reindex.yaml,weekly-rebuild-reindex.yaml:metadata_db_sslmode = 'verify-full'in every bincraft call.local/*.R: the same for bincraft calls; scripts that callDBI::dbConnect()directly also passsslrootcert = bincraft::postgres_sslrootcert("verify-full"), because libpq looks for~/.postgresql/root.crtrather than the system trust store.README.md: note that the endpoint serves a Let's Encrypt certificate and how to verify it.=assignments to<-inlocal/missing-cran-packages-db.Randlocal/packages-without-any-binary.Rwhile the hook ran on those files.Ordering: merge last
verify-fullrejects.local/install-bincraft.Rinstalls the latest tag, and older releases neither pass a root certificate nor exportpostgres_sslrootcert().Merging early fails every database connection in CI, and since #234 per-minor reindex failures fail the pipeline.
- Switch every `metadata_db_sslmode` passed to bincraft in `.crow/` and `local/` from `require` to `verify-full`. - Pass `sslrootcert = bincraft::postgres_sslrootcert("verify-full")` alongside `verify-full` in the scripts that call `DBI::dbConnect()` themselves, since libpq does not read the system trust store. - Note in the README that the endpoint serves a Let's Encrypt certificate and how to verify it. Part of rpkgs/bincraft#225.