files-member tail: komiti→Nextcloud-group materialisation (design), member-tier drive leg, awaiting-approval + private-path stated-limit (DDR 0173, from #514) #525

Closed
opened 2026-08-14 07:37:06 +00:00 by ben · 3 comments
Owner

Parent / provenance

Follow-up tail of #514 (files-member child spec, DDR 0173), which landed the two
unit-testable seams — the files render's claim-alone member provisioning (pinned) and
the DDR 0172 branded gate-served refusal surface (internal/controlapi/refusal.go,
FM-S2x + DA-S2x) — on origin/main (commit 92004d6). This issue carries the
remainder #514's close-report named as deferred, so it is not lost with the closed
ticket. Filed ready-for-human: item 1 is a design decision, and the rest need a
live lab drive / deployment-copy work.

1. Story 3 — komiti MATERIALISE as Nextcloud groups (design decision)

#514 widened the OIDC token (the groups scope now rides, so a member's komiti flow in
the standard groups claim — ADR 0076 Tier 1). But komiti do not yet materialise as
Nextcloud groups
, and this is a genuine design fork surfaced during #514:

  • Nextcloud user_oidc maps groups from one claim (--mapping-groups).
  • The operator's admin bit needs the bare value admin, which only a kanidm
    claim-map
    gives. Granting the groups scope emits SPNs (nextcloud_admins@domain)
    and, on the groups claim, wins the collision and strips admin (drive
    20260810T141436Z, probed live) — so admin must ride the collision-proof ocgroups
    claim-map (as it does today, internal/clan/files.go).
  • Therefore komiti must also ride ocgroups, via per-komiti claim-maps added at
    komiti-creation
    (they are runtime objects, unknown to the static files render).

Decision needed: confirm the mechanism — a komiti-management reconciler verb that
adds/removes an ocgroups claim-map (bare komiti name) on the files OAuth2 client when a
komiti is created/deleted/renamed (ADR 0076 Tier 1, the "claims: yes" shape) — or an
alternative. This is the ADR 0076 Tier-1 machinery the files render leaves a channel for.

2. Story 11 — the e2e member-tier drive leg (live)

The invite-member leg in app/tests/e2e/journey.droplet.spec.ts is a named-skip
carrying its DDR 0165 assertion plan (Files landing + display name + komiti group +
no-Administration, then suspend→refusal). It goes live once a by-hand member and the
item-1 materialisation are wired on a real gateway. Needs the clan-lab.

3. Story 6 — awaiting-approval IdP enforcement

Assert/verify that an awaiting-approval kanidm person cannot authenticate at the IdP until
an operator approves (both paths, no new gate — the members approve-time mechanism). If
nothing enforces it yet, that is this item's build (DDR 0173 story 6).

4. Story 9 — private-path stated-limit honest copy

On the private path service routes stay ungated (ADR 0150), so the access matrix is not
enforced at the files door. Surface this as a stated limit in the deployment's honest
copy where restriction is displayed — never silently claimed as enforced (DDR 0173 story 9).

Standing on

ADR 0150, ADR 0076 (Tier 1), ADR 0074, DDR 0158, DDR 0172, DDR 0173. Design contract:
docs/ux/flows/files-member.mermaid, docs/ux/wireframes/files-member/.

