Skip to content
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

docs: how to configure OAuthenticator client_id and client_secret via an existing k8s Secret #3478

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/source/administrator/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,34 @@ hub:
authenticator_class: google
```

For security reasons `client_id` and `client_secret` parameters could be ommited from config
and passed via Extra environment variables `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` directly
as they are respected by all oauthenticator based Authenticator classes.
Assuming that the secret have already been created it could look like this.

```yaml
hub:
config:
GoogleOAuthenticator:
oauth_callback_url: https://your-jupyterhub-domain/hub/oauth_callback
hosted_domain:
- your-university.edu
login_service: Your university
JupyterHub:
authenticator_class: google
extraEnv:
OAUTH_CLIENT_ID:
valueFrom:
secretKeyRef:
name: jupyterhub-google-oauth
key: client-id
OAUTH_CLIENT_SECRET:
valueFrom:
secretKeyRef:
name: jupyterhub-google-oauth
key: client-secret
```

The `oauth_callback_url` key is set to the authorized redirect URI you specified
earlier. Set `hosted_domain` to your institution's domain name. The value of
`login_service` is a descriptive term for your institution that reminds your
Expand Down
Loading