idip service access: take ONE credential off a service (unrestrict) — today it's restrict-add or open-to-all, with an open-to-everyone window between #1778

Closed
opened 2026-09-23 16:59:18 +00:00 by ben · 3 comments
Owner

What

A steward cannot take ONE credential off a restricted service. The IDIP service-access routes are only …/access/{service}/restrict (additive — adds this credential) and …/access/{service}/open (clears EVERY restriction). To stop Kaumātua opening Files while Finance komiti keeps it, a steward must open Files to all members and then re-restrict it to Finance komiti — and for that window Files is open to every member.

(internal/controlapi/idip_service_access.go:86-124; ADR 0222, #1156.)

Build

  • A new route beside the two: POST /api/v1/idip/credentials/{slug}/access/{service}/unrestrict — removes THIS credential from the service's opening set, leaving the others. Normalise the committee:<slug> / bare-slug forms as restrictAdditive does. If it was the LAST opening credential, the service does not silently become stewards-only: refuse with a 409 naming the choice ("this is the only credential opening files — open it to all members, or restrict it to another credential first"), and the UI offers exactly those two.
  • openapi + regenerated client + IdipCredentialsClient.unrestrictService.
  • The "who can reach it" editor (redesigned on idip-credentials-ui, CredentialsSurface.vue): when this credential opens the service, the "Only credential holders — current" row gains Stop this credential opening it; the last-credential case shows the two ways out instead.
  • Attributed + audit-logged like restrict/open.

Acceptance

  • Files restricted to {finance, kaumatua}: unrestrict kaumatua → {finance}; a Kaumātua-only holder is denied on their next request, a Finance holder still reaches it — with NO moment where Files is open to all (controlapi + gate seam test).
  • Unrestricting the only opening credential is refused (409) with the two-way-out copy; nothing changes.
  • The editor offers the act only where it applies.
## What A steward cannot take ONE credential off a restricted service. The IDIP service-access routes are only `…/access/{service}/restrict` (additive — adds this credential) and `…/access/{service}/open` (clears EVERY restriction). To stop Kaumātua opening Files while Finance komiti keeps it, a steward must open Files to all members and then re-restrict it to Finance komiti — and for that window **Files is open to every member**. (`internal/controlapi/idip_service_access.go:86-124`; ADR 0222, #1156.) ## Build - A new route beside the two: `POST /api/v1/idip/credentials/{slug}/access/{service}/unrestrict` — removes THIS credential from the service's opening set, leaving the others. Normalise the `committee:<slug>` / bare-slug forms as `restrictAdditive` does. If it was the LAST opening credential, the service does **not** silently become stewards-only: refuse with a 409 naming the choice ("this is the only credential opening files — open it to all members, or restrict it to another credential first"), and the UI offers exactly those two. - openapi + regenerated client + `IdipCredentialsClient.unrestrictService`. - The "who can reach it" editor (redesigned on `idip-credentials-ui`, `CredentialsSurface.vue`): when this credential opens the service, the "Only credential holders — current" row gains **Stop this credential opening it**; the last-credential case shows the two ways out instead. - Attributed + audit-logged like restrict/open. ## Acceptance - [ ] Files restricted to {finance, kaumatua}: unrestrict kaumatua → {finance}; a Kaumātua-only holder is denied on their next request, a Finance holder still reaches it — with NO moment where Files is open to all (controlapi + gate seam test). - [ ] Unrestricting the only opening credential is refused (409) with the two-way-out copy; nothing changes. - [ ] The editor offers the act only where it applies.
ben self-assigned this 2026-09-23 18:43:28 +00:00
Author
Owner

session-claim 2026-09-23 — being worked in Ben's interactive Claude session (worktree panel-idip, branch idip-credentials-ui), not by the swarm. ready-for-agent is off and agent-working + no-triage are on for the duration so no host picks it up; the claim is released (labels restored or the ticket closed) when the session lands it.

session-claim 2026-09-23 — being worked in Ben's interactive Claude session (worktree `panel-idip`, branch `idip-credentials-ui`), not by the swarm. `ready-for-agent` is off and `agent-working` + `no-triage` are on for the duration so no host picks it up; the claim is released (labels restored or the ticket closed) when the session lands it.
Author
Owner

Built in-session: PR #1797 (branch idip-unrestrict, stacked on #1796 / idip-credentials-ui because the editor change sits on that branch). All three acceptance clauses covered by seam tests (controlapi + gate over the same matrix) and the dashboard suite; details + screenshots on the PR. Lands after #1796 merges — session claim released (agent-working/no-triage off, ready-for-agent deliberately NOT restored so the swarm does not redo it).

Built in-session: PR https://git.matou.nz/Matou/idss/pulls/1797 (branch `idip-unrestrict`, stacked on #1796 / `idip-credentials-ui` because the editor change sits on that branch). All three acceptance clauses covered by seam tests (controlapi + gate over the same matrix) and the dashboard suite; details + screenshots on the PR. Lands after #1796 merges — session claim released (`agent-working`/`no-triage` off, `ready-for-agent` deliberately NOT restored so the swarm does not redo it).

This was generated by AI during triage.

Triage — ready-for-human

Established so far:

  • Built in Ben's interactive session; PR #1797 (idip-unrestrict) is up, stacked on idip-credentials-ui (base = that branch, not main), so it lands only after #1796 / #1759 merges. PR is mergeable: true against its stacked base.
  • All three acceptance clauses (unrestrict-one with no open-to-all window; 409 refusing the last opener with the two-way-out copy; editor offers the act only where it applies) reported covered by seam tests (controlapi + gate over the same matrix) plus the dashboard suite.
  • Session claim released; ready-for-agent deliberately not restored so the swarm does not redo built work.

Why human

The only residue is a human merge of PR #1797, which sits on the landing-pr branch a human merges (ADR 0267) and lands after #1796. No agent work remains — the code exists in the PR.

Considered under ADR 0174 whether to rule this two-way (e.g. ready-for-agent/no-triage): there is no agent decision to rule — the implementation is already in a PR, and merging a stacked PR onto a human-merged landing branch is the reserved human act, not a revertible agent call. Hence ready-for-human, not an agent ruling.

> *This was generated by AI during triage.* ## Triage — `ready-for-human` **Established so far:** - Built in Ben's interactive session; PR **#1797** (`idip-unrestrict`) is up, **stacked on `idip-credentials-ui`** (base = that branch, not `main`), so it lands only **after #1796 / #1759 merges**. PR is `mergeable: true` against its stacked base. - All three acceptance clauses (unrestrict-one with no open-to-all window; 409 refusing the last opener with the two-way-out copy; editor offers the act only where it applies) reported covered by seam tests (controlapi + gate over the same matrix) plus the dashboard suite. - Session claim released; `ready-for-agent` deliberately **not** restored so the swarm does not redo built work. ## Why human The only residue is a **human merge of PR #1797**, which sits on the `landing-pr` branch a human merges (ADR 0267) and lands after #1796. No agent work remains — the code exists in the PR. Considered under ADR 0174 whether to rule this two-way (e.g. `ready-for-agent`/`no-triage`): there is no agent decision to rule — the implementation is already in a PR, and merging a stacked PR onto a human-merged landing branch is the reserved human act, not a revertible agent call. Hence `ready-for-human`, not an agent ruling.
ben 2026-09-23 21:19:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1778
No description provided.