Repository navigation
[M2.2e4c] Finish identity accessibility and document the UI - #75
Merged
Merged
Conversation
5 tasks done
samuelmbabhazi
force-pushed
the
feat/m2.2e4b2-security-browser
branch
from
November 5, 2026 12:42
956a49d to
6c8bdfc
Compare
samuelmbabhazi
changed the base branch from
feat/m2.2e4b2-security-browser
to
main
November 5, 2026 12:42
samuelmbabhazi
force-pushed
the
feat/m2.2e4c-identity-finish
branch
from
November 5, 2026 12:43
9d4a296 to
017b200
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
## Task M2.3a, stacked on #75 (`feat/m2.2e4c-identity-finish`). This is the pure authorization foundation; persistence, HTTP enforcement and organization screens remain tracked separately in PLAN. ## What changed and why Add a default-deny tenant policy implementing SPEC 7 across the closed permission vocabulary. It validates resource hierarchy and scope, rejects unknown roles/capabilities, bounds resource grants to their project/environment, and requires current protection metadata for deploy, secret write and container exec. An explicit environment binding overrides inherited project access; an environment-only grant allows parent navigation but no sibling access or project administration. Add a membership-change policy that prevents organization admins from granting/changing ownership and preserves the last owner. The caller must serialize changes under an organization lock; this pure function does not provide database concurrency protection. Destructive actions still require the separate M2.5 confirmation contract. Split M2.3 into reviewable plan tasks and document conservative defaults in SPEC/Open questions. No HTTP route uses the new policy yet; existing tenant-token capabilities remain denied until the live adapter lands. ## Validation - Test-first suite: 30 tests, including all 19 permissions across five roles, protected environments, absent/foreign membership, malformed contexts, unknown permissions/roles, duplicate bindings, scope inheritance, and ownership changes. V8 reports 100% statements/branches/functions/lines for the policy module. - Workspace lint, typechecks and TypeScript tests pass; API/web builds pass; Go tests and buf lint pass. - No new dependencies, framework imports in domain code, generated-code edits or application shell invocation. ## Security considerations The integration adapter must load current membership, actual resource ancestry and environment protection from the database. A policy allow is neither proof of token scope nor a consumed destructive-action confirmation. No persistence or mutation was introduced, so no new audit event is required in this slice. API enforcement, tenant isolation and concurrent last-owner checks remain explicit follow-up acceptance tasks. ## Checklist - [x] M2.3a acceptance criteria recorded and task checked - [x] Lint, TS tests, Go tests, buf lint and builds pass - [x] Authorization denial and privilege-escalation cases tested - [x] No new secret exposure or application shell execution - [x] SPEC/PLAN updated; no persistence mutation to audit
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.2e4c — identity UI finish review and design-system documentation. Stacked on #74; review this branch against
feat/m2.2e4b2-security-browser. Earlier identity PRs remain unmerged.What changed
The skip link previously resolved against the HTML base URL: activating it from password recovery navigated to login and discarded the typed email. It now focuses and scrolls the current main content without navigating. Two browser scenarios protect this behavior, keyboard validation/MFA controls, and token-table keyboard access after resizing.
Enabled inputs/selects use a separate 3.63:1 boundary against white. A visible, accessible scrolling cue appears whenever the token table exceeds its container, including the tablet layout; ResizeObserver tracks both table and container changes and disconnects on teardown. Structural dividers retain their lighter color.
The implemented interface is recorded in
apps/web/DESIGN.mdand its design preview sidecar. README and PLAN close the identity UI acceptance work on this stack; local review captures are ignored.Why
Keyboard navigation must preserve work, form controls must be visible, and narrow screens must communicate hidden token actions. These changes resolve the two material findings from the independent finish review and the independently reproduced skip-link regression.
How it was tested
9d4a296: TypeScript lint/tests/build, Go lint/tests, generated-code checks, Chromium acceptance, PostgreSQL/Docker integration, and all enabled security checks. CodeQL was skipped by the existing workflow. Design documentation YAML/JSON, token references and links validate; preview snippets were not independently browser-tested.Security considerations
No API, authorization, cookie or persistence contract changes. Browser fixtures use synthetic accounts and hide private fill arguments in diagnostics. No credentials, screenshots, traces or HAR files are committed. Capture-only recovery codes were replaced by an obvious fixed placeholder before inspection. No new dependencies or shell invocation in application code. No new domain mutations require audit events.
Checklist
docs/PLAN.mdare met and the task is tickedbuf lintpass