Repository navigation
Map Superset roles to our auth0 RBAC roles - #64
Merged
Merged
Conversation
rudokemper
force-pushed
the
57/map-superset-roles-to-auth0-rbac
branch
from
July 22, 2026 00:33
f12863c to
756da3b
Compare
rudokemper
force-pushed
the
57/map-superset-roles-to-auth0-rbac
branch
from
July 22, 2026 01:26
f63a969 to
ddf73ea
Compare
IamJeffG
approved these changes
Jul 29, 2026
Comment on lines
+257
to
+261
| AUTH_ROLES_MAPPING = { | ||
| "Admin": ["Admin"], | ||
| "Member": ["Alpha"], | ||
| "Guest": ["Gamma"], | ||
| "SignedIn": ["Public"], |
Contributor
There was a problem hiding this comment.
your code comment links to the canonical Superset roles. Is there a similar canonical reference for GC Explorer roles that would come from Auth0?
This was referenced Jul 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Closes #57.
After a evening of wrestling with very sparse Superset AND auth0 documentation plus much debugging, I can't believe I actually got this working! 😮
The lack of synchronization between GC (Landing Page and Explorer) and Superset roles is a major pain point for users! This PR solves that problem by not only reading the roles upon registration, but also synchronizing them every login. (This means no drift between Superset and GC roles.)
What I changed and why
AUTH_ROLES_SYNC_AT_LOGINandAUTH_ROLES_MAPPINGvars (set to our RBAC definitions)USER_ROLEas we no longer need this./userinforesponse./userinforeturns first and last name, so I got rid of some unnecessary and not very robust code that splitnameinto two parts to construct these.How I convinced myself this is right
By trying it, and through debug logs (now turned off).
To reproduce (can be done on Staging):
What I'm not doing here
In
gc-deploy, we will need to:USER_ROLEfrom one-click-app YAML definition (and adjust onboarding documentation)EDIT: WIP branch here https://github.com/ConservationMetrics/gc-deploy/tree/rk/superset-rbac-sync-changes
LLM use disclosure
I had Cursor generate docs, very minimal.