I have deployed jupyterhub using the helmchart version 4.0.0. I am using azure as Authenticator and the config looks like this:
authenticator: |
import os
from oauthenticator.azuread import AzureAdOAuthenticator
c.AzureAdOAuthenticator.oauth_callback_url = "https://jupyterhub-test-dev/hub/oauth_callback"
c.AzureAdOAuthenticator.username_claim = "unique_name"
c.AzureAdOAuthenticator.enable_auth_state = True
c.AzureAdOAuthenticator.manage_groups = True
c.AzureAdOAuthenticator.auth_state_groups_key = "user.groups"
c.AzureAdOAuthenticator.allowed_groups = ["jupyterhub-test-admin", "jupyterhub-test-user"]
c.AzureAdOAuthenticator.admin_groups = ["jupyterhub-test-admin" ]
c.AzureAdOAuthenticator.scope = ["GroupMember.Read.All", "User.Read", "User.Read.All", "email", "openid" ]
class subAzureAuthenticator(AzureAdOAuthenticator):
def normalize_username(self, username):
username = username.lower().split('@')[0]
clean_username = username.replace('.', '')
clean_username =clean_username.replace('_', '')
return clean_username
c.JupyterHub.authenticator_class = subAzureAuthenticator
The group sync works as expected. After I login, I can see the the groups created in the admin panel. However, as admin, I cannot delete or edit these groups.
logs from hub:
Checking access to /hub/api/groups/jupyterhub-test-admin via scope delete:groups!group=jupyterhub-test-admin
[W 2025-01-27 12:04:45.399 JupyterHub web:1873] 400 DELETE /hub/api/groups/jupyterhub-test-admin?_xsrf=token (95.90.206.235): Group management via API is disabled
[W 2025-01-27 12:04:45.399 JupyterHub log:192] 400 DELETE /hub/api/groups/jupyterhub-test-admin?_xsrf=[secret]
Is that the expected behaviour? I thought that having admin permission includes this role : ‘admin:groups!group=jupyterhub-test-admin’ and ‘admin:users!group=jupyterhub-test-admin’
I need to be able to delete the groups because sometimes we delete the user groups in azure app registration, but this is not synced in jupyterhub user management database. Even though the groups is delete in azure, it still remains in jupyterhub.