Repository navigation
[M2.3c3c1] Authorize and audit project and environment settings - #87
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.3c3b2-organization-commands
branch
from
November 5, 2026 12:48
e92e7fc to
80420d3
Compare
samuelmbabhazi
force-pushed
the
feat/m2.3c3c1-project-environment-commands
branch
from
November 5, 2026 14:44
3aaebca to
7abed80
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## Task M2.3c3c2, stacked on #87. Review in order; do not merge automatically. ## What changed and why Add account-bound organization discovery, tenant-filtered project/environment catalogs and authorized detail queries. Membership and resource grants are filtered in SQL before the page limit: a member with access only to the oldest environment still sees its parent project on the first page. Environment-only access never exposes siblings. Queries recheck active/verified account and security version under the account lock. Catalogs use descending UUID order, exclusive range cursors and a maximum/default page size of 100. Arbitrary cursors never trigger a cross-tenant existence lookup. Detail queries apply the same live authority and ancestry rules as commands. ## How it was tested - Six real restricted-PostgreSQL acceptance tests pass with 101 projects: account discovery, owner/admin pagination, project/environment grants, parent navigation, role removal, wrong ancestry, stale/disabled accounts and malformed bounds. - Query application coverage: 97% statements, 90% branches, 100% functions and lines. - API lint, typecheck, 103 unit tests and production build pass. - Existing full integration, web/domain, Go and protobuf checks passed in preceding slices; CI runs the expanded full integration and browser suites. ## Security considerations Every resource predicate includes its tenant and environment parent. Filtering happens before pagination; no credential or membership detail is returned. Account and tenant RLS modes stay mutually exclusive and context is cleared before pooled connection reuse. This read-only slice adds no state mutation, shell invocation or dependency. CodeQL remains skipped by repository configuration; enabled security checks run in CI. ## Checklist - [x] M2.3c3c2 acceptance met; PLAN/SPEC updated - [x] Local checks and new PostgreSQL acceptance pass - [x] Cross-tenant, pagination and live-authority cases covered - [x] No mutation needing an audit event - [x] No secrets or generated artifacts edited manually
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
…111) ## What changed The PLAN now states what remains after the post-merge audit of PRs #30 to #110. - **New status section.** It covers: - what is done; - the verification gap: CI has been blocked by billing since #87, so integration, browser, CodeQL and gosec runs are missing. New task CI-1 reruns them first; - the next tasks in dependency order; - previously unowned work, now assigned to tasks; - the decisions waiting for the maintainer. - **M1.2 and M1.2b ticked.** Their acceptance is met. The join-token REST endpoint, node list/revoke and the install command with the CA fingerprint move to a new task, **M2.7**, which depends on M2.3d and M2.3g1. - **New splits:** - M1.4a/b/c (action dispatch over `Connect` becomes M1.4a); - M2.3f1/f2 and M2.3g1/g2. M2.3g1 records that `node_certificates` lacks `organization_id` and needs an ADR; - M2.4a/b (partly done: append-only grants and their test exist); - M2.5a/b. - **Stale M2.3 bullet removed.** Live owner authorization for API tokens was delivered in M2.3d2. - **M2.6 marked partly done** by M2.2e. The SSE endpoint is assigned to it. - **`ExecStream`, `CollectFacts`, `UpgradeAgent` and retry-safe renewal** are assigned to M6.1, M1.6, M8.3 and M4.5. - **SPEC 4.** It now names the `public` schema actually used, instead of `shipkeep`. - **SPEC 16.** New open question on confirmation tokens for in-place `RestoreVolume`/`RestoreDatabase`. This would change the action list, so the maintainer decides. ## How it was tested Docs only. Prettier and the local gate pass. ## Security considerations None in code. The document records a missing confirmation requirement and an unapproved license (`argparse`, PSF-2.0) as maintainer decisions.
This was referenced Nov 5, 2026
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.3c3c1, stacked on #86. Review in stack order; do not merge automatically.
What changed and why
Add project and environment creation/settings commands with live tenant authorization under the caller's account lock. New resources default to pull-request writes, protected environments and no failover. Settings replacement accepts only normalized fields and preserves resource ownership. Resource writes and their audits commit or roll back together.
Project slugs are unique within an organization and environment names within a project. Concurrent collisions and conflicting renames return fixed resource-name errors. Environment-only administrators cannot change their parent project or create sibling environments. No resource deletion or HTTP endpoint is exposed in this slice; catalogs and HTTP wiring follow in M2.3c3c2/d.
How it was tested
Security considerations
Live scope checks precede writes within the same account/tenant transaction. Updates always include organization and parent-project predicates. Audit metadata contains supported settings only. No new dependency, shell invocation or credential exposure. CodeQL remains skipped by repository configuration; enabled security jobs run in CI.
Checklist