Repository navigation
Add PostgreSQL Policy Guard and multi-database discovery adapters - #30
Draft
Agata-Proxima wants to merge 543 commits into
Draft
Agata-Proxima wants to merge 543 commits into
Agata-Proxima wants to merge 543 commits into
Conversation
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
Adds the Engine-side PostgreSQL Policy Guard work and establishes the database-independent adapter boundary for Proxima Security Core.
Database-independent core
DatabaseAdaptertrait and registry for native inspection, policy compilation, verification and drift detection.proxima.security.v1Rust policy model with unknown-field rejection, schema-aligned length limits, NUL rejection and duplicate-resource/operation checks.scope: engine_runtime.PostgreSQL Policy Guard CLI
PROXIMA_TENANT_ROLE_PREFIXplus normalized verified tenant ID; arbitrary per-tenant role aliases are rejected and the required prefix is printed in generated SQL.search_pathdefaults.Runtime tenant-session guard
set_configcalls, DO/CALL, TRUNCATE, DDL, mutablesearch_path/SCHEMA settings and startup overrides.Safety boundary
Validation
Unit tests were added for policy validation, SQL generation, identifier escaping/limits, role mapping, owner bypass, startup restrictions and SQL guard behavior. No build or test command was run in this authoring session. GitHub Actions were not triggered because CI minutes are unavailable. Local acceptance is the next step.
Post-review hardening
The PR remains a draft. No build, test suite, live database acceptance, or GitHub Actions workflow was run; owner-run local acceptance remains required.
Multi-database policy-plan and evidence work added after the initial review
proxima-policy-guard compile-planfor those five database families. The command emits reviewable JSON and does not connect to a database or execute changes.Remaining implementation and acceptance gates
Implementation-state audit: docs/IMPLEMENTATION_AUDIT_2026-11-17.md. It records which adapters have native discovery versus policy compilation, which enforcement capabilities remain absent, that generic evidence primitives are not all wired into runtime/Cloud, and that local acceptance is outstanding.
Production adapter registry gate
The Engine registry now rejects adapters unless maturity is supported and all eight end-to-end capability flags are true. Unit tests cover rejection of review-only/partial descriptors and acceptance of a complete descriptor. The gate prevents accidental registration; it does not implement or promote any database adapter.
PostgreSQL runtime admission and observability integration — 17 November 2026
ReadyForQueryis released, and into five-second active-session rechecks.PolicyEvidenceAuthorityenvelope remains a separate library primitive; the PostgreSQL path currently consumes the Cloud's node-key-signed decision/evidence format. Independent positive and cross-tenant negative data probes remain an acceptance gap.No Rust build, tests, live PostgreSQL test or GitHub Actions workflow was run. Keep this PR draft until owner-run local and adversarial acceptance is complete.
Additional native discovery adapters — 17 November 2026
in_development; their verification paths deny admission. No Rust build, unit tests, live database acceptance or CI workflow was run. Keep this PR draft.