Group resolution: OIDC groups → User.Groups + /me (#17) #35

Merged
Cordy merged 2 commits from feat/group-resolution into main 2026-07-25 20:15:10 +00:00
Owner

First step of the authorization work (#16 builds on this).

  • auth.User gains a Groups []string field; sessions already store the full User, so groups resolved at login flow to every request.
  • OIDC callback now propagates the parsed claims.Groups into the issued session (previously dropped at Sessions.Issue).
  • GET /api/v1/me returns {username, groups} (empty array, not null, when none).
  • Tests: sessions preserve User.Groups; no-group users round-trip cleanly.

LDAP memberOf is deferred to a small follow-up (it needs threading groups through the search-then-bind + verified cache — kept out of this PR to avoid a risky refactor). Local auth has no groups by design. Nothing consumes groups yet; the per-group /spaces/<group> authorization (#16) is the consumer.

First step of the authorization work (#16 builds on this). - `auth.User` gains a `Groups []string` field; sessions already store the full `User`, so groups resolved at login flow to every request. - OIDC callback now propagates the parsed `claims.Groups` into the issued session (previously dropped at `Sessions.Issue`). - `GET /api/v1/me` returns `{username, groups}` (empty array, not null, when none). - Tests: sessions preserve `User.Groups`; no-group users round-trip cleanly. LDAP `memberOf` is deferred to a small follow-up (it needs threading groups through the search-then-bind + verified cache — kept out of this PR to avoid a risky refactor). Local auth has no groups by design. Nothing consumes groups yet; the per-group `/spaces/<group>` authorization (#16) is the consumer.
Cordy merged commit 1b62bf1bb6 into main 2026-07-25 20:15:10 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#35
No description provided.