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

Add option/environment var to disable auth #51

Open
spectrapulse opened this issue Apr 16, 2023 · 10 comments
Open

Add option/environment var to disable auth #51

spectrapulse opened this issue Apr 16, 2023 · 10 comments

Comments

@spectrapulse
Copy link

Some of us run reverse proxies with middleware that take care of authentication.
It would be nice if we could disable authentication or have a way to bypass the login.
I think LDAP would be kind of overkill for my setup to provide a somewhat unified login experience so it would be nice if I could disable the login functionality.

(maybe an option to disable the expiration of the session cookie so I can just pass it along as a request header to the host?)

@cuigh
Copy link
Owner

cuigh commented Apr 17, 2023

You can create an administrator account first, and then create a token for this user to use Swirl with token authentication. See: Deploy service with Swirl

@prologic
Copy link

prologic commented Aug 6, 2023

To be honest I'd also like to see something like this. In an ideal world auth is configurable between:

  • LDAP
    • User/Password
    • Trusted Headers / Proxy Auth

The later is what I want, as I can easily put Authelia in front of this 👌

What would it take to support this? 🤔

@cuigh
Copy link
Owner

cuigh commented Aug 7, 2023

How about using the token authentication mentioned above?

@prologic
Copy link

prologic commented Aug 7, 2023

How about using the token authentication mentioned above?

I don't see how that would work with Authelia in front reverse proxying to Swirl? It would need to pass Remote-User, for eexample:

Remote-Email: james@mills.io
Remote-Groups: selfhosted,mills
Remote-Name: James Mills
Remote-User: prologic

@prologic
Copy link

prologic commented Aug 7, 2023

Or rather, sorry to be precise, Swirl would take Remote-User and use this to populate its internal session and trust the proxy.

@cuigh
Copy link
Owner

cuigh commented Aug 7, 2023

Sorry, I'm not very familiar with Authelia. For Swirl, it needs to obtain the user identity from the Authorization header. How can Swirl map Remote-User to its internal users if it is only the user's ID in Authelia?

@prologic
Copy link

prologic commented Aug 7, 2023

Because the authentication has already happened at the proxy. Applications like Swirl would trust the proxy's headers. This is the simplest form of SSO and it works really well. I have many applications behind (that support header based auth) behind Authelia. See Trusted Header SSO

@spectrapulse
Copy link
Author

Wouldn't only apply to Authelia. But every reverse proxy setup which forwards authentication or uses SSO. May it use barebones NGINX or a solution like Traefik using a middleware. I've tried simply passing an Auth header to Swirl using a Traefik middleware but had very mixed results as even when the header is sent with either the response or request header it still tends to redirect to the login or incorrectly display information on pages or other UI issues Client Side. It would be great if Auth could fully be disabled or if another way of bypassing auth would be provided.

@prologic
Copy link

@cuigh Any further thoughts on supporting SSO for Swirl? Trusted Headers is the simplest way to support this, I'm sure with your experience of the codebase you'd get this done pretty easily. OAuth / OpenID Connect (OIDC) is also an option too (bit more work on both sides)

@Yaytay
Copy link

Yaytay commented Mar 15, 2024

We have swirl behind an AWS LB that authenticates the user but doesn't give us any option for setting headers (beyond the standard X-Forwarded).
I'd like swirl to either support OAuth or to have auth disabled.
I don't want my users making any changes via swirl, so it would make me happy if the auth-less version was strictly read-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants