fix(security): require signed tenant claims on admin endpoints - #268
fix(security): require signed tenant claims on admin endpoints#268seonghobae wants to merge 53 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
@opencode-agent Rebuild this stacked PR cleanly on authoritative parent #270 exact head Preserve only the bounded administrative-authorization slice represented by the current 31-file diff: signed-claim verification, least-privilege Use a clean parent-based branch history or replace the current branch only after the complete tree is ready. Run the strongest available local |
|
@opencode-agent @cwl-noema-review Review exact stacked head Manual review found that both Keep Draft. Parent #270 must integrate first; then this branch must be reconciled onto protected |
|
@opencode-agent Parent update: rebuild the tenant-scoped administrative authorization slice directly on #270 exact head |
|
@opencode-agent @cwl-noema-review Rebuild this draft as a clean descendant of authoritative parent #270 exact head Fresh GitHub comparison shows current head Reconcile shared Implement test-first, run the strongest available |
Security objective
Make every administrative conversion-job endpoint fail closed under signed tenant claims, least-privilege permissions, tenant-scoped persistence queries, atomic tenant-scoped mutations, tenant-bound secondary indexes, and privacy-safe audit evidence.
This draft supersedes closed #266 and is stacked on authoritative privacy-and-Netty parent #270 through base branch
fix/pii-logging-16240128950440010639. Administrative audit evidence reuses the parent's dedicated keyed pseudonymization contract.Security boundary
admin:readfor tenant-scoped listing andadmin:writefor delete and retry;503before repository access when the signed-claim HMAC verifier is absent or shorter than 32 UTF-8 bytes;findAllByTenantIdbefore job objects cross the repository/service boundary;TenantContextinto delete and retry service mutations;deleteByTenantAndIdandretryDeadLetteredForTenantcontracts whose adapter defaults fail closed without global lookup or legacy mutation;X-Clearfolio-*headers.Test-first evidence
The branch contains deterministic regressions for tenant-scoped query boundaries, fail-closed compatibility adapters, atomic mutation ordering, every retry outcome, UUID collision and stale-index behavior, same-UUID replacement races, monitor contention, cross-tenant concealment, and privacy-safe audit logging.
The latest bounded repair added
InMemoryConversionJobRepositoryMissingIdentifierTestbefore production changes. A Java 21 exact-source probe proved scoped lookup, delete, and retry previously threwNullPointerExceptionfor a missing job UUID. The production contracts now return empty,false, orNOT_FOUNDand leave an existing owned job untouched. The temporary RED workflow is absent, and authoritative security documentation plusCHANGELOG.mdrecord the behavior.Exact-head and stack status
Exact current head is
808e57d6006f1ac332e98ec32d7c156ded4f48dd. Authoritative parent #270 is now exact head26563218ae42eaa876c784fcf56b27f8cb810080.A fresh GitHub comparison reports this branch as diverged, 53 commits ahead and 84 commits behind the parent, with merge base
5261356ac34e6545bce947ba0bcf2b1ce9f9be67. The current tree therefore is not merge evidence. No pull-request-triggered GitHub Actions acceptance run exists for this exact head; the successful CodeRabbit commit status is not a substitute for CI, security, formal review, or independent approval.Required reconciliation
Rebuild the bounded 31-file administrative-authorization slice as a clean descendant of parent exact head
26563218ae42eaa876c784fcf56b27f8cb810080. Preserve the parent's privacy, Netty, deterministic SBOM/attribution, exact-head, zero-coverage-miss, warning-free Javadoc, and fail-closed Maven report-evidence contracts. Reconcile sharedCHANGELOG.md,AuditPseudonymizer.java, andAuditPseudonymizerTest.javarather than overwriting parent evidence. Do not add temporary workflows, repair scripts, unrelated dependencies, release changes, or predecessor-parent files.Merge order and gate
Keep this PR draft. Parent #270 must become stable, pass every exact-head gate, receive counted independent approval, and integrate first. Then reconcile this bounded administrative change onto the resulting protected
mainand require fresh exact-head Mavenverify, zero missed production lines and branches, warning-free public Javadocs, CI, Security Scan, SAST, every required fuzz job, CodeRabbit, Strix/OpenCode/Noema review, zero unresolved threads, a counted independent write-authorized approval, and every repository protection. Do not manufacture checks by temporary retargeting, use legacy mutation fallbacks, weaken tests, or bypass branch protection.