## Parent / provenance Follow-up tail of **#514** (files-member child spec, DDR 0173), which landed the two unit-testable seams — the files render's claim-alone member provisioning (pinned) and the DDR 0172 branded gate-served refusal surface (`internal/controlapi/refusal.go`, FM-S2x + DA-S2x) — on `origin/main` (commit `92004d6`). This issue carries the remainder #514's close-report named as deferred, so it is not lost with the closed ticket. Filed `ready-for-human`: item 1 is a **design decision**, and the rest need a live lab drive / deployment-copy work. ## 1. Story 3 — komiti MATERIALISE as Nextcloud groups (design decision) #514 widened the OIDC token (the `groups` scope now rides, so a member's komiti flow in the standard `groups` claim — ADR 0076 Tier 1). But komiti do **not yet materialise as Nextcloud groups**, and this is a genuine design fork surfaced during #514: - Nextcloud `user_oidc` maps groups from **one** claim (`--mapping-groups`). - The operator's admin bit needs the **bare** value `admin`, which **only a kanidm claim-map** gives. Granting the `groups` scope emits SPNs (`nextcloud_admins@domain`) and, on the `groups` claim, **wins the collision** and strips `admin` (drive `20260810T141436Z`, probed live) — so admin must ride the collision-proof `ocgroups` claim-map (as it does today, `internal/clan/files.go`). - Therefore komiti must **also** ride `ocgroups`, via **per-komiti claim-maps added at komiti-creation** (they are runtime objects, unknown to the static files render). **Decision needed:** confirm the mechanism — a komiti-management reconciler verb that adds/removes an `ocgroups` claim-map (bare komiti name) on the files OAuth2 client when a komiti is created/deleted/renamed (ADR 0076 Tier 1, the "claims: yes" shape) — or an alternative. This is the ADR 0076 Tier-1 machinery the files render leaves a channel for. ## 2. Story 11 — the e2e member-tier drive leg (live) The `invite-member` leg in `app/tests/e2e/journey.droplet.spec.ts` is a named-skip carrying its DDR 0165 assertion plan (Files landing + display name + komiti group + no-Administration, then suspend→refusal). It goes live once a by-hand member **and** the item-1 materialisation are wired on a real gateway. Needs the `clan-lab`. ## 3. Story 6 — awaiting-approval IdP enforcement Assert/verify that an awaiting-approval kanidm person cannot authenticate at the IdP until an operator approves (both paths, no new gate — the members approve-time mechanism). If nothing enforces it yet, that is this item's build (DDR 0173 story 6). ## 4. Story 9 — private-path stated-limit honest copy On the private path service routes stay ungated (ADR 0150), so the access matrix is **not** enforced at the files door. Surface this as a **stated limit** in the deployment's honest copy where restriction is displayed — never silently claimed as enforced (DDR 0173 story 9). ## Standing on ADR 0150, ADR 0076 (Tier 1), ADR 0074, DDR 0158, DDR 0172, DDR 0173. Design contract: `docs/ux/flows/files-member.mermaid`, `docs/ux/wireframes/files-member/`.
Author
Owner

Ruled by agent under ADR 0174 — veto anytime. Item 1 ruling: adopt the mechanism the ticket's own evidence forces — a komiti-management reconciler verb that adds/removes an ocgroups claim-map (bare komiti name) on the files OAuth2 client at komiti create/delete/rename (ADR 0076 Tier 1, the "claims: yes" shape). The live-probed collision (SPNs win the groups claim and strip admin) leaves no workable single-claim alternative. Two-way door: reconciler code, revertible; proof = the member-tier drive leg (item 2). Relabelled ready-for-session for the lab legs; items 3/4 ride the same session arc.

**Ruled by agent under ADR 0174 — veto anytime.** Item 1 ruling: **adopt the mechanism the ticket's own evidence forces** — a komiti-management reconciler verb that adds/removes an `ocgroups` claim-map (bare komiti name) on the files OAuth2 client at komiti create/delete/rename (ADR 0076 Tier 1, the "claims: yes" shape). The live-probed collision (SPNs win the `groups` claim and strip `admin`) leaves no workable single-claim alternative. Two-way door: reconciler code, revertible; proof = the member-tier drive leg (item 2). Relabelled `ready-for-session` for the lab legs; items 3/4 ride the same session arc.
Author
Owner

This was generated by AI during triage.

Triage: added the missing category label; state (ready-for-session, already reasoned in this thread) left as-is.

> *This was generated by AI during triage.* **Triage:** added the missing category label; state (`ready-for-session`, already reasoned in this thread) left as-is.
Author
Owner

Close-report — 3 of 4 stories landed; story 11 + a live-probe carried to #584

Ruled by agent under ADR 0174 — veto anytime.

Landed on origin/main

