如何在Traefik中使用forwardauth与内部服务?

发布于 2025-01-23 03:12:16 字数 316 浏览 4 评论 0原文

Traefik允许指定中间件,使用forwardauth在文档中指定使用外部提供商的文档中对每个请求进行身份验证。

# Forward authentication to example.com
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: test-auth
spec:
  forwardAuth:
    address: https://example.com/auth  
              

Traefik allows to specify a middleware to authenticate each request using forwardAuth, in the documentation it specifies to use an external provider.

# Forward authentication to example.com
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: test-auth
spec:
  forwardAuth:
    address: https://example.com/auth  ????

I have an auth server running inside my k8 cluster itself which I want to use instead on an external service, is there a way to use forwardAuth to point to internal service?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深居我梦 2025-01-30 03:12:16

我使用K8完全合格的域名作为此地址的工作:

service-name.namespace.svc.cluster.local.local

I used K8 Fully Qualified Domain Name as the address for this to work:

service-name.namespace.svc.cluster.local.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文