Repository navigation
[M2.3c3b1] Reauthenticate account mutations and bind session rotation to proof - #85
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3c3a-resource-settings-policy
branch
from
November 5, 2026 12:47
7d52609 to
773de1a
Compare
samuelmbabhazi
changed the base branch from
feat/m2.3c3a-resource-settings-policy
to
main
November 5, 2026 12:47
samuelmbabhazi
force-pushed
the
feat/m2.3c3b1-account-mutation-authority
branch
from
November 5, 2026 12:48
2c74fad to
f7d7a56
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
…auditing (#86) ## Task M2.3c3b2, stacked on #85. Review in order; no automatic merge. ## What changed and why Creating an organization now requires fresh password/configured MFA proof and commits its initial owner membership, ownership audit and security-version/session rotation together. Live owners/admins can update organization settings; removed memberships, outsiders and stale sessions fail closed. Globally occupied slugs return a fixed conflict without disclosing tenant metadata. Preserve translated domain errors when a failed SQL statement also prevents transaction-context cleanup. This keeps a rename collision a stable conflict while rolling back its writes. Successful operations still fail if context cleanup fails. These are application commands. Protected HTTP routes and the administration UI follow in M2.3d/f; no destructive resource endpoint is introduced. ## How it was tested - Six new real-PostgreSQL tests run under the restricted runtime role: ownership/session rotation, invalid proof/input, role isolation, concurrent slug creation, rename rollback and failures of both ownership/session audits. - Full PostgreSQL integration suite: 154 tests pass. - New application commands: 100% statement/branch/function coverage; commands plus repository: 94% statements, 83% branches, 100% functions. - API/web/domain lint, typechecks, tests and builds pass; Go tests and buf lint pass. - HTTP unit tests require local sockets and pass with that permission; their initial sandboxed attempt returned EPERM. ## Security considerations Account locks serialize mutations against identity changes. Ownership cannot be supplied through input. Row isolation and explicit tenant predicates protect the commands. Audit or rotation failure rolls back all related state. No new dependency, shell invocation or secret exposure path. CodeQL remains skipped by repository configuration; enabled security checks run in CI. ## Checklist - [x] M2.3c3b2 acceptance met and PLAN/SPEC updated - [x] Local lint, TypeScript/Go tests and buf lint pass - [x] Invalid input, concurrency, tenant isolation and rollback tested - [x] Every new mutation emits an atomic audit event - [x] No secret or generated artifact edited manually
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.
Resource commands need to recheck the caller under the same account lock as password resets and permission changes. This adds a public identity boundary for those commands, including password/MFA reauthentication and session rotation restricted to the same authenticated callback and security version.
The callback joins the existing transaction: a failed business write or audit rolls back proof consumption, session revocation and rotation together. No new HTTP endpoint is exposed. Organization commands follow in M2.3c3b2.
Base: #84. Please review in stack order; do not merge automatically.
Validation:
Security: no password hash or MFA secret is exposed to resource commands; rotation requires fresh proof bound to this request and account/version. No new shell invocation or credential logging path.