Resolve role-mapped groups by id, not name #80

Stängd
öppnade 2026-10-08 21:12:31 +00:00 av supernaut · 0 kommentarer
Ägare

What

getRoleGroups returns group names. getGroupMembers then looks each name up in the top-level group search.

Why

A role mapped onto a subgroup, or two groups sharing a name, makes the lookup throw. Every run aborts. Members of child groups inherit the role in Keycloak but are not read.

Failing case

Map ent_runners_shared onto tier_pro/annual. The next run fails with group annual not found. Nothing is reconciled until the mapping is undone.

Fix

Return id and name from getRoleGroups. Read /groups/{id}/members directly. Read /groups/{id}/children and add their members. Drop the by-name search on this path.

Done when

  • A role mapped to a subgroup resolves its members and its child groups' members
  • Tier groups still resolve by exact name
  • Tests cover a subgroup and a duplicate name
## What `getRoleGroups` returns group names. `getGroupMembers` then looks each name up in the top-level group search. ## Why A role mapped onto a subgroup, or two groups sharing a name, makes the lookup throw. Every run aborts. Members of child groups inherit the role in Keycloak but are not read. ## Failing case Map `ent_runners_shared` onto `tier_pro/annual`. The next run fails with `group annual not found`. Nothing is reconciled until the mapping is undone. ## Fix Return id and name from `getRoleGroups`. Read `/groups/{id}/members` directly. Read `/groups/{id}/children` and add their members. Drop the by-name search on this path. ## Done when - [ ] A role mapped to a subgroup resolves its members and its child groups' members - [ ] Tier groups still resolve by exact name - [ ] Tests cover a subgroup and a duplicate name
supernaut refererade till detta ärende från en incheckning 2026-10-13 10:18:13 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-auth-reconciler#80
Ingen beskrivning angiven.