Skip to content

[M2.3-fix] Review follow-ups for memberships, bindings, responses and enrollment errors - #109

Merged
samuelmbabhazi merged 3 commits into
mainfrom
fix/m2.3-review-follow-ups
Nov 5, 2026
Merged

samuelmbabhazi merged 3 commits into
mainfrom
fix/m2.3-review-follow-ups

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

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

  • Local gate passes
  • Tests added
  • No new shell invocation and no new secret exposure path
  • Audit events unchanged (refused commands write nothing)
  • SPEC updated

@samuelmbabhazi
samuelmbabhazi merged commit 411a22f into main Nov 5, 2026
1 of 10 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/m2.3-review-follow-ups branch November 5, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant