Spike: kanidm + Netbird provisioning — gates founding on ADRs 0038/0039 #5

Closed
opened 2026-07-09 02:25:39 +00:00 by ben · 3 comments
Owner

Spike — kanidm + Netbird provisioning (IdP/mesh pairing)

Gating spike (PROCESS.md Phase 2½): validates ADR feasibility, references
no seam contract, depends on nothing — a root by construction. ADR 0038 names
it explicitly: kanidm client/group provisioning + Caddy ingress "must be
validated before the founding feature builds on it — same role S13 plays for
clan driving." ADR 0039 adds: "Netbird's management plane authenticates via
OIDC against kanidm; the kanidm gating spike validates the pairing."

Task manifest

task: spike-kanidm-netbird-provisioning
type: spike
validates:
  - docs/adr/0038-kanidm-as-built-in-idp.md
  - docs/adr/0039-netbird-as-mesh-layer.md
informs:
  - docs/seams/agent-control-plane.md   # open decision 2: CA machinery at v1
acceptance:
  - given: questions Q1–Q6 below
    when: the timebox ends
    then: each has an explicit verdict — confirmed /
          confirmed-with-workaround (described) / broken (described) — with
          evidence (commands, output; resource-footprint numbers deferred —
          see Environment)
  - given: a broken verdict on Q1 (declarative kanidm provisioning) or Q4
    (Netbird↔kanidm OIDC pairing)
    then: stop early and write up — ADR 0038/0039 get revisited before
          founding builds on them
depends_on: []
out_of_scope:
  - brand-kit theming of the kanidm login beyond name/logo — ADR 0038
    documents this as the accepted exception (DDR 0007 absorbs it)
  - the member-join passkey flow UI (this spike proves the IdP substrate only)
  - re-evaluating ZITADEL/Keycloak/Authentik (decided in ADR 0038)
  - headless clan driving (spike S13's job — run this spike's stack hand-driven
    or scripted, whichever is fastest)
  - deciding CA machinery at v1 — the decision SHAPE is now fixed (seam gate,
    2026-07-09): the IdentityGrant interface is confirmed as written; v1 depth
    defaults to the FULL community CA unless this spike's Q6 evidence shows
    CA-at-enrollment is genuinely hard on this stack. Q6 gathers the evidence
    that resolves the default; it still does not decide.
needs_human_decision: []   # resolved 2026-07-09: clan-lab + lab-DNS skill (see agent brief)
# gating: native Forgejo dependency — blocked by the "matou.nz lab DNS skill"
# issue until it closes (list-ready-tasks.sh hides this issue meanwhile)

Why this spike exists

Founding seeds the control plane — config repo, deploy runner, IdP, dashboard —
onto the cluster declaratively. ADR 0038 picked kanidm as the built-in OIDC IdP
because its clients and groups can be declared in Nix (services.kanidm
provisioning options): no container, no embedded postgres, no imperative API
bootstrapping. But the clan-mauke spike specced this choice without
exercising it
— its Phase 9 (identity + ingress) never ran. ADR 0039 then
swapped the mesh from ZeroTier to Netbird, whose management plane must
authenticate against that same kanidm. Two accepted ADRs are stacked on an
unexercised integration; this spike exercises it before the founding feature
builds on it.

Environment

  • Resolved 2026-07-09 (triage): the clan-lab skill environment. node1
    plays the gateway (the lab droplet's public 80/443 forward to it); node2/3
    are the peer nodes. Read the skill's SKILL.md before any infra action;
    provision only through the clan-lab CLI.
  • Public TLS origin (Q2): point the real A record clan-lab.matou.nz
    at the lab droplet's public IP with the lab-dns skill
    (.claude/skills/lab-dns/ — built and live-verified under #6, now closed);
    it overrides the *.matou.nz wildcard. TLS terminates on node1's own
    Caddy
    (real ACME through the forwarded 80/443) — that is the topology Q2
    exists to verify; do not terminate TLS anywhere upstream. The WebAuthn
    origin is https://clan-lab.matou.nz. Teardown includes lab-dns park.
  • Resource-footprint deferral: clan-lab's honesty limits forbid
    perf/resource-floor numbers from nested VMs. The "measured footprint on the
    4 GB gateway floor" deliverable is deferred to a real host — record in
    the findings that it remains unmeasured, with whatever coarse observations
    fall out for free (clearly labelled as non-evidence).
  • NixOS on the gateway; pin nixpkgs/kanidm/Netbird versions at the start and
    record them in the findings.
  • Prototype in spikes/kanidm-netbird/; findings in
    docs/spike-findings/kanidm-netbird.md.

The questions

Q1. Declarative kanidm provisioning (load-bearing)

Stand up kanidm via services.kanidm with OIDC clients and groups declared
in Nix
— the dashboard and Netbird management as clients, operator/member
groups seeded — entirely from the config repo. No imperative bootstrap: rebuild
the machine from config and the IdP comes back identical. Verify the
WebAuthn-first login actually works end-to-end (register a passkey, log in).
How complete are the provisioning options in practice — what still needs
out-of-band CLI/API calls, if anything?

Q2. Caddy ingress (the mauke Phase 9 that never ran)

Put kanidm behind Caddy on the gateway per the gateway role: TLS + proxy, with
the service reachable publicly for login while its backing ports stay
mesh-only. Confirm certificate handling and any kanidm-behind-proxy gotchas
(origin/URL config, WebAuthn origin binding).

Q3. Netbird as a custom clan service

Author the custom netbird clan service ADR 0039 commits to: management +
signal + relay role on the gateway, peer role fleet-wide. The mauke spike's
pg-ha/redis-ha pattern says custom clan services are routine — confirm
that holds for Netbird's shape. A peer node must join the mesh and reach the
gateway over it.

Q4. The pairing — Netbird management authenticates via OIDC against kanidm

The integration both ADRs lean on: Netbird's management plane configured as an
OIDC client of the community's own kanidm. Log in to Netbird's admin surface
with a kanidm identity; enroll a peer under that regime. Report any impedance
(token formats, PKCE/device-flow support, group-to-access mapping).

Q5. Mesh operational rules transfer

Apply and verify the mauke spike's rules on this stack: service ports open on
the mesh interface only (never WAN/LAN) except the deliberately-public ingress;
test the actual TCP port, not ICMP. Report the resulting port/firewall layout
as the reference for the founding feature.

Q6. Evidence for the CA question (gather, don't decide)

Updated by the seam gate, 2026-07-09 (docs/seams/agent-control-plane.md
open decision 2 is now DECIDED in shape): the IdentityGrant interface is
confirmed as written under either implementation, and v1 implementation depth
defaults to the full community CA (NodeCert + SSH host cert minted at
enrollment) unless this spike shows that is genuinely hard on this stack —
in which case v1 ships the shortcut (Netbird admission + pinned SSH host key)
stubbed behind the same types.

So Q6's job is sharper than before: from what this spike builds, report what
Netbird admission gives for free, and what cert minting would concretely add —
CA key generation at founding, the two signing operations at approval, cert
install on the peer — as effort, moving parts, and failure modes. End with an
explicit verdict on one axis only: CA-at-enrollment on this stack is
{cheap | workable | genuinely hard}
, with evidence. That verdict resolves
the default; the gate's comparison (sequence diagrams + trade-off table) found
the shortcut saves only three steps and one key ceremony at v1 while owing a
live-fleet migration, so "genuinely hard" is the only finding that flips it.

Deliverables & exit criteria

  1. Findings doc docs/spike-findings/kanidm-netbird.md: verdict per Q1–Q6
    with evidence, pinned versions, and the port/firewall reference layout
    (Q5). The resource-footprint measurement is deferred (see Environment);
    the findings must say so explicitly.
  2. Prototype spikes/kanidm-netbird/: the Nix config (kanidm provisioning,
    Caddy ingress, the custom netbird clan service) + README reproducing the
    stack from scratch.

Success = Q1–Q5 confirmed (workarounds acceptable if specified) and Q6's
evidence written up. Failure is a valid result = a broken Q1 or Q4
reverses/amends ADR 0038/0039 before founding builds on them — cheap now,
expensive later.

Timebox

One week. This spike is deliberately narrower than S13: one integration
exercised honestly beats a survey.

# Spike — kanidm + Netbird provisioning (IdP/mesh pairing) **Gating spike** (PROCESS.md Phase 2½): validates ADR feasibility, references no seam contract, depends on nothing — a root by construction. ADR 0038 names it explicitly: kanidm client/group provisioning + Caddy ingress "must be validated before the founding feature builds on it — same role S13 plays for clan driving." ADR 0039 adds: "Netbird's management plane authenticates via OIDC against kanidm; the kanidm gating spike validates the pairing." ## Task manifest ```yaml task: spike-kanidm-netbird-provisioning type: spike validates: - docs/adr/0038-kanidm-as-built-in-idp.md - docs/adr/0039-netbird-as-mesh-layer.md informs: - docs/seams/agent-control-plane.md # open decision 2: CA machinery at v1 acceptance: - given: questions Q1–Q6 below when: the timebox ends then: each has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence (commands, output; resource-footprint numbers deferred — see Environment) - given: a broken verdict on Q1 (declarative kanidm provisioning) or Q4 (Netbird↔kanidm OIDC pairing) then: stop early and write up — ADR 0038/0039 get revisited before founding builds on them depends_on: [] out_of_scope: - brand-kit theming of the kanidm login beyond name/logo — ADR 0038 documents this as the accepted exception (DDR 0007 absorbs it) - the member-join passkey flow UI (this spike proves the IdP substrate only) - re-evaluating ZITADEL/Keycloak/Authentik (decided in ADR 0038) - headless clan driving (spike S13's job — run this spike's stack hand-driven or scripted, whichever is fastest) - deciding CA machinery at v1 — the decision SHAPE is now fixed (seam gate, 2026-07-09): the IdentityGrant interface is confirmed as written; v1 depth defaults to the FULL community CA unless this spike's Q6 evidence shows CA-at-enrollment is genuinely hard on this stack. Q6 gathers the evidence that resolves the default; it still does not decide. needs_human_decision: [] # resolved 2026-07-09: clan-lab + lab-DNS skill (see agent brief) # gating: native Forgejo dependency — blocked by the "matou.nz lab DNS skill" # issue until it closes (list-ready-tasks.sh hides this issue meanwhile) ``` ## Why this spike exists Founding seeds the control plane — config repo, deploy runner, IdP, dashboard — onto the cluster declaratively. ADR 0038 picked kanidm as the built-in OIDC IdP *because* its clients and groups can be declared in Nix (`services.kanidm` provisioning options): no container, no embedded postgres, no imperative API bootstrapping. But the clan-mauke spike specced this choice **without exercising it** — its Phase 9 (identity + ingress) never ran. ADR 0039 then swapped the mesh from ZeroTier to Netbird, whose management plane must authenticate against that same kanidm. Two accepted ADRs are stacked on an unexercised integration; this spike exercises it before the founding feature builds on it. ## Environment - **Resolved 2026-07-09 (triage): the `clan-lab` skill environment.** node1 plays the gateway (the lab droplet's public 80/443 forward to it); node2/3 are the peer nodes. Read the skill's SKILL.md before any infra action; provision only through the `clan-lab` CLI. - **Public TLS origin (Q2):** point the real A record **`clan-lab.matou.nz`** at the lab droplet's public IP with the **`lab-dns` skill** (`.claude/skills/lab-dns/` — built and live-verified under #6, now closed); it overrides the `*.matou.nz` wildcard. TLS terminates on **node1's own Caddy** (real ACME through the forwarded 80/443) — that is the topology Q2 exists to verify; do not terminate TLS anywhere upstream. The WebAuthn origin is `https://clan-lab.matou.nz`. Teardown includes `lab-dns park`. - **Resource-footprint deferral:** clan-lab's honesty limits forbid perf/resource-floor numbers from nested VMs. The "measured footprint on the 4 GB gateway floor" deliverable is **deferred to a real host** — record in the findings that it remains unmeasured, with whatever coarse observations fall out for free (clearly labelled as non-evidence). - NixOS on the gateway; pin nixpkgs/kanidm/Netbird versions at the start and record them in the findings. - Prototype in `spikes/kanidm-netbird/`; findings in `docs/spike-findings/kanidm-netbird.md`. ## The questions ### Q1. Declarative kanidm provisioning (load-bearing) Stand up kanidm via `services.kanidm` with **OIDC clients and groups declared in Nix** — the dashboard and Netbird management as clients, operator/member groups seeded — entirely from the config repo. No imperative bootstrap: rebuild the machine from config and the IdP comes back identical. Verify the WebAuthn-first login actually works end-to-end (register a passkey, log in). How complete are the provisioning options in practice — what still needs out-of-band CLI/API calls, if anything? ### Q2. Caddy ingress (the mauke Phase 9 that never ran) Put kanidm behind Caddy on the gateway per the gateway role: TLS + proxy, with the service reachable publicly for login while its backing ports stay mesh-only. Confirm certificate handling and any kanidm-behind-proxy gotchas (origin/URL config, WebAuthn origin binding). ### Q3. Netbird as a custom clan service Author the custom `netbird` clan service ADR 0039 commits to: management + signal + relay role on the gateway, peer role fleet-wide. The mauke spike's `pg-ha`/`redis-ha` pattern says custom clan services are routine — confirm that holds for Netbird's shape. A peer node must join the mesh and reach the gateway over it. ### Q4. The pairing — Netbird management authenticates via OIDC against kanidm The integration both ADRs lean on: Netbird's management plane configured as an OIDC client of the community's own kanidm. Log in to Netbird's admin surface with a kanidm identity; enroll a peer under that regime. Report any impedance (token formats, PKCE/device-flow support, group-to-access mapping). ### Q5. Mesh operational rules transfer Apply and verify the mauke spike's rules on this stack: service ports open on the mesh interface only (never WAN/LAN) except the deliberately-public ingress; test the actual TCP port, not ICMP. Report the resulting port/firewall layout as the reference for the founding feature. ### Q6. Evidence for the CA question (gather, don't decide) **Updated by the seam gate, 2026-07-09** (`docs/seams/agent-control-plane.md` open decision 2 is now DECIDED in shape): the `IdentityGrant` interface is confirmed as written under either implementation, and v1 implementation depth **defaults to the full community CA** (NodeCert + SSH host cert minted at enrollment) **unless this spike shows that is genuinely hard on this stack** — in which case v1 ships the shortcut (Netbird admission + pinned SSH host key) stubbed behind the same types. So Q6's job is sharper than before: from what this spike builds, report what Netbird admission gives for free, and what cert minting would concretely add — CA key generation at founding, the two signing operations at approval, cert install on the peer — as effort, moving parts, and failure modes. End with an explicit verdict on one axis only: **CA-at-enrollment on this stack is {cheap | workable | genuinely hard}**, with evidence. That verdict resolves the default; the gate's comparison (sequence diagrams + trade-off table) found the shortcut saves only three steps and one key ceremony at v1 while owing a live-fleet migration, so "genuinely hard" is the only finding that flips it. ## Deliverables & exit criteria 1. **Findings doc** `docs/spike-findings/kanidm-netbird.md`: verdict per Q1–Q6 with evidence, pinned versions, and the port/firewall reference layout (Q5). The resource-footprint measurement is deferred (see Environment); the findings must say so explicitly. 2. **Prototype** `spikes/kanidm-netbird/`: the Nix config (kanidm provisioning, Caddy ingress, the custom netbird clan service) + README reproducing the stack from scratch. **Success** = Q1–Q5 confirmed (workarounds acceptable if specified) and Q6's evidence written up. **Failure is a valid result** = a broken Q1 or Q4 reverses/amends ADR 0038/0039 before founding builds on them — cheap now, expensive later. ## Timebox One week. This spike is deliberately narrower than S13: one integration exercised honestly beats a survey.
Author
Owner

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Run the kanidm + Netbird provisioning spike on the clan-lab environment, with a real public TLS origin via lab-<name>.matou.nz, delivering a verdict per Q1–Q6.

Current behavior:
ADRs 0038 (kanidm as built-in IdP) and 0039 (Netbird as mesh layer) are accepted but stacked on an unexercised integration — the clan-mauke spike's Phase 9 (identity + ingress) never ran. Nothing has demonstrated declarative kanidm provisioning from Nix, Caddy ingress with real certificates, a custom netbird clan service, or Netbird's management plane authenticating via OIDC against kanidm.

Desired behavior:
Each question Q1–Q6 in the issue body has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence, in the findings doc named by the task manifest. A broken Q1 or Q4 stops the spike early and writes up: revisiting ADR 0038/0039 before founding builds on them is a success outcome.

Environment (the resolved human decision):
Use the clan-lab skill (read its SKILL.md first; provision only through the clan-lab CLI). node1 is the gateway — the droplet's public 80/443 forward to it; node2/3 are peers. For Q2's real TLS: this issue is blocked by the lab-DNS-skill issue; once that skill exists, point lab-<name>.matou.nz at the lab droplet's IP so node1's own Caddy completes ACME and owns the WebAuthn origin. Do not terminate TLS anywhere upstream of node1 — the topology is the thing under test. Resource-footprint numbers are deferred (nested-VM honesty limits); the findings must say so explicitly.

Key interfaces:

  • The findings doc and prototype directory named in the issue's task manifest — prototype reproducible from its README.
  • services.kanidm provisioning options (clients + groups declared in Nix) — Q1's whole point is "no imperative bootstrap"; anything needing out-of-band CLI/API calls gets named in the findings.
  • The custom netbird clan service shape (management + signal + relay on the gateway, peer role fleet-wide) — written as a clan service in the lab's clan flake.
  • docs/seams/agent-control-plane.md open decision 2 — Q6 gathers CA evidence for it; it does not decide it.

Acceptance criteria:

  • Each of Q1–Q6 has a verdict with evidence in the findings doc
  • Q1 includes an end-to-end passkey register + login against the real origin
  • Early-stop rule honored: broken Q1 or Q4 → stop and write up
  • Port/firewall reference layout (Q5) recorded for the founding feature
  • Pinned nixpkgs/kanidm/Netbird versions recorded
  • Footprint deferral stated explicitly in the findings
  • Lab torn down: clan-lab status empty, the lab-* DNS record removed
  • STATUS.md updated in the same commit as the findings (repo convention)

Out of scope (from the manifest):

  • Brand-kit theming of the kanidm login beyond name/logo; the member-join passkey flow UI
  • Re-evaluating ZITADEL/Keycloak/Authentik; headless clan driving (S13's job — drive this stack however is fastest)
  • Deciding CA machinery at v1 (Q6 gathers evidence; the seam gate decides)
  • matou-prod and every existing DNS record — only lab-* names may be touched, via the lab-DNS skill
> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Run the kanidm + Netbird provisioning spike on the clan-lab environment, with a real public TLS origin via `lab-<name>.matou.nz`, delivering a verdict per Q1–Q6. **Current behavior:** ADRs 0038 (kanidm as built-in IdP) and 0039 (Netbird as mesh layer) are accepted but stacked on an unexercised integration — the clan-mauke spike's Phase 9 (identity + ingress) never ran. Nothing has demonstrated declarative kanidm provisioning from Nix, Caddy ingress with real certificates, a custom `netbird` clan service, or Netbird's management plane authenticating via OIDC against kanidm. **Desired behavior:** Each question Q1–Q6 in the issue body has an explicit verdict — confirmed / confirmed-with-workaround (described) / broken (described) — with evidence, in the findings doc named by the task manifest. A broken Q1 or Q4 stops the spike early and writes up: revisiting ADR 0038/0039 before founding builds on them is a success outcome. **Environment (the resolved human decision):** Use the `clan-lab` skill (read its SKILL.md first; provision only through the `clan-lab` CLI). node1 is the gateway — the droplet's public 80/443 forward to it; node2/3 are peers. For Q2's real TLS: this issue is blocked by the lab-DNS-skill issue; once that skill exists, point `lab-<name>.matou.nz` at the lab droplet's IP so **node1's own Caddy** completes ACME and owns the WebAuthn origin. Do not terminate TLS anywhere upstream of node1 — the topology is the thing under test. Resource-footprint numbers are deferred (nested-VM honesty limits); the findings must say so explicitly. **Key interfaces:** - The findings doc and prototype directory named in the issue's task manifest — prototype reproducible from its README. - `services.kanidm` provisioning options (clients + groups declared in Nix) — Q1's whole point is "no imperative bootstrap"; anything needing out-of-band CLI/API calls gets named in the findings. - The custom `netbird` clan service shape (management + signal + relay on the gateway, peer role fleet-wide) — written as a clan service in the lab's clan flake. - `docs/seams/agent-control-plane.md` open decision 2 — Q6 gathers CA evidence for it; it does not decide it. **Acceptance criteria:** - [ ] Each of Q1–Q6 has a verdict with evidence in the findings doc - [ ] Q1 includes an end-to-end passkey register + login against the real origin - [ ] Early-stop rule honored: broken Q1 or Q4 → stop and write up - [ ] Port/firewall reference layout (Q5) recorded for the founding feature - [ ] Pinned nixpkgs/kanidm/Netbird versions recorded - [ ] Footprint deferral stated explicitly in the findings - [ ] Lab torn down: `clan-lab status` empty, the `lab-*` DNS record removed - [ ] STATUS.md updated in the same commit as the findings (repo convention) **Out of scope (from the manifest):** - Brand-kit theming of the kanidm login beyond name/logo; the member-join passkey flow UI - Re-evaluating ZITADEL/Keycloak/Authentik; headless clan driving (S13's job — drive this stack however is fastest) - Deciding CA machinery at v1 (Q6 gathers evidence; the seam gate decides) - matou-prod and every existing DNS record — only `lab-*` names may be touched, via the lab-DNS skill
Author
Owner

Seam-gate update (2026-07-09): docs/seams/agent-control-plane.md open decision 2 is decided in shape — the IdentityGrant interface is confirmed as written; v1 depth defaults to the full community CA unless this spike's Q6 shows CA-at-enrollment is genuinely hard on this stack. Q6 in the body has been updated accordingly: it now ends with an explicit {cheap | workable | genuinely hard} verdict, which is what resolves the default.

Seam-gate update (2026-07-09): `docs/seams/agent-control-plane.md` open decision 2 is decided in shape — the `IdentityGrant` interface is confirmed as written; v1 depth defaults to the **full community CA** unless this spike's Q6 shows CA-at-enrollment is genuinely hard on this stack. Q6 in the body has been updated accordingly: it now ends with an explicit `{cheap | workable | genuinely hard}` verdict, which is what resolves the default.
Author
Owner

Spike #5 complete — all questions cleared; neither ADR 0038 nor 0039 reversed.

Ran headless against the clan-lab lab with a real public origin
(clan-lab.matou.nz, real Let's Encrypt cert). Findings:
docs/spike-findings/kanidm-netbird.md; prototype: spikes/kanidm-netbird/.
Committed in a55e556.

Q Verdict
Q1 declarative kanidm provisioning + WebAuthn login (load-bearing) confirmed
Q2 Caddy ingress, real ACME, WebAuthn origin binding confirmed
Q3 custom netbird clanService, peer joins mesh confirmed
Q4 Netbird mgmt ↔ kanidm OIDC pairing (load-bearing) confirmed
Q5 mesh operational rules (ports on mesh only) confirmed
Q6 CA-at-enrollment evidence workable → default holds: full community CA at v1

Highlights:

  • Q1: kanidm from services.kanidm with OIDC clients + groups declared
    purely in Nix (provision) — no imperative bootstrap. WebAuthn-first login
    proven end-to-end with a Chromium CDP virtual authenticator against the real
    origin (register passkey → log in → landed on /ui/apps). Only out-of-band
    step: passkey enrolment (inherent to WebAuthn), via a reset token.
  • Q2: kanidm behind node1's own Caddy, real ACME over the forwarded 443,
    backing port 127.0.0.1:8443 only.
  • Q4: management configured itself from kanidm's OIDC discovery/JWKS; a
    kanidm identity authenticated to Netbird's management plane end-to-end
    (passkey → kanidm OAuth2 PKCE → JWT → POST /api/setup-keys HTTP 200;
    garbage/no token → 401). That setup key then enrolled a peer (Q3).
  • Impedance (reported): kanidm is an OIDC issuer, not a Netbird
    IdP-manager (no user/group sync — mesh access = Netbird groups + setup keys);
    kanidm advertises no device flow, so CLI SSO uses the PKCE loopback flow.
  • Supply-chain input: kanidmWithSecretProvisioning_1_10 is patched and not
    on the public binary cache — the founding gateway builds it (or OurCloud's
    cache serves it), same shape as S13's clan-cli.

Resource-footprint measurement remains DEFERRED to a real host per the
clan-lab honesty limits (recorded in the findings).

Lab destroyed, lab-dns parked. Next (Blocked on Ben): flip
docs/seams/agent-control-plane.md open decision 2 → full-CA + status: confirmed.

**Spike #5 complete — all questions cleared; neither ADR 0038 nor 0039 reversed.** Ran headless against the `clan-lab` lab with a real public origin (`clan-lab.matou.nz`, real Let's Encrypt cert). Findings: `docs/spike-findings/kanidm-netbird.md`; prototype: `spikes/kanidm-netbird/`. Committed in `a55e556`. | Q | Verdict | |---|---| | Q1 declarative kanidm provisioning + WebAuthn login (load-bearing) | **confirmed** | | Q2 Caddy ingress, real ACME, WebAuthn origin binding | **confirmed** | | Q3 custom `netbird` clanService, peer joins mesh | **confirmed** | | Q4 Netbird mgmt ↔ kanidm OIDC pairing (load-bearing) | **confirmed** | | Q5 mesh operational rules (ports on mesh only) | **confirmed** | | Q6 CA-at-enrollment evidence | **`workable`** → default holds: full community CA at v1 | Highlights: - **Q1:** kanidm from `services.kanidm` with OIDC clients + groups declared purely in Nix (`provision`) — no imperative bootstrap. WebAuthn-first login proven end-to-end with a Chromium CDP virtual authenticator against the real origin (register passkey → log in → landed on `/ui/apps`). Only out-of-band step: passkey *enrolment* (inherent to WebAuthn), via a reset token. - **Q2:** kanidm behind node1's own Caddy, real ACME over the forwarded 443, backing port `127.0.0.1:8443` only. - **Q4:** management configured itself from kanidm's OIDC discovery/JWKS; a kanidm identity authenticated to Netbird's management plane end-to-end (passkey → kanidm OAuth2 PKCE → JWT → `POST /api/setup-keys` **HTTP 200**; garbage/no token → 401). That setup key then enrolled a peer (Q3). - **Impedance (reported):** kanidm is an OIDC *issuer*, **not** a Netbird IdP-manager (no user/group sync — mesh access = Netbird groups + setup keys); kanidm advertises **no device flow**, so CLI SSO uses the PKCE loopback flow. - **Supply-chain input:** `kanidmWithSecretProvisioning_1_10` is patched and not on the public binary cache — the founding gateway builds it (or OurCloud's cache serves it), same shape as S13's clan-cli. **Resource-footprint measurement remains DEFERRED** to a real host per the clan-lab honesty limits (recorded in the findings). Lab destroyed, `lab-dns park`ed. Next (Blocked on Ben): flip `docs/seams/agent-control-plane.md` open decision 2 → full-CA + `status: confirmed`.
ben closed this issue 2026-07-09 20:24:31 +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.

Reference
Matou/idss#5
No description provided.