@davoodmehraban89 / Aram-1 / commits / 8972a76
Fork 0

docs(auth): append scoped-year authorization proof and role-boundary blockers

davoodmehraban89 committed Oct 30, 2026 at 22:29 UTC 8972a763a32cd0e3d07d2391fb6eb2555401923c
1 file changed +9
docs/PROJECT_LOG.md
+9
@@ -358,3 +358,12 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
358 - Test-first initial test SHA `afe380fc0a2236f9eb2cdfce21168a1dbc507bfd`: [RED CI 41109024753](https://github.com/davoodmehraban89/Aram/actions/runs/41109024753) **34 expected 404 route failures, 193 passing tests, 2 warnings**. Auth module/route implementation SHA `c0b6f5df64ae9235683926e1fed661dadb46be67`: [GREEN CI 41109205928](https://github.com/davoodmehraban89/Aram/actions/runs/41109205928) **227 passes, 2 warnings**, migration/compile success. Further synthetic forged-payload/weak-RSA/reviewer-does-not-approve cases at `ad66b06bab27ad61040f7a5b4f8cb81923eaf2da`: [GREEN CI 41109398796](https://github.com/davoodmehraban89/Aram/actions/runs/41109398796) **231 passes, 2 warnings**, migrations and compile successful. **Final documentation-head CI must be checked separately.**
359 - This is **not** identity-provider deployment, token refresh/revocation, JWKS rotation, company/year authorization, author/reviewer separation tied to persisted draft, human approval, immutable signed audit or transactional Mapping apply. Legacy `save_mapping_rule` and Excel import still bypass the future governed path. No source XLSX/PDF, customer DB, `data/`, migrations, workflows, binaries or releases modified. Real C1/C2/C3 reviewers/financial acceptance absent (Issues #49/#39/#43). PR stays Draft/unmerged; Gate 3 0% formal acceptance.
360 - Scope: new auth module/tests, config/main, pyproject dependency, focused spec/plan and append-only log/handoff; no private signing key stored in repository.
361 +
362 +### 2026-10-30 — Gate 3 signed company/year Mapping access, Draft PR #56
363 +
364 +- Continued user-authorized ARAM Gate 3 implementation: [Draft PR #56](https://github.com/davoodmehraban89/Aram/pull/56) on exact **unmerged** parent #55 `8d82f1e7be9653bac467101234a62029bdfa3178`; accepted `source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914` unchanged. Upstream #54/#53/#52/#51/#50/#26 and schema #25 unmerged.
365 +- Addressed serious unscoped role risk: a synthetically RSA-verified `mapping_proposer` or `mapping_reviewer` alone must NOT authorize every financial year. Added optional strict signed JWT `aram_scopes` with exact `Company.code`, fiscal-year business number and role; an absent grant means no year authority. Reject malformed/wildcard/duplicated/overlarge claims, mismatched role, Boolean year, extra keys. For a signed, valid role but wrong company/year return 403 without leaking metadata; invalid signed role claims return 401.
366 +- New read-only `require_year_access` checks signed grant vs latest DB Company/FiscalYear and Draft status. Requeries ORM identity-map with `populate_existing` to see independent DB changes; `no_autoflush` avoids persisting unrelated pending records. `GET /api/v1/auth/year-access/{year_id}` wires real `Depends(require_verified_principal)` and `get_session` as a diagnostic preflight; NO proposal, approve or MappingRule apply mutation.
367 +- Tests-first commit `463b340d9bb5a88837439620e8608bcce98e770e` [RED CI 41110810775](https://github.com/davoodmehraban89/Aram/actions/runs/41110810775): **28 intended failures/231 prior passes**, demonstrating missing scope verification and API; initial code `f9deb416726334b9070ae864632ce38a7aa862cb` [CI 41110973867](https://github.com/davoodmehraban89/Aram/actions/runs/41110973867) **2 failed/257 passed** because negative tests expected 403 for malformed role but correct outcome is 401. Corrected assertions and added explicit direct proposer→reviewer denial test in `59cb141cad81add6523f4fea7a127c8180d080e5`; **exact code-head CI pending**.
368 +- Scope: auth identity module, NEW year authorization module, read-only main route, synthetic tests, focused spec/plan and append-only log/handoff. No real enterprise IdP users or grants configured. No finance approval, persisted proposal-author identity, reviewer/author independence, externally immutable audit, atomic locked CAS apply, Excel bypass closure, production/provider verification or ledger reconciliation. Issues #49/#39/#43 and real C1/C2/C3 review remain blockers; no merge/release.
369 +- Tests only on disposable SQLite and synthetic RSA signing keys; no canonical XLSX/PDF, `data/`, customer/production DB, migration, dependencies, workflow or accepted branch changes. A successful year-access check does NOT authorize eventual finance posting or skip same-transaction revalidation.