-
Notifications
You must be signed in to change notification settings - Fork 3k
Extended authentication (SSO) #437
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
Comments
Also, certificate based authentication would be a nice to have feature. |
OIDC/Keycloak integration would be awesome to have with this. |
#433 added the ability to do oidc |
Any updates on this issue? |
It will not be in this version, unless someone from the community wants to implement it. See https://github.com/jc21/nginx-proxy-manager/discussions/1202. |
Please integrate NPM with spnego for Kerberos integration. https://github.com/stnoonan/spnego-http-auth-nginx-module |
Any update on this? |
FYI #2630 @hairy-tortoise |
+1 |
+1 pls |
+100500 Authentik implementation will be amazing too! |
Issue is now considered stale. If you want to keep it open, please comment 👍 |
Stalebot is a blight |
KeyCloak and Kerberos please. |
just an update, by using the section where you can post your own Nginx commands on a proxy. NPM does work with Authelia and authentik that ive tested, as a domain level auth. ie: if you go to radarr.mysite.com, it will redirect you to authentik sso page, sign in, then store and use that cookie so going to sonarr.mysite.com or any other site behind your sso becomes passwordless. you also have to configure the apps to accept the SSO or no password to make it seamless, but this does work. so unless this is a request for the addition of maybe presaved configs or per app buttons for this, it works and Im happy. :) |
The reverse proxy functionality of NPM works with Authentik / Authelia / other tools. But the web GUI of NPM itself doesn't work: It would be awesome if we don't have to enter an email or password to get to NPM settings. |
Here is how I set up Authentik to log into NginX Proxy Manager UI: In this case i created A group with special permition to log into several services but you can do this on user level. In the group/user add the following Attributes with the correct
Under
The Expression will fetch a new Autherization Token which can be accessed through the
That should be it. I tried it and it works perfectly edit code to handle exceptions |
@moutasem1989 great approach! I tried the custom property mapping with user properties and I got this exception when navigating to the proxied page, same when using the test function from authentik admin panel:
|
@MahmoudAlyuDeen The code above makes a call to Nginx to retrieve an authentication code in JSON file. If the server cannot be reached because of the wrong host name or IP address or simply bad authentication values it will throw an error. Make sure the Authentik server and NginX are on the same network and try the following. It should return the entire JSON file not just the token. If it is also unsuccessful, then a connection was not possible. comment out all the lines after
In Terminal you can also try this to see if an authentication token can be fetched. The bove code is the express of this curl command:
Hope it works out! |
Okay, I figured out one problem with your help, thanks! 😅 I had the external URL in the expression but switching to the internal URL of NPM works. Testing the scope mapping in authentik generates a valid token now. 🤔 Somehow I still get this error when navigating to the proxied page: This is the same error I get when I test the scope mapping with a user, that doesn't have the appropriate attributes. |
If you added the attributes to the group use I did some changes to handle exceptions. Check the Property Mapping code: I made it so if a user has no name it will return null instead of throwing an error trying to retrieve values Alternatively you can directly set the values in the code. |
Nice! No more exceptions. But now login doesn't work, I'm now just getting redirected to NPM login page. |
Also try it incognito mode cuz cookies could mess things up |
Tried in incognito. Looking at the logs, the token is there with the correct scope. ✅ But there are also default scopes that I suspect could be confusing NPM, when I try removing the default scopes from the provider, they just keep coming back. Is there any configuration I need to do on NPM side? Other than the custom nginx code you posted? |
The scoop is there but you need to check the headers
|
I mean I know it could be an issue if it broke, but in docker restrict port 81 to localhost and use npm to access it, and put authentik etc there...if it broke just remove the interface restriction on the docker till you fixed it |
@moutasem1989 Is this method still working, even with commit 280bac8 causing problems with some of the code here? I'm in the same boat as @MahmoudAlyuDeen where my scope tests fine with a token, but I get redirected to the login page. With "custom locations" not working, can you define locations in the advanced field? Depending on the configuration, I can quickly get an error 500 |
Tried this approach and getting redirect on the login page too, mapping seems fine on authentic Actually something is there |
get same error, and when I test the Property mappings I get the following:
|
This software is amazing for homelab, I'd love if had the ability to use with
https://github.com/vouch/vouch-proxy/blob/master/README.md
Or keycloak
Basically any single sign on or similar system
It would be at the same step as your current password protection. Currently I have to put password so many times...
Instead of each service having its own(and some don't) any site you tag with auth gets proxied with sso
The text was updated successfully, but these errors were encountered: