我希望能够禁用我的应用程序的特定路径的外部授权。
与此类似:Kubernetes NGINX Ingress: Disable Basic Auth for specific path
唯一的区别是使用外部身份验证提供程序(通过Microsoft Azure的OAuth),并且
这是公众应该能够到达的路径
/MyPublicPath
我的inress.yaml:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myIngressName
annotations:
nginx.ingress.kubernetes.io/auth-signin: https://externalprovider/oauth2/sign_in
nginx.ingress.kubernetes.io/auth-url: https://externalprovider/oauth2/auth
nginx.ingress.kubernetes.io/auth-request-redirect: https://myapp/context_root/
nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User, X-Auth-Request-Email, X-Auth-Request-Access-Token, Set-Cookie, Authorization
spec:
rules:
- host: myHostName
http:
paths:
- backend:
serviceName: myServiceName
servicePort: 9080
path: /
我可以让它不命中该路径的https://externalprovider/oauth2/auth URL吗?
我尝试使用ingress.kubernetes.io/configuration-Snipket将auth_basic值设置为“off”,但这似乎与基本的auth指令绑定在一起,而不是外部指令。
暂无答案!
目前还没有任何答案,快来回答吧!