oauth_proxy in front of kubernetes ingress showing error 403

我怕爱的太早我们不能终老 提交于 2021-01-29 09:44:32

问题


I am trying to secure my application exposed as LB using oauth2_proxy, I have created 2 ingress resources as required one for running the oauth2_proxy and another for accessing my application which is to be secured through authentication. Refer link [https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/auth/oauth-external-auth]. I have followed the exact process as mentioned in this link.

When I hit my FQDN or Domain Name in browser it asks for authentication and upon successful authentication I get error

2019/07/25 14:09:56 oauthproxy.go:830: 10.244.2.76:36094 ("10.240.0.5") Cookie "_oauth2_proxy" not present
2019/07/25 14:09:57 oauthproxy.go:788: 10.244.2.76:36088 ("10.240.0.5") Permission Denied: "" is unauthorized
2019/07/25 14:09:57 oauthproxy.go:532: ErrorPage 403 Permission Denied Invalid Account

I expect to successfully redirected to my application service as authentication is successful. How can I achieve this?


回答1:


It seems from the log that you are able to use the github application for authentication, but the error that "_oauth2_proxy" is not present usually occurs when the application type is not an "oauth" proxy.

Please check if the application that you have created is an oauth application or not just to be sure.



来源:https://stackoverflow.com/questions/57207365/oauth-proxy-in-front-of-kubernetes-ingress-showing-error-403

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!