haproxy-ingress
haproxy-ingress copied to clipboard
Global configuration for an external auth service has no effekt
According to the official documentation, the Ingress Controller can be configured globally using a ConfigMap to forward all requests to an external auth service. Unfortunately, the following configuration has no effect:
apiVersion: v1
kind: ConfigMap
data:
auth-url: "https://<auth service name>.<namespace>.svc.cluster.local:<port>"
auth-headers-succeed: "authorization"
headers: |
X-Forwarded-Uri: %[baseq]
X-Forwarded-Method: %[method]
X-Forwarded-Host: %[req.hdr(host)]
Same keys used as annotations on the ingress resource work however perfectly fine:
annotations:
haproxy-ingress.github.io/auth-url: "https://<auth service name>.<namespace>.svc.cluster.local:<port>"
haproxy-ingress.github.io/auth-headers-succeed: "authorization"
haproxy-ingress.github.io/headers: |
X-Forwarded-Uri: %[baseq]
X-Forwarded-Method: %[method]
X-Forwarded-Host: %[req.hdr(host)]
Am I doing something wrong, or is it indeed a bug?
Hi, this is a config limitation, a few options wasn't designed to work properly as a global config, mostly due to the missing of a namespace. Regarding external authentication it was somewhat simple to fix and I've just addressed. Should be available in the next v0.15 and v0.14 releases.
Fixed, merged, and the new behavior will be available in the next v0.14
and v0.15
versions.