Repository navigation
[M2.3d3c1] Expose audited organization mutation endpoints - #105
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3d3b-resource-retry-authority
branch
from
November 5, 2026 15:00
285bf96 to
69c7c35
Compare
samuelmbabhazi
changed the base branch from
feat/m2.3d3b-resource-retry-authority
to
main
November 5, 2026 15:01
samuelmbabhazi
force-pushed
the
feat/m2.3d3c1-organization-write-http
branch
from
November 5, 2026 15:02
522b82f to
f060e90
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## Task M2.3d3c2, stacked on #105. Review in order; no automatic merge. ## What changed and why Expose project/environment creation and settings through the existing account-locked, audited commands. Each route requires its exact permission and canonical path ancestry, for sessions and explicitly scoped API tokens. Creation returns 201 and settings replacement returns 200. Omitted options retain the documented safe defaults; nulls, ownership injection and malformed values are rejected. All four routes share encrypted mutation retries, session Origin/CSRF checks and single-count API quotas. Regenerate OpenAPI and the TypeScript client, and mark the resource HTTP slice complete in PLAN. ## Validation - API lint, typecheck, build and 155 unit/HTTP tests pass. - Five restricted-PostgreSQL HTTP scenarios pass: defaults and retry audit-once behavior; project/environment admin and viewer rights; scoped bearer mutations and sibling denial; malformed input/ancestry/CSRF; rollback of every write and audit when retry storage fails. - Web and generated client lint/typechecks/tests/builds pass. - Semgrep: zero findings, all four changed TypeScript files fully parsed. - Prior full checkpoint: 207 PostgreSQL integration tests, eight browser scenarios, Go tests and protobuf lint passed. Later HTTP/retry slices have focused acceptance coverage. ## Security considerations Ownership comes only from the validated path. Commands recheck current authority under the account lock, and audits identify the authenticated user or exact API token. No destructive resource endpoint, new dependency, shell invocation or secret response is introduced. ## CI execution blocked GitHub currently refuses to start jobs because of failed recent account payments or an insufficient spending limit. Billing & plans must be resolved and workflows rerun before remote validation is complete. CodeQL is separately disabled by repository configuration. ## Checklist - [x] M2.3d3c2 acceptance and PLAN/SPEC updated - [x] Generated contract/client committed without manual edits - [x] Local checks and real HTTP/PostgreSQL acceptance pass - [x] State changes audited atomically with retry storage - [x] Human review required; no automatic merge
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.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
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