mini -> c2.caosh: carry over the API server auth config, public issuer, TODO(dns-c2) addresses #33

Open
opened 2026-11-15 17:55:45 +00:00 by ginjiruu · 0 comments
Owner

Goal: when mini is rebuilt as c2.caosh (ADR-0005), its configuration lives in machine-configs and carries these changes.

Mini runs RKE2 1.37 on Arch, configured by hand in /etc/rancher/rke2/config.yaml. Nothing in Git describes it today.

Changed on mini-01 on 2026-11-15 (by hand, recorded here)

  • kube-apiserver-arg: the five --oidc-* flags (Kanidm, client minicluster) were replaced by --authentication-config=/etc/rancher/rke2/authentication-config.yaml.
  • That file holds:
    • The Kanidm JWT authenticator, with the same issuer, audience, username claim and prefix (<issuer>#) and groups claim as before. Logins keep the same usernames.
    • Anonymous access for exactly /.well-known/openid-configuration and /openid/v1/jwks. Everything else stays 401.
  • Do not add a kube-apiserver-extra-mount for that file. RKE2 mounts it itself, and a second mount makes the API server pod invalid ("mountPath must be unique").
  • Backup of the previous config: /etc/rancher/rke2/config.yaml.bak-20261115.
  • Why: Forgejo Authorized Integrations verify the branch planner's ServiceAccount token against these two documents. RBAC for them is lab/clusters#1687.

Planned for c2: public static issuer (approved, deferred)

Give c2 a public ServiceAccount issuer, oidc.c2.animeteamspeak.moe, using --service-account-issuer and --service-account-jwks-uri. Serve the two documents statically. Then the API server needs no anonymous access, and the anonymous condition above can go.

Every consumer of the issuer changes with it:

  • OpenBao kubernetes-mini (bound_issuer, vault/mini-sa-jwks.pem)
  • the Forgejo Authorized Integrations

Addresses to switch when mini becomes c2

Search all repos for TODO(dns-c2).

Used for Now c2
SA issuer (iss) https://kubernetes.default.svc.cluster.local https://kubernetes.default.svc.c2.caosh.int.animeteamspeak.moe, or the public issuer above
jwks_uri https://10.15.1.170:6443/openid/v1/jwks c2 API address (ADR-0008 VLAN plan)
API via authz bridge mini.k8s.animeteamspeak.moe c2.k8s.animeteamspeak.moe
OpenBao address https://10.10.1.21:8200 https://secrets.infra.caosh.int.animeteamspeak.moe:8200 (lab/iac#50)
Cluster CA trusted by Forgejo mini kube-root-ca.crt c2 cluster CA
Goal: when mini is rebuilt as c2.caosh (ADR-0005), its configuration lives in machine-configs and carries these changes. Mini runs RKE2 1.37 on Arch, configured by hand in `/etc/rancher/rke2/config.yaml`. Nothing in Git describes it today. ## Changed on mini-01 on 2026-11-15 (by hand, recorded here) - `kube-apiserver-arg`: the five `--oidc-*` flags (Kanidm, client `minicluster`) were replaced by `--authentication-config=/etc/rancher/rke2/authentication-config.yaml`. - That file holds: - The Kanidm JWT authenticator, with the same issuer, audience, username claim and prefix (`<issuer>#`) and groups claim as before. Logins keep the same usernames. - Anonymous access for exactly `/.well-known/openid-configuration` and `/openid/v1/jwks`. Everything else stays 401. - Do not add a `kube-apiserver-extra-mount` for that file. RKE2 mounts it itself, and a second mount makes the API server pod invalid ("mountPath must be unique"). - Backup of the previous config: `/etc/rancher/rke2/config.yaml.bak-20261115`. - Why: Forgejo Authorized Integrations verify the branch planner's ServiceAccount token against these two documents. RBAC for them is lab/clusters#1687. ## Planned for c2: public static issuer (approved, deferred) Give c2 a public ServiceAccount issuer, `oidc.c2.animeteamspeak.moe`, using `--service-account-issuer` and `--service-account-jwks-uri`. Serve the two documents statically. Then the API server needs no anonymous access, and the anonymous condition above can go. Every consumer of the issuer changes with it: - OpenBao `kubernetes-mini` (`bound_issuer`, `vault/mini-sa-jwks.pem`) - the Forgejo Authorized Integrations ## Addresses to switch when mini becomes c2 Search all repos for `TODO(dns-c2)`. | Used for | Now | c2 | |---|---|---| | SA issuer (`iss`) | https://kubernetes.default.svc.cluster.local | https://kubernetes.default.svc.c2.caosh.int.animeteamspeak.moe, or the public issuer above | | jwks_uri | https://10.15.1.170:6443/openid/v1/jwks | c2 API address (ADR-0008 VLAN plan) | | API via authz bridge | mini.k8s.animeteamspeak.moe | c2.k8s.animeteamspeak.moe | | OpenBao address | https://10.10.1.21:8200 | https://secrets.infra.caosh.int.animeteamspeak.moe:8200 (lab/iac#50) | | Cluster CA trusted by Forgejo | mini kube-root-ca.crt | c2 cluster CA |
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/machine-configs#33
No description provided.