-
Notifications
You must be signed in to change notification settings - Fork 97
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
Parse and insert keycloak roles scopes into JupyterHub #2471
Conversation
7d2b7d7
to
2b1a857
Compare
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.
I have not run it yet, but it looks good.
Do you know how long the login sequence with the REST API call takes? Should we add a log message printing out delta in milliseconds to be able to monitor this in logs?
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Show resolved
Hide resolved
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Outdated
Show resolved
Hide resolved
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Outdated
Show resolved
Hide resolved
- improve comments - improve error logging Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
I have not measured it but I didn't notice any observable latency. Sure, worth adding the time delta in logs. |
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.
Tested locally by:
- adding a new client role keycloak: Configure → Clients → jupyterhub → Roles → Add role → Role name = testrole → Save → Attributes → scopes = test → component = jupyterhub
- assigning the role to user: Manage → Users → username → Role mappings → Available Roles → testrole → Add Selected
- log out and log in as
username
- open k9s, enter shell on jupyterhub pod, open sqlite database, view the roles table
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Outdated
Show resolved
Hide resolved
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Show resolved
Hide resolved
...ernetes_services/template/modules/kubernetes/services/jupyterhub/files/jupyterhub/04-auth.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
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.
Looks good - thank you!
Last time some pytest tests failed in local deployment run, let's see if those pass this time before merging.
Yes, I noticed |
All green now, merging. |
Reference Issues or PRs
Fixes #2432
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Any other comments?