I’m trying to figure out if the following situation is either supported or can be made to work:
My system has two APIs:
billing. Each API has various permissions, e.g.
write:refund-payment (among others).
The above scenario seems pretty easy: I’ve got two APIs and each API has its respective set of permissions and these permissions can be put together into various well-named roles which can then be assigned to the appropriate users. So far so good.
Here’s the tricky part: A single user will often service or be affiliated with multiple customers. For example, I might have a small auto-repair shop as a customer and then another being a brick-and-mortar, clothing outlet, but a single individual will often have different permissions to interact with our
subscription APIs depending upon the customer.
To recap: a user
jim might be
admin role in our
billing API with the repair shop customer (ID: 123) while at the same time only being a
viewer role for the
billing API with the clothing store customer (ID: 456).
I’m trying to make sure the system can handle 50K+ customers, so I’m not sure if creating an “Auth0 tenant” per customer makes sense, otherwise it seems like I’d overwhelm the Auth0 system and my administrative capabilities. By administrative capabilities, I mean that if I did use Auth0 tenants, wouldn’t I have to define all of the APIs, roles, permissions, connections, etc. in every. single. new. tenant?
I’m not scared of code, I’m happy to write the necessary code to facilitate the above situation. I’m mostly trying to determine if this is something that comes out of the box and which be enabled quickly and easily, or if this will require extensive amounts of coding and really goes against the fundamental design concepts and primitives baked into Auth0.
I’m really trying to avoid things like “login with you Gmail to handle the repair shop customer and then login with Github to do stuff for the clothing outlet customer.” I’d prefer to have the individual use whatever logins they want to identify themselves and then my app could inspect the claims/scopes/whatever to see what permissions they have as they attempt to perform API operations for the repair shop or clothing outlet, etc.
Any advice/thoughts would be appreciated.