-
Notifications
You must be signed in to change notification settings - Fork 3k
Merging oidc branch with master #753
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
Conversation
There is a Knex issue ( knex/knex#2649 ) that prevents .defaultTo from working for text columns.
… enabling/disabling oidc. If this is not triggered and the OIDC toggle is enabled, the "disabled" property will be removed from the restricted user list input, causing an error when trying to submit the form without it.
Add the ability to secure proxy hosts with OpenID Connect
develop -> openidc
Docker Image for build 1 is available on DockerHub as |
This works! Here are the steps I used to get this working on my internal network using NPM, Keycloak, and Docker. I was able to secure my home server's instance of Tautulli with Keycloak's identity management framework. Setting up Keycloak:
Setting up NPM: (the orginal PR also has good technical info)
That should be it! Navigating to One issue I ran into was my container for NPM was not resolving We should merge this PR :) 🚀 |
I've been running this image since over 2 weeks now and it's working flawlessly so far. |
@adrianzech just curious, what does your set up look like in regards to this container? Are you using keycloak like I describe or some other oidc provider? Are you using it in production or on a home network? Thanks! |
I use Keycloak together with FreeIPA for user managment. Other than that my configuration looks pretty similar to yours, except that I didn't use docker for Keycloak. |
Hi Am trying to set Open ID with Azure AD. [29/Dec/2020:12:29:34 +0000] - - 000 - GET https sonarqube.conet.info "/" [Client 172.19.0.1] [Length 0] [Gzip -] [Sent-to ] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" "-" in the error log I get this message Did I make a configuration mistake? Can you point me in the right direction? I will try to setup Keycloak to make sure nothing else is wrong. To make sure there weren't any db issues I have started a new instance of the DB and APP docker. So all new clean setup. |
Here is what my
|
@cierzniak did you allow the redirect URI in gitlab? Something similar to my step 7 in "Setting up keycloak" ? |
@joe307bad Hi Joe, Mine is almost the same `server { listen 80; listen 443 ssl http2; server_name sonarqube.conet.info; Custom SSLssl_certificate /data/custom_ssl/npm-2/fullchain.pem; access_log /data/logs/proxy_host-2.log proxy; location / { access_by_lua_block {
} Custominclude /data/nginx/custom/server_proxy[.]conf; The browser give an net::ERR_CONNECTION_CLOSED |
I've noticed that I am getting "Cross-Origin Request Blocked" messages after a short period of time using one of my sites.
I've tried adding Has anyone experienced the same issue? |
@joe307bad Ok, give it another try: And after entering http://secured.domain/ it makes redirection to gitlab (oidc auth) and back to http://secured.domain/redirect_url?code=b5b0a7f6379...&state=43d299238af8b33dc6781e3cb150b060 but response from NPM is 502 Bad Gateway and no entry in NPM logs (logs shows next 302).
OMG, after refresh page is something more - 500 Internal Server Error
I have 2 TLDs, gitlab is gitlab.doman1.com (and SSLed) and secured site is secured.domain2.com (without SSL), should I turn off SAMEORIGIN or change another value inside NPM to begin it working? When I want to use Google or any other OAuth provider same happens, two different domains. No SSL shouldn't be problem anyway, I use Portainer or SonarQube in local network without SSL and same Gitlab instance is OAuth provider for both. |
The reason I had not merged this branch yet is because during my own testing of my production sites, I've found that reloading nginx with at least one OIDC auth enabled host increased the reload time for each host by 300ms. Since I had more than 100 hosts, this reload time was ridiculous. We never got around to investigating it any deeper than a single configuration line I found (and had to be included for oidc to work) so I left the branch there to see if others had similar problems too. Actually I recall it might be trying to fetch something from the auth server for each host defined even if it's not using the auth server in it's configuration. The other thing I was waiting for, openresty updates that might help resolve that. I'm interested to see if anyone who has a large number of hosts, with mixed configurations, letsencrypt certs etc. |
Docker Image for build 2 is available on DockerHub as |
Hi how can i install it with docker-compose? Thank you very much |
Replace |
@adrianzech thank you very much it worked. I have a suggestion: additional to the "Allow only these user emails" it would be very nice to have the ability to define Is this the right place to place a suggestion? Kind regards |
No I think this setup is part of your third party authentication service. This project is only responsible for passing off authentication to that service, it doesn't have any more control than that. |
I have tried playing with this. I'm trying to use Auth0 as the provider. I get taken to the auth0 loginform, and i get redirected back. but then i just get 'too many redirects' on chrome and if i try to use ie (yeah.. i know) it just loads forever. Any insight to what is going on? I do use cloudflare for my nameserver and the subdomains are proxied via cloudflare. i'm using origin SSL certs with full/strict mode. Any help or insight would be appreciated. Also, because I don't know. How does this work trying to protect applications that have their own auth but can't be disabled. Like Radarr can be disabled. but some other services cannot. I'm also open to another provider other than Auth0 if it is easier to implement. |
Docker Image for build 3 is available on DockerHub as |
@jc21 won't this be merged? |
IMHO this is a very desirable feature. I think it should be merged with a warning regarding impact to large scale deployments. |
Is this possible with just Google OAuth aswell? Can't get it working, I just get 404 after the Login Page with Google. Redirect URL is not resolved to the correct Host |
any update on when this will be pushed into the master? |
Please merge! |
I'm really not sure that this is ready to be merged. There are many errors in the logs when running this and the behaviour of the redirect is not stable. |
What is stopping this from being merged and what are the errors? |
I would also like to use this feature in order to switch from apache to nginx-proxy-manager. |
in case anyone wants to try this on latest version 2.9.5. I merged it into tag 2.9.5 and created a docker image out of it. you can find it here: https://hub.docker.com/repository/docker/knitze/nginx-proxy-manager |
Closing this PR in favour of #1388, using branches from this project. |
This PR merges the changes introduced in the
oidc
branch into themaster
branch. These changes add the ability to specify an OIDC provider for authentication.