OpenBao SSH CAs: signer mount + host CA + JWT auth bound to kanidm groups + sign policies #49

Open
opened 2026-11-08 00:15:17 +00:00 by ginjiruu · 1 comment
Owner

Server side of the SSH certificate epic (lab/machine-configs epic below). Terraform under the OpenBao root established in lab/iac#47, applied via tofu-controller.

Scope

  • Signer mount. secrets enable -path=ssh-client-signer ssh (one CA to start; add -ssh-<zone> mounts when zones become real). config/ca generate_signing_key=true. SSH CAs are standalone: no chain to the x509 root from lab/machine-configs#9.
  • Sign role. allow_user_certificates, key_type=ca, ttl 30m, default_extensions = {permit-pty}, allowed_users_template = {{identity.entity.aliases.<jwt-mount-accessor>.name}}, key_ref/allowed_user_key_identifiers to taste.
  • JWT/OIDC auth. auth mount against kanidm (auth.animeteamspeak.moe, client provisioned via lab/iac#48/#35 pattern): oidc type, user_claim = the login claim that matches the ssh principal, bound_audiences. Role per zone; zone gating = bound_claims on the kanidm groups claim (or an update-claim-map custom claim on the OpenBao oauth2 client).
  • Host signer. separate mount, max-lease 10y, role allow_host_certificates=true, allowed_domains on the fleet domain.
  • Policies. one sign policy per zone (ssh-<zone>/sign/* read), attached to the matching JWT role only. Nothing else gets sign paths.
  • Audit. confirm the audit device records auth/*/login and ssh-*/sign/*; ship to VictoriaLogs (clusters side, follow-up).
  • CA public key export. output the client + host CA public keys where machine-configs can consume them (KV path or data source; lab/machine-configs#18 consumes).

Done when

  • bao login -method=oidc with a kanidm session yields a signed cert carrying only the caller's principal
  • cert from the fleet CA authenticates on the harness host; an untrusted CA's cert is refused
  • zone B policy cannot sign zone A roles
  • CA public keys readable by machine-configs without manual copying
  • sign events visible in the audit stream
Server side of the SSH certificate epic (lab/machine-configs epic below). Terraform under the OpenBao root established in lab/iac#47, applied via tofu-controller. ## Scope - **Signer mount.** `secrets enable -path=ssh-client-signer ssh` (one CA to start; add `-ssh-<zone>` mounts when zones become real). `config/ca generate_signing_key=true`. SSH CAs are standalone: no chain to the x509 root from lab/machine-configs#9. - **Sign role.** `allow_user_certificates`, `key_type=ca`, ttl 30m, `default_extensions = {permit-pty}`, `allowed_users_template = {{identity.entity.aliases.<jwt-mount-accessor>.name}}`, `key_ref`/`allowed_user_key_identifiers` to taste. - **JWT/OIDC auth.** auth mount against kanidm (`auth.animeteamspeak.moe`, client provisioned via lab/iac#48/#35 pattern): `oidc` type, `user_claim` = the login claim that matches the ssh principal, `bound_audiences`. Role per zone; zone gating = `bound_claims` on the kanidm groups claim (or an `update-claim-map` custom claim on the OpenBao oauth2 client). - **Host signer.** separate mount, max-lease 10y, role `allow_host_certificates=true`, `allowed_domains` on the fleet domain. - **Policies.** one sign policy per zone (`ssh-<zone>/sign/*` read), attached to the matching JWT role only. Nothing else gets sign paths. - **Audit.** confirm the audit device records `auth/*/login` and `ssh-*/sign/*`; ship to VictoriaLogs (clusters side, follow-up). - **CA public key export.** output the client + host CA public keys where machine-configs can consume them (KV path or data source; lab/machine-configs#18 consumes). ## Done when - [ ] `bao login -method=oidc` with a kanidm session yields a signed cert carrying only the caller's principal - [ ] cert from the fleet CA authenticates on the harness host; an untrusted CA's cert is refused - [ ] zone B policy cannot sign zone A roles - [ ] CA public keys readable by machine-configs without manual copying - [ ] sign events visible in the audit stream
Author
Owner

Parent epic: lab/machine-configs#19

Parent epic: lab/machine-configs#19
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
lab/iac#49
No description provided.