fix(security): pin PostgreSQL credential destinations - #580
Open
dviejokfs wants to merge 1 commit into
Open
Conversation
📓 Changelog previewThis is what your commits will add to the generated ## [Unreleased]
### Fixed
- **security:** Harden postgres credential transport |
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.
Summary
hostaddracross the TLS ladder while preserving the original hostname for certificate verification and SNINoTlsfallback with typed configuration and a private-only credential transport policysslmode=requireSecurity properties
SslMode::Require; only the explicit pinned private rung can use cleartextnodehostandnodeportnever authorize a credential destinationtokio_postgres::Config, not connection-string syntaxIndependent
security-auditorreview: APPROVED, with no remaining findings for either issue or the adjacent cluster-health credential path.Evidence
DNS authorization and dialing use the same pinned addresses
cargo test -p temps-query-postgres connection_config_pins_every_preapproved_address -- --nocaptureConnection-string injection text remains credential data and TLS stays required
cargo test -p temps-query-postgres connection_config_treats_credentials_as_values_and_requires_tls -- --nocaptureManaged cluster credentials reject public destinations before connecting
cargo test -p temps-query-postgres private_ladder_rejects_a_public_address_before_connecting -- --nocaptureForged monitor identities cannot authorize unstored, monitor, stopped, or ambiguous members
cargo test --lib -p temps-providers monitor_primary_identity_cannot_authorize_an_unstored_endpoint -- --nocaptureCrate suites
Build and lint gates
Closes #560
Closes #561