-
Notifications
You must be signed in to change notification settings - Fork 178
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
align allowed_groups
with other allowed_
config, consistent in JupyterHub 5
#269
Conversation
avoids relying on allow_all in jupyterhub 5
Co-authored-by: Erik Sundell <[email protected]>
|
👍, this seems cleaner and better long term for everyone. |
The search_filter docstring:
suggests that this is explicit allow config, so should result in passing
|
allowed_groups still narrows the match
I frame the current behavior as: |
OK, then shall I remove the interpretation of search_filter as allow config at all? That seems to make the most sense, based on what you've said. |
I agree. Intuitively |
Can we also update the documentation/readme for |
I think filtering maps reasonably onto "block unless" in our terminology, but we could perhaps have a better way to say that |
ok, tests are now passing with updated descriptions. I needed to add a bit of logic to handle the default behavior for |
We also have a choice on how
Any preference? I can't really decide which one is more likely to be surprising. 2 is a bigger, more breaking change, but it breaks in the safer, less permissive direction. 1. keeps current default behavior, consistent with JupyterHub itself. |
We are currently having option 1, right? I think that is sufficient and allows us to move onwards. |
@minrk a third approach is to remove support for JupyterHub 4 in this authenticator, which would be fine in my mind. In order of preference, I think 3 > 1 > 2, but we could go with anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this PR implements option 1 at the moment. It seems quite early to drop support for JupyterHub 4, which was the latest version just a few months ago. |
From mobile on a walk with a stroller, i figure we should merge now but a final review detail: is title/description still updated to reflect the PR? |
allowed_
config, consistent in JupyterHub 5
updated title |
Wieee!! |
allowed_
config, consistent in JupyterHub 5allowed_groups
with other allowed_
config, consistent in JupyterHub 5
avoids relying on allow_all in jupyterhub 5.
The group is populated in
authenticate
and checked incheck_allowed
breaking change that's technically avoidable: I moved the
user_attr
down a level so it is its own dict in auth_state, so it'sauth_state["user_attrs"]
. I could just as easily addldap_groups
within that dict, but it seems that the attributes dict has a specific meaning, so I thought it better to move it so it doesn't get any extra keys.One test that's still failing is the
search_filter
test. This test passes if I setallow_all = True
, but it's unclear to me ifsearch_filter
should be considered allow config or not.closes #246
EDIT:
auth_state
is no longer the location for user attributes, they are put inauth_state["user_attributes"]