[P0] F02: Complete typed security values and policy-owned authorization contracts #7
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#8 [P0] F03: Wire PostgreSQL migrations, bounded pooling and canonical repositories
primatekuntech/rag-rust
#9 [P0] F04: Integrate trusted identity, secure browser sessions and development-only identity
primatekuntech/rag-rust
#10 [P0] F05: Enforce centralized authorization and bounded revocation across protected operations
primatekuntech/rag-rust
#15 [P1] E01: Define bounded AI Engine contracts and shared adapter test suites
primatekuntech/rag-rust
#6 [P0] F01: Complete the reproducible Rust/React baseline and CI checks
primatekuntech/rag-rust
Reference
primatekuntech/rag-rust#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Backlog ID: F02 | Priority: P0 | Phase: M1 — Secure build and persistence foundation
Outcome and scope
Extend the existing policy skeleton with domain-owned identifiers, security markings, request context, freshness/version metadata, explicit actions and policy-owned AuthorizedSearchScope. Document interface invariants before adapters consume them.
Dependencies and gates
Engineering prerequisites: #6 (F01)
Synthetic-data development may proceed. Production use remains subject to the decision gates in the SRS.
Starting points
crates/domain/src/; crates/authorization/src/; crates/authorization/tests/
These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion.
Acceptance criteria
Verification
Red/green tests exercise unknown labels, lexical-order traps, malformed scope, stale snapshots, missing org and compartments; shared contract tests cover permit and deny matrices.
Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence.
Requirements and design
FR-AUTH-003–005, 009; NFR-MAINT-001–003; architecture §§5.3, 6
Sources: SRS, system design. Local planning context:
docs/implementation-plan.mdanddocs/development-backlog.md(not published by this task).Security impact: Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue.
Parent roadmap: #1
Implementation status
Implemented in draft PR #38 on
feat/7-security-contracts, head1ec1176. All four acceptance criteria are verified. Push CI #4 and PR CI #5 passed both Rust/web jobs. Local fmt/Clippy, 17 behavioral test functions (including shared permit/deny matrices), six compile-fail checks and frontend typecheck/build passed.Independent review found no current authorization bypass. Its adapter-test coverage finding was addressed by placing rank, scope constraints, lifetime, ownership and grant invariants in reusable
&dyn PolicyDecidercontract helpers. Organization/tenant semantics are one mandatory exact partition; missing organization denies rather than widening scope.The focused plan is
docs/superpowers/plans/2026-10-22-security-contracts.mdand interface obligations are incrates/authorization/README.mdon the PR branch. Production identity/revocation and actual PostgreSQL/Qdrant filter implementations remain later issues. Keep this issue open pending review and merge.Implementation started on
feat/7-security-contractsfrom merged main. Added validated domain identifiers, rank-free classifications, mandatory exact organization scope, typed validity/markings/actions, private verified identity promotion and policy-issued request-scoped search constraints. Red/green tests cover malformed attributes, stale/future snapshots, rank traps, all required grants, resource policy/status, deadlines and scope lifetime/ownership. Local workspace checks and frontend build pass; independent review and hosted CI are next. Production identity/revocation and real storage filters remain in F04/F05 and storage issues.