You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, allowed_groups is configured as are some users under the admin_users list. The variable admin_groups is missing from the config, which seems to cause the problem mentioned in the title.
If a user logs in and is in the admin_users group, they should be assigned the admin role.
Actual behaviour
The user logs in and the OAuthenticator checks if allowed_groups is set and the user's group retrieved from the claim is in there. Now it also checks if the user's group is in the admin_groups list, which it is not, so the user is assigned the user role, even though there is an entry for the user's name in the admin_users list.
Set up an instance with admin_users entries, GenericOAuthenticator and external groups retrieved via a claim, allowed_groups but no admin_groups, and then watch it steal your admin status...
Your personal set up
We're using zero-to-jupyterhub chart version jupyterhub-2.0.1-0.dev.git.6026.h0e7347d7.
OS: n.a.
Version(s): Jupyterhub 3.1.1
The text was updated successfully, but these errors were encountered:
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Bug description
I am running a setup with the following configuration (excerpt):
As you can see,
allowed_groups
is configured as are some users under theadmin_users
list. The variableadmin_groups
is missing from the config, which seems to cause the problem mentioned in the title.For further reference, there is a previous issue filed here:
jupyterhub/zero-to-jupyterhub-k8s#3086
Expected behaviour
If a user logs in and is in the
admin_users
group, they should be assigned theadmin
role.Actual behaviour
The user logs in and the OAuthenticator checks if
allowed_groups
is set and the user's group retrieved from the claim is in there. Now it also checks if the user's group is in theadmin_groups
list, which it is not, so the user is assigned theuser
role, even though there is an entry for the user's name in theadmin_users
list.This is where it happens:
https://github.com/jupyterhub/oauthenticator/blob/15.1.0/oauthenticator/generic.py#L184-L219
How to reproduce
Set up an instance with
admin_users
entries, GenericOAuthenticator and external groups retrieved via a claim,allowed_groups
but noadmin_groups
, and then watch it steal your admin status...Your personal set up
We're using zero-to-jupyterhub chart version
jupyterhub-2.0.1-0.dev.git.6026.h0e7347d7
.The text was updated successfully, but these errors were encountered: