-
Notifications
You must be signed in to change notification settings - Fork 60
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
User-dependent list of available profiles #7
Comments
I am similarly trying to understand how to filter a list of profiles based on a user's group memberships. The basic/fundamental challenge (I believe) I'm facing is how/where I can pass information from an Authenticator to a Spawner in order to configure the form that is presented to the user. So far, I've looked at three different approaches, none of which work.
Are there any other extension points in either the |
I should mention that I've inspected #15, which is conceptually aligned with what I'm trying to accomplish, however its implementation does not demonstrate integration between |
options_form can be a callable, which is then executed with itself (the spawner) as an argument. This is done after spawner.user is set. KubeSpawner does this, and I use different functions to generate a user-dependent list of profiles. wrapspawner could be modified to make this easier. I think right now options_form could just directly be set to a callable, but it won't validate because the trait is declared as a Unicode type only. Upstream does this: The upstream option is this:
We can directly copy some logic from kubespawner to make this a bit nicer. The whole thing makes me wonder about deduplicating kubespawner and wrapspawner (and other similar things)... |
Was pointed to this repo from jupyterhub/kubespawner#589 As that issue shows, there is a need for a similar feature (profile lists dependent on user's group memberships) in other contexts (such as kubernetes clusters, with users managed by AWS Cognito for example, and not only the traditional linux HPC context mentioned by OP here). The docs for Zero to Jupyterhub with Kubernetes have a section about this feature. They currently advocate passing in localised python code (in via the helm chart value strings and kubernetes config objects) to monkey-patch |
I'm currently using
ProfilesSpawner
in combination with the batchspawner to offer our HPC cluster's users differentBatchSpawner
profiles.Is there any way how I can make the list of profiles offered to the user dependent on the user's group?
If not, I would appreciate a pointer towards where I would need to implement this.
The text was updated successfully, but these errors were encountered: