feat(security): auth-gate cluster routes, enforce GRANT/REVOKE, cap decompression, redact credentials - #102
Merged
Conversation
austin-barrington
commented
Jul 10, 2026
Member
- Gate /internal/replicate and raft cluster routes behind auth middleware ([CRITICAL] Raft/cluster routes mounted outside auth — unauthenticated cluster takeover #92, [HIGH] /internal/replicate disables body limit — unauthenticated memory exhaustion #95)
- Enforce per-database GRANT/REVOKE for non-admin users (V1 [SEC] GRANT/REVOKE are no-ops — false sense of security #72, V1 [SEC] Per-database authorization check is vestigial — no actual enforcement #77)
- Cap gzip decompressed body size to prevent decompression bombs ([HIGH] gzip decompression bomb on /write — no decompressed-size cap #93)
- Require auth on statement summary endpoint, redact passwords in ring buffer (V1 [SEC] Statement summary endpoint is unauthenticated #75, V1 [SEC] Passwords exposed in statement summary ring buffer #76)
- Replace hand-rolled base64 decoder with base64 crate ([LOW] Security hardening — miscellaneous low-severity findings #96)
- Validate IPC segment lengths in WAL decode to prevent OOM
- Escape backslashes in backtick-quoted identifiers
- Add configurable replicate body limit with auto-resolution
- Add security integration tests for auth gating and privilege enforcement
- Update authentication, configuration, and replication docs
…ecompression, redact credentials - Gate /internal/replicate and raft cluster routes behind auth middleware (#92, #95) - Enforce per-database GRANT/REVOKE for non-admin users (#72, #77) - Cap gzip decompressed body size to prevent decompression bombs (#93) - Require auth on statement summary endpoint, redact passwords in ring buffer (#75, #76) - Replace hand-rolled base64 decoder with base64 crate (#96) - Validate IPC segment lengths in WAL decode to prevent OOM - Escape backslashes in backtick-quoted identifiers - Add configurable replicate body limit with auto-resolution - Add security integration tests for auth gating and privilege enforcement - Update authentication, configuration, and replication docs
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.