server
server copied to clipboard
Support for authelia (SSO)
Is your feature request related to a problem? Please describe. I am using a SSO (authelia) infront of all my services. Having to login a second time to traggo is something I would like to eliminate.
Describe the solution you'd like Some auth-proxys (like authelia) add header to each request. Applications secured by such a SSO then just need to check for the HTTP header and automatically login the user. In my case a Remote-User header which contains the username is set. Would it be possible to add an option to look for such a header and autologin the user if present? It doesn't have any security strings attached, since all security relevant parts are done by the auth server.
It would be possible, but I don't think that a lot of users are affected by this, thus, I don't think it is worth the effort to implement / maintain this.
Ok, that's understandable. I got it roughly to work, but good enough for me (never used Go before). If you want to, you can close this issue. Otherwise I would leave it open in case others are interested.
shame. I would have liked to use this with authelia too
@c-nv-s I ended up adding this piece of code in the reqisterUser (not a typo, thats the correct method name :P) method in the middleware.go file in the auth folder. Just at the top. Be aware that I never worked with Go and my code doesn't add a proper device or even create a session, but you get logged in if your username exists and it seems to work for me...
header := request.Header.Get("Remote-User")
if len(header) != 0 {
log.Debug().Str("header", header).Msg("login with Header")
user := &model.User{}
if db.Where("name = ?", header).Find(user).RecordNotFound() {
log.Warn().Str("user", header).Msg("User from Header not found")
} else {
return request.WithContext(WithUser(request.Context(), user))
}
}
Its been a couple years since this was requested. I think due to the growing number of self hosted applications everyone wants to make their logins easier. Is this something that can be revisited?
Sure, I'm open to accept PRs for this feature, tho the build pipeline should probably be fixed / migrated to github before that.
I'd like to upvote this feature request. It would be very useful for me and surely for many others.
While we are not using authelia we would love to see SSO. OIDC would probably be great to see :)
This feature would be nice. OIDC is perfectly fine with me. :)