pairing T3: the 1.1 descriptor answers from outside — the community's doors, schemas, sign-in address and stack in one document #1512

Closed
opened 2026-09-16 03:13:33 +00:00 by ben · 3 comments
Owner

Parent

Spec #1495 (community app pairing — the descriptor and config server on the gateway, the S3a wallet choice and S3a-APP, the Coa submission at the pipeline tail, the app card). Program map #1293 (the community wallet). Design contract: ADR 0226 (amended by ADRs 0235, 0236, 0238 and the 2026-09-15 spaces amendment) and DDR 0228 (amended by DDR 0239).

Story 8 of the spec (and the block #1492 waits on: signin{url}).

What to build

Everything a wallet needs to know about a community, fetched once from its apex: who the community is,
where its identity doors are, which credential kinds it issues, where to apply to join, where to sign in,
and what generation of the stack it runs. A wallet built for the older document must keep working against
it; a wallet built for this one must need nothing else.

Acceptance criteria

  • Pinned to config server 1.1, the gateway renders per-door absolute URLs and the witness file,
    and GET https://<apex>/api/client-config from outside returns version: "1.1" carrying: the
    identity doors as this gateway's real addresses; the one community witness's runtime-minted AID and
    OOBI; community{name, slug, aid, oobi, registry}; api_url; schemas (each credential kind's
    SAID and this gateway's public OOBI); boot{gated: false, join_url}; backend_kind: "idss";
    stack; and signin{url} naming the community's sign-in page
  • The served document equals the golden document for that branch (T2), byte-compared in the seam
  • No doorkeeper block exists; no admin token, passcode or private key material appears anywhere in
    the document
  • With no any-sync installed the document carries no anysync key; with it installed the block
    names the gateway's nodes
  • A 1.0 loader reading the served document drops the unknown keys and boots (asserted against the
    real document, not a hand-written sample)

Blocked by

Tracker: #1510, #1511, Matou/matou-infrastructure#23

  • T1, T2
  • matou-infrastructure MI-1 (config server 1.1)

Task manifest

task: descriptor-1-1-served
seam: internal/controlapi integration (golden compare) + an outside fetch on the drive
depends_on: [pairing:descriptor-writer, matou-infrastructure:config-server-1-1]
out_of_scope: [a signed descriptor, the recognition hint, per-community schemas beyond `schemas`]
needs_human_decision: []
## Parent Spec **#1495** (community app pairing — the descriptor and config server on the gateway, the S3a wallet choice and S3a-APP, the Coa submission at the pipeline tail, the app card). Program map **#1293** (the community wallet). Design contract: **ADR 0226** (amended by ADRs 0235, 0236, 0238 and the 2026-09-15 spaces amendment) and **DDR 0228** (amended by DDR 0239). Story 8 of the spec (and the block #1492 waits on: `signin{url}`). ## What to build Everything a wallet needs to know about a community, fetched once from its apex: who the community is, where its identity doors are, which credential kinds it issues, where to apply to join, where to sign in, and what generation of the stack it runs. A wallet built for the older document must keep working against it; a wallet built for this one must need nothing else. ## Acceptance criteria - [ ] Pinned to config server **1.1**, the gateway renders per-door absolute URLs and the witness file, and `GET https://<apex>/api/client-config` from outside returns `version: "1.1"` carrying: the identity doors as this gateway's real addresses; the one community witness's runtime-minted AID and OOBI; `community{name, slug, aid, oobi, registry}`; `api_url`; `schemas` (each credential kind's SAID and this gateway's public OOBI); `boot{gated: false, join_url}`; `backend_kind: "idss"`; `stack`; and `signin{url}` naming the community's sign-in page - [ ] The served document equals the golden document for that branch (T2), byte-compared in the seam - [ ] No `doorkeeper` block exists; no admin token, passcode or private key material appears anywhere in the document - [ ] With no any-sync installed the document carries **no** `anysync` key; with it installed the block names the gateway's nodes - [ ] A 1.0 loader reading the served document drops the unknown keys and boots (asserted against the real document, not a hand-written sample) ## Blocked by Tracker: #1510, #1511, Matou/matou-infrastructure#23 - T1, T2 - matou-infrastructure MI-1 (config server 1.1) ## Task manifest ```yaml task: descriptor-1-1-served seam: internal/controlapi integration (golden compare) + an outside fetch on the drive depends_on: [pairing:descriptor-writer, matou-infrastructure:config-server-1-1] out_of_scope: [a signed descriptor, the recognition hint, per-community schemas beyond `schemas`] needs_human_decision: [] ```
Author
Owner

Config server 1.1 is landing in matou-infrastructure (#23) — the env contract this ticket renders

The seeded config-server (/srv/idss/bin/config-server) reads its 1.1 configuration from the unit's environment, nothing else changes about ExecStart:

  • Per-door layout — set all five (a partial set refuses to start): KERIA_ADMIN_URL=https://keria.<apex>, KERIA_CESR_URL=https://keria-cesr.<apex>, KERIA_BOOT_URL=https://keria-boot.<apex>, SCHEMA_SERVER_URL=https://schema.<apex>, CONFIG_SERVER_URL=https://<apex>. Served verbatim as keri.{admin,cesr,boot}_url, schema_server_url, config_server_url; outranks PUBLIC_BASE_URL and the raw ports.
  • Witness file — WITNESS_FILE=/path/witnesses.json, a JSON list of {"name", "url", "aid"[, "oobi"]}; one entry is legal (the floor is one); oobi defaults to <url>/oobi/<aid>. With it set the six demo witnesses are never served; a malformed file exits 2 with a WITNESS_FILE refused: line.
  • The document — the control plane's PUT /api/config with the admin bearer (what #1511 already does) is the create-or-replace; the server validates community.aid + community.name (or the 1.0 organization pair) and stores the body verbatim. GET /api/client-config = the minted keys (mode, keri, schema_server_url, config_server_url, witnesses, push_relay_url) + every block of the stored document merged over them (version follows the document → "1.1"); a stored document can never override a minted key; doorkeeper is dropped on every read; anysync is served from the document when it carries one, else from the mode's client file, else absent.

So the golden compare here is: golden document + the five doors + mode: "prod" + the witness block from the file. Tests: tests/test_config_server_1_1.py in that repo (56 checks).

**Config server 1.1 is landing in matou-infrastructure (#23) — the env contract this ticket renders** The seeded `config-server` (`/srv/idss/bin/config-server`) reads its 1.1 configuration from the unit's environment, nothing else changes about `ExecStart`: - **Per-door layout** — set all five (a partial set refuses to start): `KERIA_ADMIN_URL=https://keria.<apex>`, `KERIA_CESR_URL=https://keria-cesr.<apex>`, `KERIA_BOOT_URL=https://keria-boot.<apex>`, `SCHEMA_SERVER_URL=https://schema.<apex>`, `CONFIG_SERVER_URL=https://<apex>`. Served verbatim as `keri.{admin,cesr,boot}_url`, `schema_server_url`, `config_server_url`; outranks `PUBLIC_BASE_URL` and the raw ports. - **Witness file** — `WITNESS_FILE=/path/witnesses.json`, a JSON list of `{"name", "url", "aid"[, "oobi"]}`; one entry is legal (the floor is one); `oobi` defaults to `<url>/oobi/<aid>`. With it set the six demo witnesses are never served; a malformed file exits 2 with a `WITNESS_FILE refused:` line. - **The document** — the control plane's `PUT /api/config` with the admin bearer (what #1511 already does) is the create-or-replace; the server validates `community.aid` + `community.name` (or the 1.0 `organization` pair) and stores the body verbatim. `GET /api/client-config` = the minted keys (`mode`, `keri`, `schema_server_url`, `config_server_url`, `witnesses`, `push_relay_url`) + every block of the stored document merged over them (`version` follows the document → `"1.1"`); a stored document can never override a minted key; `doorkeeper` is dropped on every read; `anysync` is served from the document when it carries one, else from the mode's client file, else absent. So the golden compare here is: golden document + the five doors + `mode: "prod"` + the witness block from the file. Tests: `tests/test_config_server_1_1.py` in that repo (56 checks).

swarm-claim host=elitebook-distributed-server-03 run=26656
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=26656 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1512 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1512,
  "status": "success",
  "commits": [
    "d6ebfb0b"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/keri.go",
    "internal/clan/keri_test.go",
    "internal/controlapi/descriptor_1_1_served_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ ./internal/controlapi/ ./internal/orgconfig/ ./internal/descriptorprobe/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l (touched files)",
      "exit_code": 0
    },
    {
      "command": "nix-instantiate --parse (rendered keri-stack.nix)",
      "exit_code": 0
    },
    {
      "command": "pre-push go-ci gate (go test ./... + golangci-lint) — 0 issues",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Pinned to config server 1.1, the gateway renders per-door absolute URLs and the witness file, and GET client-config from outside returns version 1.1 carrying every block": "internal/clan/keri.go renderConfigServerUnit sets KERIA_ADMIN/CESR/BOOT_URL + SCHEMA_SERVER_URL + CONFIG_SERVER_URL from the apex, and config-witnesses.service writes witnesses.json (runtime AID) + WITNESS_FILE; the served shape is proven by TestServed11_CarriesEveryBlockFromOutside (doors, witness AID+OOBI, community/api_url/schemas/boot{gated:false}/backend_kind:idss/stack/signin{url}) modelling the 1.1 config server. The live outside fetch is the manifest's rehearsal-drive leg.",
    "The served document equals the golden document for that branch (T2), byte-compared in the seam": "TestServed11_EqualsGoldenDocument — the served document reduced to the descriptor struct byte-equals internal/orgconfig/testdata/golden-no-anysync.json",
    "No doorkeeper block exists; no admin token, passcode or private key material appears anywhere in the document": "TestServed11_NoDoorkeeperNoSecrets — served map has no doorkeeper key; served bytes contain none of the admin token / CONFIG_ADMIN_TOKEN / passcode / PRIVATE KEY markers",
    "With no any-sync installed the document carries no anysync key; with it installed the block names the gateway's nodes": "TestServed11_AnysyncConditional — prod (no client-file fallback) omits anysync when the stored doc carries none; an installed any-sync config surfaces the anysync block with its nodes",
    "A 1.0 loader reading the served document drops the unknown keys and boots (asserted against the real document)": "TestServed11_V10LoaderDropsUnknownKeysAndBoots — a loaderV10 struct (only 1.0 fields) decodes the REAL served document, reads version+community.aid+slug+api_url, and silently drops the minted keys (mode/keri/schema_server_url/config_server_url/witnesses/push_relay_url), which the raw map is first asserted to carry"
  },
  "summary": "T3: the gateway renders the config server 1.1 per-door URLs + runtime witness file, and a golden-compare seam proves GET /api/client-config from outside carries every 1.1 block, byte-equals T2's golden, leaks no secret, gates anysync, and stays 1.0-loadable.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1512 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1512, "status": "success", "commits": [ "d6ebfb0b" ], "changed_files": [ "STATUS.md", "internal/clan/keri.go", "internal/clan/keri_test.go", "internal/controlapi/descriptor_1_1_served_test.go" ], "tests": [ { "command": "go test ./internal/clan/ ./internal/controlapi/ ./internal/orgconfig/ ./internal/descriptorprobe/", "exit_code": 0 }, { "command": "go vet ./internal/clan/ ./internal/controlapi/", "exit_code": 0 }, { "command": "gofmt -l (touched files)", "exit_code": 0 }, { "command": "nix-instantiate --parse (rendered keri-stack.nix)", "exit_code": 0 }, { "command": "pre-push go-ci gate (go test ./... + golangci-lint) — 0 issues", "exit_code": 0 } ], "criteria": { "Pinned to config server 1.1, the gateway renders per-door absolute URLs and the witness file, and GET client-config from outside returns version 1.1 carrying every block": "internal/clan/keri.go renderConfigServerUnit sets KERIA_ADMIN/CESR/BOOT_URL + SCHEMA_SERVER_URL + CONFIG_SERVER_URL from the apex, and config-witnesses.service writes witnesses.json (runtime AID) + WITNESS_FILE; the served shape is proven by TestServed11_CarriesEveryBlockFromOutside (doors, witness AID+OOBI, community/api_url/schemas/boot{gated:false}/backend_kind:idss/stack/signin{url}) modelling the 1.1 config server. The live outside fetch is the manifest's rehearsal-drive leg.", "The served document equals the golden document for that branch (T2), byte-compared in the seam": "TestServed11_EqualsGoldenDocument — the served document reduced to the descriptor struct byte-equals internal/orgconfig/testdata/golden-no-anysync.json", "No doorkeeper block exists; no admin token, passcode or private key material appears anywhere in the document": "TestServed11_NoDoorkeeperNoSecrets — served map has no doorkeeper key; served bytes contain none of the admin token / CONFIG_ADMIN_TOKEN / passcode / PRIVATE KEY markers", "With no any-sync installed the document carries no anysync key; with it installed the block names the gateway's nodes": "TestServed11_AnysyncConditional — prod (no client-file fallback) omits anysync when the stored doc carries none; an installed any-sync config surfaces the anysync block with its nodes", "A 1.0 loader reading the served document drops the unknown keys and boots (asserted against the real document)": "TestServed11_V10LoaderDropsUnknownKeysAndBoots — a loaderV10 struct (only 1.0 fields) decodes the REAL served document, reads version+community.aid+slug+api_url, and silently drops the minted keys (mode/keri/schema_server_url/config_server_url/witnesses/push_relay_url), which the raw map is first asserted to carry" }, "summary": "T3: the gateway renders the config server 1.1 per-door URLs + runtime witness file, and a golden-compare seam proves GET /api/client-config from outside carries every 1.1 block, byte-equals T2's golden, leaks no secret, gates anysync, and stays 1.0-loadable.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#1512
No description provided.