-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oathkeeper as relying party in OIDC/Authorization code flow #647
Comments
Thank you for raising this issue! This is currently not implemented. We also thought about this in the next iteration of Ory Oathkeeper ( #441 ) but stated this explicitly as a non-goal as there are other projects like Pomerium which have UIs etc included. We're still open to address this but want to keep Ory Oathkeeper free of any UI which might be difficult for this specific use case. |
I think this case does not require any UI. It's all back-end functionality + config files, a converter for an OIDC-session to cookie-session, nothing more. Anyway, if it's non-goal at this time I'll better stick to our own implementation or oauth2-proxy. Thanks. |
Does this "closed" mean "won't implement"? |
Sorry, forgot the message: I am closing this issue as it has not received any engagement from the community or maintainers in a long time. That does not imply that the issue has no merit. If you feel strongly about this issue
We are cleaning up issues every now and then, primarily to keep the 4000+ issues in our backlog in check and to prevent maintainer burnout. Burnout in open source maintainership is a widespread and serious issue. It can lead to severe personal and health issues as well as enabling catastrophic attack vectors. Thank you to anyone who participated in the issue! 🙏✌️ |
Given this is the 5th most upvoted issue, can we discuss re-opening this issue? To my knowledge, the solution right now, without this feature being built in oathkeeper, requires a custom implementation of the flow, as described by @synclpz, which is often undesirable in the "Don't code. Configure." approach. This working custom-solution with the home-made implementation of the OIDC relying party is described in this blog post in the It is nothing but a server that:
I understand that the difficulty here doesn't rely on the feature per se but in fitting this feature in the already existing ones of Probably the easiest step is the very first one: initialize the OIDC flow with a redirect. This could be performed by an error handler, very similar to the errors:
fallback:
- oidc_redirect
handlers:
oidc_redirect:
enabled: true
config:
auth_url: https://my-idp/authorize
client_id: a1b2c3
redirect_uri: http://myself/callback/oidc/exchange # this could be potentially optional, auto inferred from the existing domain configuration and with a fixed-by-default callback path
scopes:
- openid
- profile
- email
when:
- error: [unauthorized]
request:
header:
accept:
- text/html With this, the redirect could be performed on unauthorized error, but instead of going straight to |
Use case
As discussed in #646.
Oathkeeper as an OIDC relying party and cookie-based session proxy.
I need Oathkeeper to act as an OIDC RP (oauth2 proxy). In this case Oathkeeper stands between my front-end (browser) and back-end (server) and my app uses OIDC from external provider for user authentication.
Oathkeeper needs to be able to: receive auth_code, exchange it for tokens, validate tokens and create cookie-based session for browser, mutating all incoming requests with Authorization and/or other headers using cached tokens before forwarding to back-end.
Sequence is as follows:
This case is discussed in #646 and https://ory-community.slack.com/archives/C012RBW0F18/p1614294029035400.
As an alternative one could use https://oauth2-proxy.github.io/oauth2-proxy/ it does implement this scenario but lacks some configuration options available in Oathkeeper (I need to dig deeper though).
The text was updated successfully, but these errors were encountered: