Repository navigation
[M2.3d3a] Expose scoped organization resource catalog endpoints - #102
Merged
Merged
Conversation
4 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3d2b-resource-token-authority
branch
from
November 5, 2026 14:57
32f3990 to
6186b55
Compare
samuelmbabhazi
changed the base branch from
feat/m2.3d2b-resource-token-authority
to
main
November 5, 2026 14:58
samuelmbabhazi
force-pushed
the
feat/m2.3d3a-resource-read-http
branch
from
November 5, 2026 14:59
4215823 to
2b6bed4
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## 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 - API lint, typecheck, build and 155 unit/HTTP tests pass, including 28 allowed/malformed retry-route cases. - 24 PostgreSQL retry/identity/MFA/token HTTP tests pass; the six new resource-retry scenarios were rerun after adjusting the test handler metadata. - New cases cover concurrent execution once, encrypted snapshots, body/credential-kind/token-id conflicts, revocation, live role loss for both sessions and tokens, account-version invalidation, undeclared retries and resource/audit rollback on retry persistence failure. - Semgrep reports zero findings across all five changed retry implementation/test files, with complete parsing. - Parent checkpoint passed 207 integration tests, eight Chromium scenarios, Go tests and protobuf lint; resource read HTTP acceptance passed in #102. ## 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 - [x] M2.3d3b acceptance met; PLAN/SPEC updated - [x] Local checks and real PostgreSQL acceptance pass - [x] Concurrency, credential boundaries and rollback covered - [x] Human review required; do not merge automatically
5 tasks done
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
… enrollment errors (#109) ## Task Review follow-ups for #90, #91 and #102, plus two rule-audit items. Refs #22 ## What changed **No directory oracle (#90, #91)** - `AccountMutationAuthority.confirmPassword()` checks the caller's password without locks. - `MembershipCommands.add` and `BindingCommands.assign` call it before answering `resource_not_found` for an unknown address. An unknown account and a wrong password now give the same 401, so these commands cannot list the instance's verified accounts or an organization's members. The success path still pays one Argon2id verification. **Environment overrides (#91)** - An administrator of a single environment can no longer create or remove an environment override for a member who administers the whole project. Before, the project admin could not undo such a restriction. - Project admins and organization owners/admins are unaffected. **Explicit response fields (#102)** - `resourceDto` spread whole store rows into responses. It is replaced by `organizationDto`, `projectDto`, `environmentDto`, `memberViewDto` and `bindingViewDto`, which list every field. A future column cannot reach session or bearer clients without a DTO change. - The HTTP test asserts the exact key sets for project and environment details. **Rule audit items** - The agent's enrollment error keeps its gRPC code (wrapped with `%w`) and still drops the remote text. Its test fails without the fix (`Unknown`). - An `eslint-disable` gains its justification. - SPEC: directory lookup ordering, the environment-override rule (section 7), and bearer status codes (401 for bad tokens or token-less routes, 403 for scope gaps checked before any lookup, so nothing leaks). ## How it was tested - Local gate on the branch: lint, typecheck, unit tests and build for all projects; go vet, go test and golangci-lint; no generated-code drift; Semgrep and Prettier. - New integration tests: same 401 for unknown and existing accounts on membership add and binding assign; environment admin refused on a project admin, owner allowed. - CI is unavailable (account spending limit), so integration tests did not run. ## Checklist - [x] Local gate passes - [x] Tests added - [x] No new shell invocation and no new secret exposure path - [x] Audit events unchanged (refused commands write nothing) - [x] SPEC updated
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.3d3a, stacked on #100. Review in order; no automatic merge. Resource mutation retries and write endpoints follow in M2.3d3b/c.
What changed and why
Expose six GET endpoints for organization discovery and nested organization/project/environment catalogs and details. Session catalogs retain live SQL filtering before bounded cursor pagination. Detail endpoints additionally accept the matching scoped API token. Path DTOs require canonical UUIDv7 ancestry; collection queries reject unknown fields and malformed pagination.
Responses contain explicit settings and ISO timestamps. OpenAPI and the TypeScript client are generated from the controllers. API quotas apply to session reads; bearer requests keep the quota already consumed by authentication instead of being counted twice.
Validation
Security considerations
Resource parameters come only from the validated route and are checked against current tenant state. Collection endpoints cannot broaden a bearer token's visibility. No resource mutation, new dependency, shell invocation or secret exposure path.
CI execution blocked
GitHub currently 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