mesosphere / traefik-forward-auth

214 stars 46 forks source link

Google support in examples #71

Open stevegroom opened 2 years ago

stevegroom commented 2 years ago

README.md states google specifics have been removed:

Does not support Google-specific configuration (providers, providers.google.client-id, providers.google.client-secret, providers.google.prompt).

files in examples folder folder all use PROVIDERS_GOOGLE_CLIENT_ID and PROVIDERS_GOOGLE_CLIENT_SECRET

Changing these lines to CLIENT_ID, CLIENT_SECRET and adding PROVIDER_URI still results in an error:

traefik-forward-auth_1  | time="2022-08-06T16:35:15Z" level=fatal msg="provider-uri, client-id, client-secret must be set"
examples_traefik-forward-auth_1 exited with code 1
KROSF commented 1 year ago

add the env PROVIDER_URI=https://accounts.google.com @stevegroom

KROSF commented 1 year ago

don't forget to add the SCOPE variable too, separate by spaces, possible values without google verification

SCOPE=openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile

stclaird commented 2 hours ago

These are the environment variables that were needed to get this working on Google and Kubernetes

Envronment Variable name Value Description
CLIENT_ID Your GCP Credential ID Get this from Oauth 2.0 Credential https://console.cloud.google.com/apis/credentials
CLIENT_SECRET Your GCP Credential Secret See Above
DOMAIN The E-mail addresses of the GCP accounts A comma seperated list of e-mails domains
PROVIDER_URI https://accounts.google.com This is the same URL for all deployments
SCOPE openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile A space seperated string; you can use the example supplied as is as this always the same across deployments
SECRET A-random-secret A Random secret string
ENCRYPTION_KEY RANDOM-STRING-MINIMUM-OF-16-CHARS-LONG An AES compatible string which should either be 16, 24, or 32 Bytes long