Spaces: "Add member" gives no feedback; needs a member picker (autocomplete + validation) #210
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found dogfooding the openbao-custody instance.
Repro:
Bug: the action gives no result feedback (success or failure). Likely the same unsurfaced-
Responsepattern as the folder-create empty error — worth checking whether the request is even firing / what it returns.Enhancements requested (UX):
Also: check whether the same no-feedback behaviour exists on the keycloak-profile instance (the other dogfood) — this is probably a general spaces-UI issue, not openbao-specific. Note how space membership is actually modeled (IdP groups vs. an in-app membership store) so "Add member" targets the right layer.
Diagnosis (from the pod log + code).
The UI calls
GET/POST /api/v1/spaces/{name}/membersand both return Go's default404 page not found(19-byte body) — the route isn't registered, not an app-level 404.registerSpacesruns only whenapiH.Spaces != nil(api.go), and main.go builds that only when a Keycloak admin client exists —if enc.KeycloakBaseURL != "" && enc.KeycloakClientID != ""(main.go:727). Thosestorage.encryption.keycloak*fields do double duty: keycloak-profile key custody and the groups/spaces manager (spaces.Manager, #94/#96). The openbao dogfood's deployed config doesn't have them, so the entire self-service spaces surface (create space, list/add/remove members) is off.Two things to decide, beyond the frontend bug:
openbao/ AD / LDAP instance that wants spaces management must still set those Keycloak-admin fields. Either decouple them (a dedicatedspaces/groupAdminblock) or document clearly that "self-service spaces need a Keycloak admin client regardless of key custody."POST /api/v1/spacessets creator = owner. A group created directly in Keycloak (likeFall 3) has no owner, soownerOrAdmin→ErrNoSpace→ "no such space". Add-member on a hand-made group can't work through this API by design; the space has to be born through Cairn.Frontend bug (independent, real): the UI fires the request and swallows the 404 with no feedback. It should surface "spaces management isn't available on this instance" (feature-detect, like the audit panel #173) or the real error — plus the requested picker: dropdown of candidate members, type-ahead, and an already-member / not-found check.
Confirmed the same root cause also breaks create-space: the Spaces-list "New folder" button calls
POST /api/v1/spaces→404(19-byte404 page not found), identical unwired-h.Spaces. So #209 is the same issue surfaced through the create-space button; this issue (#210) is the member surface. Both come down to: the spaces-management API is not registered on this instance (no Keycloak admin client), and the UI neither feature-detects that nor surfaces the error.Split status: the feedback + validation half of this issue is shipped and verified — "Add member" no longer fails silently. On v0.6.18 the members dialog gives clear feedback: adds render immediately, re-adding an existing member shows "Already a member — change their role in the list above", and entering the owner shows "The owner always has full access." Verified on both cairn-openbao (app-owned path) and cairn-enc (IdP-managed path). The unsurfaced-
Responseroot cause (same class as #136) was also fixed (v0.6.18 members-dialog.json()).The remaining picker half — candidate dropdown + type-ahead — is tracked in #226 (deferred because it needs an enumerable user list). Keeping this open to close together with #226, which is being worked now.
Both halves of this issue are now shipped:
GET /api/v1/spaces/{name}/candidates, degrading to validated free-text where no user source is enumerable. CI-green, deployed to both instances.Closing together with #226.