hlavki / g-suite-identity-sync

G Suite to LDAP identity synchronizer
Apache License 2.0
127 stars 29 forks source link

work on the real domain #49

Closed sysadmin-ut closed 4 years ago

sysadmin-ut commented 4 years ago

I'm trying to use a Docker container. On localhost authorization works. But for authorization in google requires https. I made proxy https through nginx. But at authorization request I receive an error:

The redirect URI in the request, http://my.domain.com:8181/cxf/oidc/rp/complete, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs:

What options do you have on a real domain? Thank you in advance for your answer.

hlavki commented 4 years ago

Hi @sysadmin-ut, I think you need to add your domain to Authorized callback URI in web app credentials like this screenshot. Link to console: https://console.cloud.google.com/apis/credentials

image

let mi know if it helps, thanks

sysadmin-ut commented 4 years ago

Thanks for the answer. It is added to Google(https://my.domain.com/cxf/oidc/rp/complete). But the answer comes with the port 8181 and proto http. Perhaps the problem is in the proxying itself. Is it possible to install ssl inside the container? Or is it not required?

hlavki commented 4 years ago

It is possible to install certificate, but you don't need it. Yesterday I did example using traefik v2 and let's encrypt. I will add it to source code today or tomorrow and will let you know.

hlavki commented 4 years ago

@sysadmin-ut, I've added example docker-compose-traefik-v2-ssl.yml using traefik v2 and Let's encrypt SSL certificate.

I also have some installation using apache2, but none of them with nginx. But if traefik and apache2 works, nginx should also.

sysadmin-ut commented 4 years ago

Thanks. It works.