anandslab / docker-traefik

Docker media and home server stack with Docker Compose, Traefik, Swarm Mode, Google OAuth2/Authelia, and LetsEncrypt
https://www.smarthomebeginner.com/
MIT License
2.9k stars 629 forks source link

Enabling SSO on Organizr to login to PLEX and OMBI #86

Open rshamsz opened 4 years ago

rshamsz commented 4 years ago

Hi, I want to enable SSO on organizr to be able to automatically login to PLEX and OMBI after logging in to Organizr; SSO does not work with subdomain and only works with subdirectory ; my plex subdomain is plex.mydomain.com and I have Trafeik configured for Plex as below:

"traefik.http.routers.plex-rtr.rule=Host(plex.$DOMAINNAME)"

since I wanted to enable SSO for Plex on Organizr, I changed the Trafeik label as follow to have both subdomain and subdirectory URL for the PLEX container:

"traefik.http.routers.plex-rtr.rule=Host(plex.$DOMAINNAME) || (Host($DOMAINNAME) && Path(/plex))"

but Subdirectory URL does not work and only Subdomain URL works Do I need to change anything on CloudFlare DNS config?

Thanks

robflate commented 4 years ago

Is it definitely Path you want and not PathPrefix? https://doc.traefik.io/traefik/routing/routers/

rshamsz commented 4 years ago

It is Path; but I have tries both and neither of them worked. I checked the log on Traefik, when I want to access to https://mydomain.com/plex docker logs -tf --tail="50" traefik2 | grep plex and there was no log for the request. whereas I could see logs for https://plex.mydomain.com maybe cloudflare proxy is blocking the requests (just a wild guess)

SuperJakish commented 3 years ago

Seems I'm having the same issue. I don't have anything for the Plex SSO issue, but a clue for the Ombi SSO is that the cookie doesn't seem to work. I followed this guide which seems really helpful but this is admittedly way over my level of understanding. There is a troubleshooting section for Ombi and it appears that I have the problem described as:

cookie: false = User cookie does not match. User most likely does not exist in Ombi. Add user or import Plex users.

My users all show up as being from Plex, so that doesn't appear to be the fix for me. I recall reading during the Google OAuth setup something about restricting things looking for "auth" in the path... the Ombi URL for a subdomain is supposed to be https://ombi.domain.com/auth/cookie, but I'm not sure if it is relevant or not.

Sithlord82 commented 2 years ago

Hi, I want to enable SSO on organizr to be able to automatically login to PLEX and OMBI after logging in to Organizr; SSO does not work with subdomain and only works with subdirectory ; my plex subdomain is plex.mydomain.com and I have Trafeik configured for Plex as below:

"traefik.http.routers.plex-rtr.rule=Host(plex.$DOMAINNAME)"

since I wanted to enable SSO for Plex on Organizr, I changed the Trafeik label as follow to have both subdomain and subdirectory URL for the PLEX container:

"traefik.http.routers.plex-rtr.rule=Host(plex.$DOMAINNAME) || (Host($DOMAINNAME) && Path(/plex))"

but Subdirectory URL does not work and only Subdomain URL works Do I need to change anything on CloudFlare DNS config?

Thanks

Did you ever figure this out? Using the same syntax i can browse to the subdirectory but I get 401 unauthorized and not quite sure why