IDIP steward routes authenticate but do not authorize — any signed-in MEMBER can act as a steward #1098
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1098
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?
Problem
operatorAuthed(internal/controlapi/logstream.go:146) asks only whether an identity is present, never whose:Every IDIP steward route is gated on it — credentials (create / issue / revoke / delete), steward rotations (start / co-sign / cancel), standing (suspend / re-admit / decline) and removal. So once #1094's fix lands, any member holding a valid community SSO session — not just an operator — can call them: issue themselves a credential, revoke someone else's, suspend a member, start a steward rotation.
This is the residual half of #1094. That ticket closed the two outer holes (the honest operator being refused, and an anonymous caller forging
X-Idss-Identityon the ungated portal route). This is the inner one: authentication is now real, but there is no authorization.Why it did not bite before
On the kanidm path the panel lives at
admin.<apex>, where the auth gate answers theadminpseudo-service with a genuine operator check (member.Orchestrator.GateDecision→isOperator,internal/member/komiti.go:583). The routes could lean on the route in front of them. The apex portal route is ungated by design (#512), and the IDIP dashboard is served there, so nothing in front of these routes performs that check.What plugging it needs
The roster already knows:
role: operatoris what the rotation adapter promotes and demotes (Registry.Promote/Demote), andRegistry.Operators()sizes the rotation majority. So the check is available — the open question is the identity mapping: the session identity comes from the bridge's OIDC subject, and this needs confirming to be the member's AID as the registry keys it, before any gate keys on it. Getting that wrong locks the founder out of their own community, so it wants a deliberate look rather than an assumed equality.Suggested shape: an
operatorAuthedvariant for the IDIP families that resolves the session identity and then asks the registry whether that AID holdsrole: operator, refusing 403 (not 401) when it does not — with a seam test driving all three cases (no session → 401, member session → 403, operator session → 200).Evidence
Found while fixing #1094 (drive
20260901T021405Z). Seedocs/GOTCHAS.md#148, closing note.Fixed —
8277dc0a.Authorization now rides on the resolver as an optional
Authorizehalf — the same shapeFirstLoginObserveralready takes besideGateDecider— so all 22operatorAuthedcall sites and every existing test are untouched.controlapi.StewardResolver{Session, Operators}wraps the gate's cookie resolver;operatorAuthedandstewardIdentityrefuse a non-steward 403, never 401 (a signed-in member cannot fix this by signing in again, and telling them to would be a lie).The steward test is two facts, deliberately (
keria.RegistryOperators): the roster's operator role and live, receipt-confirmed membership. That second half is the point — suspend and remove both revoke Membership (DDR 0217 ruling 6), so steward power ends the moment the revocation receipts, with no role field needing to remember to change.Archivedis checked explicitly too, so a removal whose revocation has not yet receipted also ends it immediately.On the questions this raised rather than answered:
Promote/Demotewrite the roster row; the membership ACDC re-issue is the steward's own signing act in the renderer. So role comes from the row and liveness from the credential. If a rotation ever lands the row without its re-issue, that drift now shows up here rather than hiding.Verified rather than assumed: no lockout. The risk I named when filing this was gating on an identifier that turns out not to match.
internal/fleetwire/founderroster.go:126registers the founder withRole: credschema.RoleOperatorand a receipt-confirmed membership ("the founder is always their community's operator"), and the bridge setssub = AID(internal/idp/storage.go:524), which is the roster's own key — so the founder passes their own gate.Pins:
TestIdipStewardAuthz_MemberIsForbiddenOperatorIsNot(403 / 200 / 401),TestIdipStewardAuthz_UnknownRefusesRatherThanGuesses(503),TestStewardResolver_NilOperatorsFailsClosed,TestStewardSessionResolver_CarriesAuthorization— that last one pins that the wiring can never silently revert to authentication-only, which is precisely how #1094 happened one layer down — and fourTestRegistryOperators_*including suspension ending steward power mid-standing.docs/GOTCHAS.md#148 extended.Checks:
go build ./...;go test ./internal/... ./control-plane/...all green; gofmt clean.preferred_username, but the operator check keys on the AID #1101preferred_username, but the operator check keys on the AID #1101