idip: Forgejo (code) signs in through the bridge, keyed on the derived handle and linked on the AID #1922
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
2 participants
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#1922
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?
Parent
#1915
What to build
Forgejo's IDIP render branch: bridge issuer, username = the derived handle, the external login linked on
sub, full name fromname, steward → site admin. The code port resolves the derived handle on IDIP.Acceptance criteria
Blocked by
swarm-claim host=bens-mac-04 run=34385
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime
Ruling: land Forgejo's IDIP render branch + the bridge
forgejoclient + the code-port derived-handle resolution + thenicknameclaim on the render/seam/port tiers now, DROPcodefromnotYetIDIPReady(the #1927 "drops its slug when it lands" convention), and defer AC3's LIVE PROOF (a member and a steward signing in on a real IDIP gateway, the steward as site admin, screenshots) to the next IDIP drive — the parent spec's live tier, exactly as #1918 (Paperless IDIP) and #1902 (Files IDIP) deferred it.Why this is a two-way door. Every change is revertible by a later commit: dropping the guard slug is undone by re-adding
"code"tonotYetIDIPReady, and the render branch is gated onCodeConfig.BridgeIDP(false on kanidm, byte-identical there). The design decisions are provable by render + seam tests (#1915 testing decisions (1)/(2)), and "lands = drop slug" is governed by #1927's documented convention and #1918's precedent. None of the one-way-door residues apply — no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend.Sub-decision — how Forgejo gets the derived handle as its username. #1917 carries the AID-derived handle in its own
handleclaim, which Mattermost/PeerTube can map arbitrarily; Forgejo (goth) can only read a STANDARD username source (userid/nickname/email/preferred_username), and a raw AID is too long/charset-wrong for a Forgejo username. So the bridge now mints the SAME derived handle ALSO as the standardnicknameclaim, and the render takes--username nickname. This is additive (no existing service readsnickname), IDIP-only (the bridge is not on kanidm), and revertible — provable byTestSetUserinfo_NicknameCarriesDerivedHandleForForgejo+TestRenderCode_IDIPBridgeOIDC.What landed (render/seam/port/wiring):
renderForgejoOIDCBridge(internal/clan/code.go): bare bridge issuer (ADR 0196),--username nickname(the AID-derived handle), external identity linked onsub, name fromname, operators→site admin (#1167), secret the SHAREDcode-oidc-secretclan var.forgejoclient per placement (catalogueBridgeClients,internal/clan/idssidp.go).nicknametoo (internal/idp/storage.go);idp.DerivedHandleexported.internal/codesvc:Port.forgejoName+BridgeIDP()option).CodeLiveSet.BridgeIDPthreads the flag;codedropped fromnotYetIDIPReady.BridgeIDP).What is OWED (AC3): the live IDIP-gateway proof — a member and a steward signing in through signify wallets, landing in two distinct AID-derived-handle-keyed Forgejo accounts, the steward as site admin, with screenshots. A sandcastle iteration cannot stand up and drive a full IDIP gateway (KERI + bridge + two wallets) reliably, so this rides the next IDIP drive. Veto by re-adding the guard slug if you want it held until the drive.
Ruled by agent under ADR 0174 — veto anytime.
Decisions (two-way doors, provable by the render + seam tests this ticket ships; live wire deferred exactly as #1918/#1924 deferred theirs):
Land on the render + seam + wiring tiers; defer AC3 live proof. A sandcastle iteration cannot stand up a full IDIP gateway (KERIA + bridge + two signify wallets) reliably. AC3 (a member and a steward signing in on a real IDIP gateway, the steward as admin, screenshots) is OWED on the next IDIP drive — the parent spec's live tier, deferred the same way #1918 deferred its AC4 and #1924 its AC3. Revertible; proven when the drive runs.
Forgejo keys the local username on the bridge's
handleclaim (#1917) — the derived handle (--username handle). The bridge already mintshandlebesidesubprecisely "for the services that reject a raw AID as a username (Mattermost, Forgejo, PeerTube)" (idp/storage.go). The render encodes the intended SHAPE — username = the derived handle, the external login linked onsub, full name fromname, steward → site admin via--group-claim-name groups --admin-group operators. The exact--usernamewire against the pinned Forgejo (a named claim vs. Forgejo's built-in username sources) is confirmed on the deferred IDIP drive; the shape is the contract (#1918/#1538 precedent). Revertible by a later commit.What landed:
internal/clan/code.go:renderForgejoOIDCBridge— the IDIP branch, gated onCodeConfig.BridgeIDP. Bare bridge issuer (id., ADR 0196),--username handle, steward → admin offgroups, the shared client secret as acode-oidc-secretclan var (share=true, owned by idss-idp — the meetings/paperless shape). The kanidm-path OIDC render is byte-identical (branch gated off, AC2 guard test).internal/clan/idssidp.go: the bridge declares aforgejoconfidential client per placement (catalogueBridgeClients),secret_env = IDSS_IDP_CODE_SECRET_FILE(config.go already loads placement-driven clients generically, #1918).internal/codesvc+control-planewiring: the code port resolves the derived handle on IDIP (Port.KeyBy(keria.DerivedHandle)), so it looks people up by the derived handle, keyed identically to the render.keria.DerivedHandleis the SINGLE definition the bridge (idp.derivedHandle now delegates) and the port compute, so they never drift.internal/provision/assess.go:codedropped fromnotYetIDIPReady(#1927 convention). Code is still phantom-gated byPortRoutableuntil its co-host deploy path is built, so this enables no broken install — the same tier #1924 landed for meetings.Tests (green; gofmt/vet/golangci-lint clean):
TestRenderCode_IDIPBridgeSignIn,TestRenderCode_KanidmAndBridgeBranchesAreMutuallyExclusive,TestAttachCode_BridgeIDPRendersTheBridgeBranch,TestRenderIdssIdp_CodePlacedAddsItsClient,TestPort_IDIPKeysAccountsByDerivedHandle,TestPort_KanidmKeysAccountsByPersonIDVerbatim,TestDerivedHandle_StablePerAID_UniqueAcrossCase(keria).close-report for #1922 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope