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

Support using arbitrary set of installed authenticators #37

Merged
merged 6 commits into from Jul 16, 2018

Conversation

yuvipanda
Copy link
Collaborator

@yuvipanda yuvipanda commented Jul 15, 2018

We don't wanna explicitly map keys from the YAML to traitlet
config for the authentication - that's a lot of busywork for no
gain. We instead switch to using snake_case everywhere, and
dynamically set traitlet config from YAML config! This lets users
pick any authenticator by specifying the fully qualified authenticator
name, and set properties using the class name. This takes us out
of the critical path for using arbitrary authenticators.

We also add OAuthenticator & LDAPAuthenticator to the base install here.

Refer #36

@codecov
Copy link

codecov bot commented Jul 15, 2018

Codecov Report

Merging #37 into master will increase coverage by 20.02%.
The diff coverage is 69.23%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #37       +/-   ##
===========================================
+ Coverage   22.48%   42.51%   +20.02%     
===========================================
  Files           6        6               
  Lines         249      254        +5     
===========================================
+ Hits           56      108       +52     
+ Misses        193      146       -47
Impacted Files Coverage Δ
tljh/jupyterhub_config.py 0% <0%> (ø) ⬆️
tljh/configurer.py 96.29% <100%> (+96.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba75457...2c7f99b. Read the comment docs.

@yuvipanda
Copy link
Collaborator Author

I hadn't intended to set up codecov to shame me if code coverage dropped, but it did and i added more tests! I call this a win!

We don't wanna explicitly map keys from the YAML to traitlet
config for the authentication - that's a lot of busywork for no
gain. We instead switch to using snake_case everywhere, and
dynamically set traitlet config from YAML config!
- Removes all need for special casing authenticators.
- Install them in hub environment, directly start using them.
- Consider if we should special case any *at all*
@yuvipanda yuvipanda changed the title Dynamically set authenticator properties from YAML Support using arbitrary set of installed authenticators Jul 16, 2018
@yuvipanda
Copy link
Collaborator Author

I'm also going to say that we don't merge new PRs until they're documented, so I'm going to add docs to this before we can merge it.

No two ways to set authenticator options - just one way.
It's slightly 'ugly' because of the mixing of camel case &
snake case, but is worth the massive reductions in complexity!
@yuvipanda yuvipanda merged commit 0fd79d6 into master Jul 16, 2018
@yuvipanda yuvipanda deleted the authenticator-support branch July 16, 2018 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant