Page MenuHomePhabricator

Assign users' real names and email addresses to their Superset user accounts automatically
Closed, ResolvedPublic

Description

At the moment, when new users of Superset are created, the CAS authorization method only passes through the posix shell username to Superset.

That means when a user account record is created in Superset, the user's real name and email address is missing. For example:

image.png (1,134×319 px, 34 KB)

Users are permitted to update their First Name and Last Name records, but it would be better if were able to populate the information automatically.

The scope of this ticket is to investigate whether or not it would be possible to do this for a reasonable amount of effort.
Then if it is possible, implement that change.

Event Timeline

There is a useful description of the problem in this document.

We plan to tackle this by implementing OIDC authentication in T353794

By doing this we will be able to retrieve additional information from the authentication system and use it to populate the additional database fields.
For reference, this is where we do a similar thing with DataHub: https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/954132/16/charts/datahub/charts/datahub-frontend/values.yaml

When authenticating, we can retrieve the preferred_username and email values, as well as a list of groups of which the user is a member.

This should allow us to populate the First Name, Last Name, and email fields automatically, which will improve the user experience.

In addition to that, we can assign additional roles based on group membership, which will ease administration and upgrades.
Currently we assign a WMF Analyst role to all users and we have to update this role with new permissions every time we deploy a Superset upgrade.

BTullis renamed this task from Try to improve the LDAP integration for Superset user account creation to Assign users' real names and email addresses to their Superset user accounts automatically.Dec 20 2023, 11:44 AM

Change 1006547 had a related patch set uploaded (by Brouberol; author: Brouberol):

[operations/deployment-charts@master] superset: assign Superset roles from LDAP groups

https://gerrit.wikimedia.org/r/1006547

Change 1006547 merged by Brouberol:

[operations/deployment-charts@master] superset: assign Superset roles from LDAP groups

https://gerrit.wikimedia.org/r/1006547

This was fixed in https://gerrit.wikimedia.org/r/1006547, where some custom OIDC login code makes sure to update the Superset User record with the data sent back by the OIDC server.