Skip to content
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

OAuth transparent authentication in Caddy #356

Open
ArjonBu opened this issue Aug 6, 2024 · 1 comment
Open

OAuth transparent authentication in Caddy #356

ArjonBu opened this issue Aug 6, 2024 · 1 comment
Assignees
Labels
need triage question Further information is requested

Comments

@ArjonBu
Copy link

ArjonBu commented Aug 6, 2024

I am trying to setup Caddy as a transparent reverse proxy with authentication, meaning that authentication to remote endpoints is done on Caddy. Users can access the Caddy virtual host with no authentication and then Caddy authenticates to the remote endpoint.

I am no expert in this but I am having a hard time understanding the docs and I am failing to setup proper config. All examples on docs refer to the case where the user is redirected to an authentication portal and then authenticates.

In my case, I do not want that. I want users to access the Caddy domain with no authentication and Caddy does authentication as a reverse proxy.

Is this use-case currently supported by this plugin? If so, can you please direct me to a docs link where I can try to get something working?

Thanks in advance

@ArjonBu ArjonBu added need triage question Further information is requested labels Aug 6, 2024
@jmittermair
Copy link

@ArjonBu Caddy functions as the authentication portal. So you would access the normal Caddy endpoint for your service with no authentication, like you stated, be redirected to the auth portal (still hosted by Caddy), sign in with your OAuth, and then be redirected automatically back to your original Caddy endpoint.

There's a Discord example here that's pretty clear cut:
https://github.com/authcrunch/authcrunch.github.io/blob/c6d02968980595021863c223369f9f6cb31992b6/assets/conf/oauth/discord/Caddyfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants