diff --git a/deploy/kubernetes/grant-broker-dev/kustomization.yaml b/deploy/kubernetes/grant-broker-dev/kustomization.yaml index c6e7e03..e13b50d 100644 --- a/deploy/kubernetes/grant-broker-dev/kustomization.yaml +++ b/deploy/kubernetes/grant-broker-dev/kustomization.yaml @@ -1,7 +1,8 @@ # ADR-0131 grant broker for evolution-dev ONLY: verifies Keycloak access tokens # (realm aeternalis) and issues 10-minute session grants for world 100 frame 9. -# Public route: https://grants.aeternalisgames.com -> Ingress (created out of band: -# the aevolution-dev Argo project admits no Ingress) -> Service evo-grant-broker:8080. +# Public route, 443 only: https://grants.aeternalisgames.com -> ingress-nginx (TLS; +# Ingress created out of band, since the aevolution-dev Argo project admits none) -> +# ClusterIP Service evo-grant-broker:8080, in-cluster only. No LAN access to 80 or 8080. # Out-of-band Secrets in evolution-dev: aevolution-grant-issuer (issuer.key, the raw # 32-byte dev issuer scalar) and aevolution-grant-broker-pg (pg_service.conf, pgpass, # ca.crt for a login in the runtime group). diff --git a/deploy/kubernetes/grant-broker-dev/networkpolicy.yaml b/deploy/kubernetes/grant-broker-dev/networkpolicy.yaml index f78b43b..b8248bd 100644 --- a/deploy/kubernetes/grant-broker-dev/networkpolicy.yaml +++ b/deploy/kubernetes/grant-broker-dev/networkpolicy.yaml @@ -1,6 +1,9 @@ -# Broker traffic on top of the namespace default-deny: HTTP 8080 from the ingress -# controller only (RKE2's bundled ingress-nginx in kube-system; it may run on the host -# network, so the node subnet is admitted too), and PostgreSQL on pg-forge-01 only. +# Broker traffic on top of the namespace default-deny. Players reach the broker only at +# https://grants.aeternalisgames.com on 443, where ingress-nginx terminates TLS. The pod's +# HTTP port 8080 is admitted from the ingress-nginx pods inside the cluster and from +# nothing on the LAN. No address block is admitted: if the controller runs on the host +# network, this selector does not match it and the route fails closed (502) until the +# exact node addresses are added. Egress goes to PostgreSQL on pg-forge-01 only. apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: @@ -20,8 +23,6 @@ spec: podSelector: matchLabels: app.kubernetes.io/name: rke2-ingress-nginx - - ipBlock: - cidr: 172.10.1.0/24 ports: - {protocol: TCP, port: 8080} egress: diff --git a/deploy/kubernetes/region/dev-session-route/listener.yaml b/deploy/kubernetes/region/dev-session-route/listener.yaml index 765d1a3..d2d9f26 100644 --- a/deploy/kubernetes/region/dev-session-route/listener.yaml +++ b/deploy/kubernetes/region/dev-session-route/listener.yaml @@ -12,7 +12,7 @@ spec: env: - {name: REGION_SESSION, value: "dev"} - {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"} - - {name: REGION_SESSION_WINDOW, value: "dev-20261015T142027-62240:1792084827"} + - {name: REGION_SESSION_WINDOW, value: "dev-20261015T161946-95258:1792091986"} - {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"} ports: # QUIC (ADR-0090): UDP only; nothing listens on TCP 7400. diff --git a/docs/adr/0131-keycloak-login-and-grant-broker.md b/docs/adr/0131-keycloak-login-and-grant-broker.md index 3f48b1f..05de1e5 100644 --- a/docs/adr/0131-keycloak-login-and-grant-broker.md +++ b/docs/adr/0131-keycloak-login-and-grant-broker.md @@ -82,8 +82,9 @@ never be minted on a client. the raw 32-byte dev issuer scalar), Secret `aevolution-grant-broker-pg` (`pg_service.conf` with service `[evolution]`, `pgpass`, `ca.crt`) and the Ingress for `grants.aeternalisgames.com` (the Argo project admits no Ingress). -- Its NetworkPolicy admits TCP 8080 from the ingress controller and the node subnet, - and egress to PostgreSQL only. +- Public access is HTTPS on 443 only, terminated by ingress-nginx. Port 8080 is the + in-cluster backend: a ClusterIP Service, and a NetworkPolicy that admits only the + ingress-nginx pods and nothing on the LAN. Egress goes to PostgreSQL only. - The grant lifetime (600 s) must stay within the region's `REGION_M10_MAX_GRANT_LIFETIME`.