document-archive on IDIP: an administrator is found by the bridge's handle, and a typed address opens nobody else's account (Ben, 2026-09-29) #2000

Merged
ben merged 1 commit from session/paperless-idip-admin-by-handle into main 2026-09-29 15:26:54 +00:00
Owner

What

On Whakatōhea Demo (2026-09-29) Ben installed Document archive, signed in, and was a plain member of it. This makes an administrator admin of Paperless on an IDIP community, and stops a typed address opening someone else's account.

Cause, read from the box

  • The role reconciler looked for a Paperless account named after the steward's AID. django-allauth names an account from the bridge's preferred_username (ben-2) and keeps the AID only as the social account's uid, which Paperless's user API never shows.
  • The lookup missed, the port fell through to the kanidm-path pre-provision, and that was refused for want of an address (no kanidm on IDIP) — once per five-minute pass, in the journal alone: document-archive operator pre-provision owed — no email address on record.
  • The bridge render carried email_authentication: true over from kanidm. On IDIP the address is typed by the member and sent email_verified: true, so a second person who typed the same address lands inside the first person's account.

Ruling (Ben, in session)

Find the account by the bridge's handle, pre-provision nothing on IDIP, email matching off on the bridge render.

Built

  • keria.Registry.SignInHandles — the names the bridge signed an AID in under, app door first, then roster, and only a name no other AID holds
  • documentarchivesvc.Port.KeyByHandles — finds the account by them; never pre-provisions; an operator who has not signed in yet waits for the pass after their first sign-in (ADR 0286 d.8)
  • renderPaperlessOIDCBridge no longer sets email_authentication
  • control-plane wires archiveHandles on the IDIP path

The kanidm path is unchanged (render byte-identical; port behaviour identical with no resolver).

Tests

Red-first at three seams: the roster (internal/keria/signinhandles_test.go), the port over the Paperless double (internal/documentarchivesvc), and the real composition on the demo's roster shape (TestProductionPorts_PaperlessFindsTheStewardByTheirBridgeHandle, which fails without the wiring on the journal's exact sentence). Whole Go suite, vet and gofmt clean.

Docs

ADR 0255 amended (the IDIP path), GOTCHAS #371, STATUS.

Not proven live — owed

  • a release carrying this reaches the demo
  • Document archive is re-rendered there (a release never re-renders it), so email matching goes off
  • a second administrator signs in and is admin within one pass

Known costs, each owed a ticket

  • A person whose address is already on another Paperless account is sent to allauth's sign-up form instead of being signed up (before this they were let in as the other person).
  • Paperless 2.20 syncs groups from a claim named groups only, so pgroups is never read on either path.

Refs #1918

🤖 Generated with Claude Code

## What On Whakatōhea Demo (2026-09-29) Ben installed Document archive, signed in, and was a plain member of it. This makes an administrator admin of Paperless on an IDIP community, and stops a typed address opening someone else's account. ## Cause, read from the box - The role reconciler looked for a Paperless account named after the steward's **AID**. django-allauth names an account from the bridge's `preferred_username` (`ben-2`) and keeps the AID only as the social account's uid, which Paperless's user API never shows. - The lookup missed, the port fell through to the kanidm-path pre-provision, and that was refused for want of an address (no kanidm on IDIP) — once per five-minute pass, in the journal alone: `document-archive operator pre-provision owed — no email address on record`. - The bridge render carried `email_authentication: true` over from kanidm. On IDIP the address is typed by the member and sent `email_verified: true`, so a second person who typed the same address lands inside the first person's account. ## Ruling (Ben, in session) Find the account by the bridge's handle, pre-provision nothing on IDIP, email matching off on the bridge render. ## Built - `keria.Registry.SignInHandles` — the names the bridge signed an AID in under, app door first, then roster, and **only a name no other AID holds** - `documentarchivesvc.Port.KeyByHandles` — finds the account by them; never pre-provisions; an operator who has not signed in yet waits for the pass after their first sign-in (ADR 0286 d.8) - `renderPaperlessOIDCBridge` no longer sets `email_authentication` - `control-plane` wires `archiveHandles` on the IDIP path The kanidm path is unchanged (render byte-identical; port behaviour identical with no resolver). ## Tests Red-first at three seams: the roster (`internal/keria/signinhandles_test.go`), the port over the Paperless double (`internal/documentarchivesvc`), and the real composition on the demo's roster shape (`TestProductionPorts_PaperlessFindsTheStewardByTheirBridgeHandle`, which fails without the wiring on the journal's exact sentence). Whole Go suite, vet and gofmt clean. ## Docs ADR 0255 amended (the IDIP path), GOTCHAS #371, STATUS. ## Not proven live — owed - a release carrying this reaches the demo - Document archive is **re-rendered** there (a release never re-renders it), so email matching goes off - a second administrator signs in and is admin within one pass ## Known costs, each owed a ticket - A person whose address is already on another Paperless account is sent to allauth's sign-up form instead of being signed up (before this they were let in as the other person). - Paperless 2.20 syncs groups from a claim named `groups` only, so `pgroups` is never read on either path. Refs #1918 🤖 Generated with [Claude Code](https://claude.com/claude-code)
document-archive on IDIP: an administrator is found by the bridge's handle, and a typed address opens nobody else's account
All checks were successful
ci / seam (pull_request) Successful in 10m36s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been skipped
e4943ee44c
On Whakatōhea Demo (2026-09-29) Ben installed Document archive, signed in,
and was a plain member. The role reconciler looked for a Paperless account
named after the steward's AID; django-allauth names an account from the
bridge's preferred_username (ben-2) and keeps the AID only as the social
account's uid, which Paperless's user API never shows. The lookup missed,
the port fell through to the kanidm-path pre-provision, and that was refused
for want of an address every five minutes.

Ben ruled: find the account by the bridge's handle, pre-provision nothing on
IDIP, and turn email matching off on the bridge render (the address on an
IDIP credential is typed by the member, so matching on it lets a second
person who typed the same one into the first person's account).

- keria.Registry.SignInHandles: the names the bridge signed an AID in under,
  app door first, and only a name no other AID holds
- documentarchivesvc.Port.KeyByHandles: finds the account by them, never
  pre-provisions; an operator not yet signed in waits for the next pass
- renderPaperlessOIDCBridge no longer sets email_authentication
- control-plane wires archiveHandles on the IDIP path

The kanidm path is unchanged. ADR 0255 amended; GOTCHAS #371; STATUS.
Not proven live. Refs #1918.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ben merged commit c976e06b52 into main 2026-09-29 15:26:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss!2000
No description provided.