[P0] F05: Enforce centralized authorization and bounded revocation across protected operations #10

Open
opened 2026-10-21 20:29:24 +02:00 by amiryahaya · 0 comments
Owner

Backlog ID: F05 | Priority: P0 | Phase: M1 — Secure build and persistence foundation

Outcome and scope

Wire the policy decision interface into request/use-case boundaries and version/freshness handling. Supply reusable enforcement for reads, searches, citations, history and administration.

Dependencies and gates

Engineering prerequisites: #7 (F02), #9 (F04)

Synthetic policy matrix is actionable; production semantics and measured SLA depend on approved D01 decisions.

Starting points

crates/authorization/; crates/api/src/middleware/; 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

  • Policy/identity unavailability, timeout, unknown decisions and synchronization uncertainty fail closed.
  • Tests cover clearance, all required compartments, organization, need-to-know, action, status and approved environmental conditions; administrator roles alone do not read protected content.
  • Policy/grant/document revocation invalidates access within the approved maximum; stale broad claims or caches cannot preserve access.
  • Forbidden/absent resources expose equivalent authorized-view behavior without IDs, titles, counts, pagination or detailed denial leakage.

Verification

Run table/property tests and HTTP boundary tests with stale policy, cross-org IDs and dependency failure. Measure revocation propagation against D01’s approved SLA.

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-002–008; NFR-SEC-001; architecture §6

Sources: SRS, system design. Local planning context: docs/implementation-plan.md and docs/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

**Backlog ID:** F05 | **Priority:** P0 | **Phase:** M1 — Secure build and persistence foundation ## Outcome and scope Wire the policy decision interface into request/use-case boundaries and version/freshness handling. Supply reusable enforcement for reads, searches, citations, history and administration. ## Dependencies and gates **Engineering prerequisites:** #7 (F02), #9 (F04) Synthetic policy matrix is actionable; production semantics and measured SLA depend on approved D01 decisions. ## Starting points crates/authorization/; crates/api/src/middleware/; 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 - [ ] Policy/identity unavailability, timeout, unknown decisions and synchronization uncertainty fail closed. - [ ] Tests cover clearance, all required compartments, organization, need-to-know, action, status and approved environmental conditions; administrator roles alone do not read protected content. - [ ] Policy/grant/document revocation invalidates access within the approved maximum; stale broad claims or caches cannot preserve access. - [ ] Forbidden/absent resources expose equivalent authorized-view behavior without IDs, titles, counts, pagination or detailed denial leakage. ## Verification Run table/property tests and HTTP boundary tests with stale policy, cross-org IDs and dependency failure. Measure revocation propagation against D01’s approved SLA. 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-002–008; NFR-SEC-001; architecture §6 Sources: [SRS](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/SRS.md), [system design](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/architecture.md). Local planning context: `docs/implementation-plan.md` and `docs/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
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
primatekuntech/rag-rust#10
No description provided.