Skip to content

[M2.3c3a] Validate tenant settings and scope configuration permissions - #84

Merged
samuelmbabhazi merged 1 commit into
mainfrom
feat/m2.3c3a-resource-settings-policy
Nov 5, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
feat/m2.3c3a-resource-settings-policy

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

Task

M2.3c3a, stacked on #83 (feat/m2.3c2b2-live-tenant-access).

What changed and why

Add pure normalization/validation for organization, project and environment settings. Bound Unicode display names, reject control/format/unpaired-surrogate characters, require canonical lowercase slugs and accept only supported configuration enums and boolean protection. Defaults remain pull-request writes, protected environments and no automatic failover. Normalized values are immutable and include only explicitly supported fields.

Add explicit organization/project/environment update capabilities to the role matrix and generated API contract. Organization settings require an organization administrator; project/environment settings require administration of the corresponding scope. Tighten UUID validation to reject a terminal newline that JavaScript's dollar anchor otherwise accepts.

Validation

  • 83 domain tests pass, including 24 setting tests and the full five-role matrix for all 22 permissions.
  • New settings and tenant policy have 100% statement/branch/function coverage.
  • 34 targeted PostgreSQL tests pass for tenant schema/isolation/discovery/live authority and API-token HTTP behavior. The full 143-test integration suite passed immediately before this pure-policy slice.
  • API/web/domain lint, typechecks, tests and builds pass. OpenAPI and the TypeScript SDK were regenerated. Go tests and buf lint passed earlier in this session; their sources are unchanged.

Security considerations

No command or settings endpoint is exposed in this slice; audited persistence follows in M2.3c3b/c. Inputs cannot inject ownership fields, coerce protection from a string, widen settings permissions or silently enable failover. No new dependency, shell invocation or secret is introduced.

Checklist

  • M2.3c3a policy/defaults acceptance and malicious inputs covered
  • Domain coverage, workspace checks and targeted integrations pass
  • SPEC/PLAN and generated contract updated
  • No new application mutation requiring an audit event

@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.3c2b2-live-tenant-access branch from fa90cb8 to dc34813 Compare November 5, 2026 12:47
@samuelmbabhazi
samuelmbabhazi changed the base branch from feat/m2.3c2b2-live-tenant-access to main November 5, 2026 12:47
@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.3c3a-resource-settings-policy branch from 7d52609 to 773de1a Compare November 5, 2026 12:47
@samuelmbabhazi
samuelmbabhazi merged commit a97cb98 into main Nov 5, 2026
10 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the feat/m2.3c3a-resource-settings-policy branch November 5, 2026 12:47
samuelmbabhazi added a commit that referenced this pull request Nov 5, 2026
… to proof (#85)

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:
- All 148 PostgreSQL integration tests pass, including five new
restricted-role cases for stale/disabled callers, password-reset races,
proof isolation and rollback.
- The new application boundary has 100% statement, branch and function
coverage in the targeted PostgreSQL run.
- API lint, typecheck, unit tests and production build pass.
- Existing full-workspace, Go and protobuf checks remain covered by the
preceding stack and CI.

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.

- [x] M2.3c3b1 acceptance and documentation updated.
- [x] New behavior and concurrency/rollback paths tested.
- [x] State changes retain the existing transactional audit path.
- [x] No secrets or generated artifacts edited manually.
- [x] Enabled CI/security checks complete (CodeQL remains skipped by
repository configuration).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant