mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #352] Support header sso (Forward Auth) #133
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RandomExplosion on GitHub (Oct 25, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/352
Since one common use case for lldap is as a ldap server for a separate authentication server such as authelia it would be good if the web ui was compatible with login from those providers e.g. through trusted header sso
Currently if one wants to put lldap behind 2fa you can still use forward auth with a reverse proxy to block access to the dashboard if you haven't signed in with 2fa but you still need to sign-in again with your password after that.
Basically you can either have username+password or 2x username and password + 2fa
This works fine but does feel a bit clunky.
As I understand it it shouldn't be too difficult to implement either since it takes the place of the current login screen, either way I haven't read through all of lldap's source to know for sure.
@dvv commented on GitHub (Feb 2, 2024):
@nitnelave
I wonder if we could switch native auth off completely with some config option.
Then authenticating to lldap via authelia (using lldap per se) would be similar to securing vanilla whoami example.
@nitnelave commented on GitHub (Feb 2, 2024):
@dvv How would you get the current user? The proposed way (that I approve) is through trusted headers, but do you have another proposal?
@dvv commented on GitHub (Feb 2, 2024):
Exactly via trusted headers. I think if we remove native login (and probably burden of supporting it) and honor
Remote-User:as the current legal user.@dvv commented on GitHub (Feb 2, 2024):
user_idcookie ->remote-userheaderis_admincookie -> "lldap_admin" in (remote-groupsheader).split(",")@nitnelave commented on GitHub (Feb 2, 2024):
The backend changes are going to be straightforward (just parse the header if it's there), it's the front-end changes that are going to be a bit more challenging, I think: When the frontend loads, it doesn't know which user is logged in. It would have to do a request to the server to check "am I already logged in?" since it can't rely on a cookie.
@dvv commented on GitHub (Feb 2, 2024):
Well, I believe non-http-only cookies should go away.
Probably there should be some "profile" API (RPC?) method that returns user info.
I didn't dive in client-side of lldap.
@nitnelave commented on GitHub (Feb 5, 2024):
The only non-http-only cookies right now are storing who's logged in and whether they're admin, but they don't store any credentials (it's to help the frontend). There's a small chance they get out of sync with the actual logged in state (if the session was somehow invalidated from the backend), but so far it's worked out pretty well.
Another way to do it would be indeed to have a "whoami" endpoint that returns the currently logged in user, or none.
@fiinnnn commented on GitHub (Jun 20, 2024):
Is anyone working on this currently? I'm happy to take a shot at implementing it if I have some time.
@nitnelave commented on GitHub (Jun 20, 2024):
No one's working on it at the moment, it's all yours!
@tecosaur commented on GitHub (Oct 26, 2024):
@fiinnnn did you take this for a spin? It would be quite cool to have this functionality 🙂
@fiinnnn commented on GitHub (Nov 6, 2024):
@tecosaur unfortunately I haven't been able to find the time to look at this so far, if anyone else would like to try definitely go for it
@tecosaur commented on GitHub (Nov 6, 2024):
Ah well, that's a bit of a pity but understandable. Thanks for the update!
@nitnelave commented on GitHub (Mar 31, 2025):
Note that propagation of settings to the frontend (#514 ) is done, so this should be easier.
@Kumpelinus commented on GitHub (Sep 2, 2025):
FYI: I started working on this Issue