feat(talos): authenticate kube-apiserver against ZITADEL (#87)
Co-authored-by: rock <[email protected]>
This commit was merged in pull request #87.
This commit is contained in:
@@ -198,3 +198,42 @@ variable "forgejo_hostname" {
|
||||
default = "forgejo.riotpiao.com"
|
||||
description = "Forgejo external hostname"
|
||||
}
|
||||
|
||||
# ── kube-apiserver OIDC (ZITADEL) ────────────────────────────────────────────
|
||||
# Authenticates `kubectl` against ZITADEL instead of client certificates only.
|
||||
# Client-certificate auth keeps working in parallel, so a wrong value here
|
||||
# degrades OIDC logins without locking anyone out.
|
||||
#
|
||||
# The issuer is ZITADEL's external host with NO trailing slash and NO
|
||||
# /application/o/<app>/ suffix — a leftover of the Authentik scheme. The
|
||||
# apiserver validates `iss` in the id_token for exact string equality.
|
||||
variable "oidc_issuer_hostname" {
|
||||
type = string
|
||||
default = "zitadel.riotpiao.com"
|
||||
description = "Hostname of the OIDC issuer (ZITADEL). Becomes https://<host> as the issuer."
|
||||
}
|
||||
|
||||
variable "oidc_issuer_ip" {
|
||||
type = string
|
||||
default = "192.168.1.160"
|
||||
description = <<-EOT
|
||||
Address the nodes resolve the OIDC issuer to, via extraHostEntries.
|
||||
|
||||
kube-apiserver's static pod runs on the host network, so it resolves the
|
||||
issuer through the node's own DNS, not cluster CoreDNS. Pointing it at the
|
||||
ingress-nginx LoadBalancer keeps OIDC discovery on the LAN and serves the
|
||||
publicly-trusted Let's Encrypt *.riotpiao.com certificate. Without this the
|
||||
lookup leaves via public DNS and Cloudflare, and discovery either hairpins
|
||||
or fails.
|
||||
EOT
|
||||
}
|
||||
|
||||
variable "oidc_client_id" {
|
||||
type = string
|
||||
default = "396757803089330177"
|
||||
description = <<-EOT
|
||||
ZITADEL client id of the `kubernetes` OIDC application (PKCE, no secret).
|
||||
Must be a STRING: the id is an 18-digit number and an unquoted YAML scalar
|
||||
would be parsed as a float and rejected.
|
||||
EOT
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user