k8s 入口控制器中的 Traefik 转发身份验证

Traefik Forward Authentication in k8s ingress controller

你好,我试着查看 kubernetes traefik ingress 注释中的身份验证选项。我找不到任何可以配置转发身份验证的地方,如下所述:https://docs.traefik.io/configuration/entrypoints/#forward-authentication

我希望能够为每个入口资源配置转发身份验证。这在 nginx 入口控制器中是可能的。

目前支持吗?

根据 Traefik 文档,该功能将在 Traefik 1.7 版(当前为候选发布版)中提供。

Here is a link to the authentication documentation

我的猜测是您需要添加以下 2 个注释:

ingress.kubernetes.io/auth-type: forward
ingress.kubernetes.io/auth-url: https://example.com

可能还有以下注释,其中相应的 header 字段将您的身份验证服务 returns 作为值:

ingress.kubernetes.io/auth-response-headers: X-Auth-User, X-Secret