Users & access: report what Cairn can see of the directory #345
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "users-access"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The page said "Where admins and two-factor are managed", which is false on both counts: neither is managed here, and two-factor is not even visible from here. It now answers where accounts and administrators come from, and what Cairn can see of them.
The rule
Every row is conditional on its source answering, and a row that cannot be filled is absent rather than blank. An empty value reads as "none" — no administrators, nobody signed in. A missing row reads as "not visible from here", which is the truth. Enforced in the response shape: every field is
omitempty.The sharpest case is the administrator list. If an admin group grants rights and Cairn cannot enumerate it, the list is withheld entirely rather than shown with only the statically configured names, because a partial list looks authoritative.
TestAdminNamesIncompleteWithoutAdminClientandTestAdminNamesIncompleteOnResolveErrorpin that down.What the investigation found
spaces.GroupMembers()already existed — built for peering receiver groups in #243 — so the administrator list and the member count needed no new Keycloak plumbing.Two of the mockup's rows did not survive contact:
Signed in nowfrom sessions (present tense only) andActive todayfrom the audit log (restart-proof). The same split drives the per-admin line — "Signed in now" when there is a live session, else "Last active N ago".Provider names the protocol and shows the issuer rather than guessing "Keycloak" from a path segment, which is not knowable.
Backend
GET /api/v1/admin/accessauth.Sessions.ActiveUsers()— plus anissuedtimestamp on session entriesaudit.LastSeen()/audit.ActorsSince(), bounded to 3 months and stopping earlymain.gocaptures the session store, which was constructed inline in two branches and never heldDocs
docs/handbook/users-access.md: a table of which row needs which source, the exact Keycloak roles required (view-users+query-groups, explicitly notmanage-users), why there are two people-counts instead of one window, and why two-factor is absent.Also
.audlock→.notebox. It was named for the audit page's export note and this page needs the same component twice; renamed before the second use rather than reusing a name that lies about its scope. The admin table treatment moved from a growing list of ids to a.admkvclass — this was the third page to want it.