I would like to first store a mapping of the roles of my users on a JSON file and using this to populate the right role to my users on every login, what would be the recommended way to achieve this?
It looks like on solution could be to use the Github deployment extension to store my rule and the mapping file. The rule would be similar to the “Set Roles To A User” except loading data from a file.
Would that be a recommend way to do this ? Is there something easier that I’m missing?
Update (follow-up to @jmangelo answer)
I see the confusion there. Thanks for pointing the possible overlap, for some odd reasons I was thinking assigning the roles to a user with a rule would end up updating the source of truth whereas it is just decoration of the user profile.
So my use case is effectively a mix of #1 and #2 (I need to dynamically be able to provision new users), I also want to minimize a little bit the number of system people need to manually enter information to provision a new user. So ideally my json file would be used as the source of truth… given roles and permission of people evolve, I want to be able to sync that easily to the authorization extension data rather than going through a UI. (we need to provision other access at the same time, so it is not practical to have people logging into 5 systems and add piecemeal information for every user)
I guess I could use the https://github.com/auth0-extensions/authz-extension-automation-sample as a blueprint to synchronize the information from the json file to the auth extension and run it each time we have a change to keep the authz extension data in sync.