Story 9 — private-path stated-limit honest copy. KomitiDetailView now carries an
honest PrivatePathNote whenever the deployment answers on ADR 0149's
.ourcloud.internal apex, since ADR 0150 leaves private-path service routes ungated and
the matrix is genuinely not enforced there (DDR 0173 story 9) — never silently claimed.
Threaded via a new member.WithPrivatePath() functional option (the
provision.WithPrivateFrontDoor idiom already in this codebase), so none of the 17
existing member.New call sites needed touching. Wireframe
docs/ux/wireframes/p6-members/p6-s7-komiti-detail.html grows the matching field.

Story 6 — assert/verify awaiting-approval blocks real IdP auth. DDR 0173's "an
awaiting-approval member cannot authenticate at the IdP until approved" was previously
only proven by reading kanidm's account_expire attribute off the directory — a proxy,
never a real auth attempt. smoke-idp's legLifecycle now runs kanidm's actual
/v1/auth password conversation as the person themselves and asserts it is refused while
pending, admitted once approved, and refused again once suspended (ADR 0074 move 1).
Building this out surfaced and fixed a real latent bug: the in-process kanidm double's
credential-update handler still decoded the pre-#580 reversed [sid, cred] body
order — never caught before because no prior CI path drove a password-credential signup
against it.

Story 3 — komiti→Nextcloud-group materialisation (design fork). Ruled and built as
DDR 0179: Nextcloud's user_oidc maps groups from the ocgroups claim ALONE
(--mapping-groups=ocgroups), not the standard groups claim DDR 0173 assumed komiti
would ride — the same collision-proof claim admin already needs (live-probed, drive
20260810T141436Z: the groups scope's SPNs win the collision and strip admin). New
member.FilesKomitiClaimMapPort, backed by internal/kanidm.Adapter.{Add,Remove} FilesKomitiClaimMap, writes a per-komiti ocgroups claim-map entry at komiti
create/rename/delete. internal/nextcloud's RoleMapping() is corrected from the wrong
MappingFrontDoorOnly to MappingClaimNative, matching the already-signed-off P6-S7
wireframe that production code had drifted from.

Proof: go build ./... && go vet ./... && go test ./... green throughout, including new
contract tests (TestFilesKomitiClaimMap_AddAndRemove,
TestKomitiCRUD_KeepsFilesClaimMapInSync, TestKomitiDetail_PrivatePathCarriesStatedLimitCaveat,
the extended smoke-idp lifecycle leg). Commits:
4f8352b (stories 9 + 6), b0f89d7 (story 3 / DDR 0179).

Why story 3 is a two-way door despite being a design ruling

ADR 0174 rule 1 explicitly includes "design-tier accepts (DDRs/wireframes)" as agent-
rulable — the #514/#388 auto-accept precedent extended to standing policy. #525's own
text already carried a fully-reasoned proposed default (the exact mechanism, with the
live-probe evidence for why the alternative fails), matching rule 4's "a ticket that asks
for a ruling must carry a proposed default" shape. The ruling is a revertible commit
(DDR 0179 + code), provable by the seam tests above.

What's carried forward — filed as #584

Two things need the clan-lab (real infrastructure, beyond this session's scope):

  1. Live-probe DDR 0179's kanidm REST wire shape. AddFilesKomitiClaimMap /
    RemoveFilesKomitiClaimMap drive POST/DELETE /v1/oauth2/{rs_name}/_claimmap/{claim_name}/{group} — researched from kanidm
    master's source, never exercised against a real kanidm. Exactly the risk class
    #580 was. Pinned today only by a contract-test double.
  2. Story 11 — the e2e member-tier drive leg, which needs a by-hand member AND item 1
    proven live on the same gateway to mean anything.

#584 bundles both, since one lab session can prove them together. Closing #525 now — its
two-way-door parts are genuinely done and proven; the remainder is its own session-worthy
live-lab thread, the same shape #514 → #525 already set.

## Close-report — 3 of 4 stories landed; story 11 + a live-probe carried to #584 Ruled by agent under ADR 0174 — veto anytime. ### Landed on `origin/main` **Story 9 — private-path stated-limit honest copy.** `KomitiDetailView` now carries an honest `PrivatePathNote` whenever the deployment answers on ADR 0149's `.ourcloud.internal` apex, since ADR 0150 leaves private-path service routes ungated and the matrix is genuinely not enforced there (DDR 0173 story 9) — never silently claimed. Threaded via a new `member.WithPrivatePath()` functional option (the `provision.WithPrivateFrontDoor` idiom already in this codebase), so none of the 17 existing `member.New` call sites needed touching. Wireframe `docs/ux/wireframes/p6-members/p6-s7-komiti-detail.html` grows the matching field. **Story 6 — assert/verify awaiting-approval blocks real IdP auth.** DDR 0173's "an awaiting-approval member cannot authenticate at the IdP until approved" was previously only proven by reading kanidm's `account_expire` attribute off the directory — a proxy, never a real auth attempt. `smoke-idp`'s `legLifecycle` now runs kanidm's actual `/v1/auth` password conversation as the person themselves and asserts it is refused while pending, admitted once approved, and refused again once suspended (ADR 0074 move 1). Building this out surfaced and fixed a real latent bug: the in-process kanidm double's credential-update handler still decoded the **pre-#580 reversed** `[sid, cred]` body order — never caught before because no prior CI path drove a password-credential signup against it. **Story 3 — komiti→Nextcloud-group materialisation (design fork).** Ruled and built as **DDR 0179**: Nextcloud's `user_oidc` maps groups from the `ocgroups` claim ALONE (`--mapping-groups=ocgroups`), not the standard `groups` claim DDR 0173 assumed komiti would ride — the same collision-proof claim `admin` already needs (live-probed, drive `20260810T141436Z`: the `groups` scope's SPNs win the collision and strip `admin`). New `member.FilesKomitiClaimMapPort`, backed by `internal/kanidm.Adapter.{Add,Remove} FilesKomitiClaimMap`, writes a per-komiti `ocgroups` claim-map entry at komiti create/rename/delete. `internal/nextcloud`'s `RoleMapping()` is corrected from the wrong `MappingFrontDoorOnly` to `MappingClaimNative`, matching the already-signed-off P6-S7 wireframe that production code had drifted from. Proof: `go build ./... && go vet ./... && go test ./...` green throughout, including new contract tests (`TestFilesKomitiClaimMap_AddAndRemove`, `TestKomitiCRUD_KeepsFilesClaimMapInSync`, `TestKomitiDetail_PrivatePathCarriesStatedLimitCaveat`, the extended `smoke-idp` lifecycle leg). Commits: `4f8352b` (stories 9 + 6), `b0f89d7` (story 3 / DDR 0179). ### Why story 3 is a two-way door despite being a design ruling ADR 0174 rule 1 explicitly includes "design-tier accepts (DDRs/wireframes)" as agent- rulable — the #514/#388 auto-accept precedent extended to standing policy. #525's own text already carried a fully-reasoned proposed default (the exact mechanism, with the live-probe evidence for why the alternative fails), matching rule 4's "a ticket that asks for a ruling must carry a proposed default" shape. The ruling is a revertible commit (DDR 0179 + code), provable by the seam tests above. ### What's carried forward — filed as **#584** Two things need the `clan-lab` (real infrastructure, beyond this session's scope): 1. **Live-probe DDR 0179's kanidm REST wire shape.** `AddFilesKomitiClaimMap` / `RemoveFilesKomitiClaimMap` drive `POST`/`DELETE /v1/oauth2/{rs_name}/_claimmap/{claim_name}/{group}` — researched from kanidm master's source, **never exercised against a real kanidm**. Exactly the risk class #580 was. Pinned today only by a contract-test double. 2. **Story 11 — the e2e member-tier drive leg**, which needs a by-hand member AND item 1 proven live on the same gateway to mean anything. #584 bundles both, since one lab session can prove them together. Closing #525 now — its two-way-door parts are genuinely done and proven; the remainder is its own session-worthy live-lab thread, the same shape #514 → #525 already set.
ben closed this issue 2026-08-15 08:24:45 +00:00
Sign in to join this conversation.
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#525
No description provided.