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

remove addressed FIXMEs in update_auth #745

Merged
merged 1 commit into from
Oct 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions tljh/configurer.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def update_auth(c, config):
client_id: "..."
client_secret: "..."
oauth_callback_url: "..."
ClassName:
ArbitraryClass:
arbitrary_key: "..."
arbitrary_key_with_none_value:
```
Expand All @@ -173,19 +173,16 @@ def update_auth(c, config):
c.GitHubOAuthenticator.client_id = "..."
c.GitHubOAuthenticator.client_secret = "..."
c.GitHubOAuthenticator.oauth_callback_url = "..."
c.ArbitraryKey.arbitrary_key = "..."
c.ArbitraryClass.arbitrary_key = "..."
```

Note that "auth.type" and "auth.ArbitraryKey.arbitrary_key_with_none_value"
Note that "auth.type" and "auth.ArbitraryClass.arbitrary_key_with_none_value"
are treated a bit differently. auth.type will always map to
c.JupyterHub.authenticator_class and any configured value being None won't
be set.
"""
tljh_auth_config = config['auth']

# FIXME: Make sure this is something importable.
# FIXME: SECURITY: Class must inherit from Authenticator, to prevent us
# being used to set arbitrary properties on arbitrary types of objects!
c.JupyterHub.authenticator_class = tljh_auth_config['type']

for auth_key, auth_value in tljh_auth_config.items():
Expand Down