onyxia icon indicating copy to clipboard operation
onyxia copied to clipboard

onboarding - add some data on the namespace from the jwt

Open alexisdondon opened this issue 1 year ago • 9 comments

It could be helpful in the region to allow to specify jwt attributes to be added in the namesapce metadata.

Today onyxia add the owner-label but we could have another metadata like email or any claim chosen by the admin.

Let say for example a region configuration like:

namespaceMetadata: ["username","email"]

Then, at each login the onboarding could check if namespace exists check this label on the namespace and if not present or equals update the label on the namespace.

This label could be useful to communicate to the user.

Let say onboarding also handle some data like onyxia/lastLoginTime we could easily then for the administrator detect namespace not really used and launch an email to ask connection or the space will be deleted.

alexisdondon avatar Feb 16 '24 12:02 alexisdondon

Hi, we would be very interested in this (some identity data on namespaces). In our case, the mail would be used to alert users when we update some services.

micedre avatar Apr 10 '24 08:04 micedre

:+1: I will draft a PR on the API and see how it goes

olevitt avatar Apr 10 '24 08:04 olevitt

I like this

garronej avatar Apr 10 '24 09:04 garronej

If I'm not mistaken, UI currently does not regularly and reliably call the onboarding endpoint, it only calls it when it determines (based on vault ?) it may be the first time the user uses the app.
So we can populate more details at that time but onboarding endpoint won't let us refresh them.
I think we have multiple options at this point :

  1. Make the UI call onboarding at each session start regardless of any preconditions (vault ...)
  2. Add the API logic to the /user/info endpoint which is more reliably called
  3. ???

I'm in favor of 1. Any other opinion / idea ?

olevitt avatar Apr 11 '24 11:04 olevitt

@olevitt is it implemented ? I guess you can go for the first option even it's not already called regulrly

fcomte avatar May 31 '24 15:05 fcomte

@garronej just commit something to call the onboarding at each user session

fcomte avatar May 31 '24 17:05 fcomte

@olevitt Now the onboarding endpoint is called each new authenticated user session.

https://github.com/InseeFrLab/onyxia/commit/bf8de053c367b20f607f0dd74432702ba19e816a

garronej avatar Jun 01 '24 13:06 garronej

Work in progress here : https://github.com/InseeFrLab/onyxia-api/pull/429

olevitt avatar Jun 06 '24 11:06 olevitt

Work in progress here : InseeFrLab/onyxia-api#429

This PR is now ready for review. Please tell me if that fits your need @alexisdondon @micedre (and others)

olevitt avatar Jun 10 '24 06:06 olevitt