Extend the User
model with fields used by jupyter-server
identity?
#4780
Labels
User
model with fields used by jupyter-server
identity?
#4780
Proposed change
jupyter-server
2.0 introduced a rich User identity model, which could:JupyterHub currently only defines a
name
for the user:jupyterhub/jupyterhub/orm.py
Lines 256 to 281 in f9fb650
and passes it down as
username
to jupyter-server identity model:jupyterhub/jupyterhub/singleuser/extension.py
Lines 79 to 89 in f9fb650
Would you consider a PR which brings (some) additional fields from the jupyter-server identity model and:
/users/
API (if the fields are defined)Alternative options
Do nothing?
Who would use this feature?
Comparison of jupyter-server identity model with OIDC
In addition to already-supported
username
,jupyter-server
's User identity model defines:name
: (string) For-humans name of the user. May be the same as username in systems where only usernames are available.displayname
: (string) Alternate rendering of name for display, such as a nickname. Often the same as name.initials
: (string or null) Short string of initials. Initials should not be derived automatically due to localization issues. May be null if unavailable.avatar_url
: (string or null) URL of an avatar image to be used for the user. May be null if unavailable.color
: (string or null) A CSS color string to use as a preferred color, such as for collaboration cursors. May be null if unavailable.On the other hand, OIDC protocol supports standard claims:
given_name,
family_name
andmiddle_name
(self-explanatory)So there is a good overlap here, surely we could find a sensible default mapping, while allowing for customization. The defaults for all claims could also be set to None, so that these would need to be opted-in when configuring the authenticator.
Other claims are allowed, so we could support color out of box, but likely no OIDC authenticator would return a color by default unless manually configured.
The text was updated successfully, but these errors were encountered: