Reputation: 94
I have my service set behind oauth2-proxy and I am using version 4.0.0.
I am trying to hit an API behind the service, but unfortunately, I always get a 403 forbidden
error because of oauth2-proxy being in the way.
I am looking for a way to authenticate via g-suite using oauth2-proxy
and generate a token that I can then use for the service.
Does oauth2-proxy
support any kind of way to authenticate via cURL or POST call?
Upvotes: 4
Views: 1823
Reputation: 628
You need to first :
I hope this article helps you understand better how to authenticate with an IDP.
Upvotes: 0
Reputation: 89
For Azure Entra IdP, I faced a similar situation. Here I logged in using SSO in web-browser. Noted down the Bearer Token
or _oauth2_proxy
in cookies. And passed this in cUrl or Postman.
For Gsuite, I believe cookies with names similar to this __Secure-3PSID
contains the value required for verifying ot OAuth Level, that this request is authenticated.
So note down these cookies values and pass it in cUrl or Postman, along with your normal request to respected service. Hopefully that solves your problem.
Upvotes: 0
Reputation: 29283
It feels to me that your deployment separation is not right. OAuth has a strong focus on separation of web and API concerns. The oauth2-proxy
utility is a web client and should not be deployed in front of APIs since that can limit your options.
SUBOPTIMAL DEPLOYMENT
OPTIMIZED DEPLOYMENT
If I'm misunderstanding anything, maybe clarify your question and post back.
Upvotes: 2