Enabling usage of Authorization: Bearer .... via Nginx-ingress using ouath2_proxy with Azure AD

4/24/2020

So I am hoping there will be someone who has made this work, I have managed to get this working using -provider=azure using pusher oauth2_proxy using a browser so essentially with the massive AAD cookies.

Now I cannot get it to work using Bearer token, I just see ouath2_proxy complaining about no cookie being present and then a 401, I have tried a ton of different options from both the nginx-ingress perspective and from oauth2_proxy side, I have scoured the net and not found anything that suits this use case. Documentation doesn't seem to cover it either.

Basically I want to be able to call actual rest api's behind nginx-ingress using a bearer token.

My configuration is a bit muddled right now, but essentially I suspect the issue is related to oauth2_proxy requiring a cookie, do I need to change the ball game completely and re-asses?

-- Fez29
kubernetes
nginx-ingress
oauth-2.0
proxy

0 Answers