3 ms·
I've been thinking a ton about this over the last year and I think this is actually overcomplicating things. Generally from what I can tell, most of what makes
by weitendorf 1y ago
I've been thinking a ton about this over the last year and I think this is actually overcomplicating things. Generally from what I can tell, most of what makes Auth so painful is overcomplicating things.
My belief is that the only two things you need to know to understand Auth are Identity and your Authorization model. Everything else is just a consequence of those two things.
Consumer and B2B auth are different mostly because they have different identity and authorization models, neither of which are really that complicated to identify:
1. Consumers theoretically control their own identity but in practice almost all delegate it to gmail, facebook, microsoft, etc. Businesses have actual control over their employee's identities because they own domains and emails get routed to wherever they point their domain at.
2. Consumer authorization models by default give the user access to all of their data and none of anybody else's data, unless explicitly configured otherwise. Business authorization models work exactly the same way for admins (meaning, control of the business' source of identity gives them access to ~all of the business' data). It's kind of insane to give everybody access to everybody's data so businesses create ontologies of roles/groups/scopes so that each employee only gets just as much admin powers as they require.
Why does it work that way? Well, when you control your own identity like consumers and admins, you want to just get things done without permission and auth getting in the way. When you control other people's identity you aren't personally subject to the difficulties that arise from locking things down, but you are responsible for their identity and what that identity can do, so you do what you can to limit access.
It all kinda reduces down to the problem that the Internet didn't come with a good system for managing identity, so we all use accounts based on email, which is based on domains, which route traffic using DNS, which basically sends all the account recovery/verification/communication record for every employee of a company to one spot. There is an inherent escalation of privilege vulnerability there, and there's no good fix, so we resign ourselves to a security model that says 1. centralize all information in one place 2. do whatever possible to hide, compartmentalize, and limit access to that information. It feels insane because it is insane.
Being responsible for only your own identity, actions, access, and data: makes sense. Being responsible for everybody else's actions, access, and data (because your job is managing the thing that centralized it all in one place): nightmare fuel.
- magicalhippo 1y ago> Business authorization models work exactly the same way Except you got people from the parent company wanting access to certain stuff, and then there's the third-party auditor that needs access and so on. So no, B2B isn't exactly the same necessarily.
- ehutch79 1y agoFrom the authentication systems perspective, what exactly is the difference between an employee and 3rd party auditor? From the authorization system, why would it care who they work for, as opposed to the permissions assigned to them?
- magicalhippo 1y ago> From the authentication systems perspective, what exactly is the difference between an employee and 3rd party auditor? Might require different authentication providers. > From the authorization system, why would it care who they work for, as opposed to the permissions assigned to them? Take the case of the accountant in the parent company. Either you create a user for that accountant in each of the child companies and manage access individually for each company, or you have a single user which has access to different child companies through separate permissions or something like that. If you do it the first way, it's more like a regular B2C case, but not exactly because you still gotta do things like automatically disable those child-users when the accountant quits the parent company. We've hit these scenarios as customer requirements in our B2B product, YMMV.