首页 文章

k8s入口控制器中的Traefik前向认证

提问于
浏览
10

你好我试着在kubernetes traefik ingress的注释中查看auth选项 . 我找不到任何可以配置前向身份验证的内容,如下所示:https://docs.traefik.io/configuration/entrypoints/#forward-authentication

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

目前是否支持?

1 回答

  • 5

    根据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
    

    并且可能还有以下注释以及您的auth服务返回的相应头字段作为值:

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

相关问题