Repository navigation
[M2.3d3b] Reauthorize encrypted resource retry results - #104
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3d3a-resource-read-http
branch
from
November 5, 2026 14:59
4215823 to
2b6bed4
Compare
samuelmbabhazi
changed the base branch from
feat/m2.3d3a-resource-read-http
to
main
November 5, 2026 14:59
samuelmbabhazi
force-pushed
the
feat/m2.3d3b-resource-retry-authority
branch
from
November 5, 2026 15:00
285bf96 to
69c7c35
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## Task M2.3d3c1, stacked on #104. Review in order; no automatic merge. Project/environment write endpoints follow in M2.3d3c2. ## What changed and why Expose session-only organization creation with fresh password/MFA proof and atomic ownership/session rotation. Return organization and public session metadata; credentials are delivered only through cookies. Settings updates accept authorized sessions or explicitly scoped organization-update tokens. Both routes use the encrypted retry boundary. A small local interceptor delegates to the exported identity instance so Nest resolves its private storage/authentication providers within IdentityModule. Shared mutation decorators document Origin/CSRF, quotas and idempotency consistently for upcoming resource routes. OpenAPI and the TypeScript client are regenerated. ## Validation - API/web/client typechecks, tests and builds pass; lint passes after tightening the test header types. API has 155 unit/HTTP tests. - Five restricted-PostgreSQL HTTP scenarios pass: ownership/rotation and metadata-only output, Origin/CSRF/password/MFA checks, scoped bearer settings and replay conflicts, malformed settings/slug conflicts, and full rollback with no cookies on audit or retry-storage failure. - Real Nest module boot verifies the cross-module interceptor delegation. - Semgrep reports zero findings across the seven organization interface/test files, with complete parsing. - The prior full checkpoint passed 207 integration tests, eight Chromium scenarios, Go tests and protobuf lint; subsequent read/retry slices passed their focused suites. ## Security considerations Organization creation invalidates prior sessions and version-bound API tokens. Replays with a different account version conflict; clients recover an uncertain creation through authenticated organization discovery. Settings take ownership only from the path. Passwords/MFA proof stay write-only, and failure assertions avoid printing cookie values. No new dependency, shell invocation or destructive endpoint. ## CI execution blocked GitHub refuses to start jobs because of failed recent account payments or an insufficient spending limit. Resolve Billing & plans and rerun CI before treating remote validation as complete. CodeQL remains separately disabled by repository configuration. ## Checklist - [x] M2.3d3c1 acceptance met; PLAN/SPEC updated - [x] Generated contract/client committed without manual edits - [x] Local checks and real HTTP/PostgreSQL acceptance pass - [x] New state changes audited atomically with credentials/retries - [x] Human review required; do not merge automatically
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.
Task
M2.3d3b, stacked on #102. Review in order; no automatic merge. Creation/settings controllers follow in M2.3d3c.
What changed and why
Extend encrypted retries to a closed set of canonical organization/project/environment creation/settings paths. Expose the identity HTTP interceptor through its module so resource controllers reuse the existing transactional request/result store.
Authenticated fingerprints now distinguish sessions from API tokens and bind the exact token id. Before returning a cached resource result, recheck the account version, exact credential and current route permission. This happens after any wait for retry storage and only on replay, preserving the actor/subject lock ordering inside privilege-changing commands.
Validation
Security considerations
No cached response bypasses current resource authority. Route allowlisting excludes deletion and arbitrary paths. The resource command, audit and encrypted snapshot share one transaction. An unsuccessful transaction sends no result cookie. No new dependency, shell invocation or plaintext credential storage.
CI execution blocked
GitHub refuses to start jobs because of failed recent account payments or an insufficient spending limit. Resolve Billing & plans and rerun CI before treating remote validation as complete. CodeQL remains separately disabled by repository configuration.
Checklist