A User, an Account and SaaS
Join the DZone community and get the full member experience.Join For Free
users are almost always the simplest entity in your application. i mean, they usually just look like this:
how complex can something like that be? the answer is that as simple as something like that is, people still get it wrong, and quite often they get it horribly wrong.
just to set the proper context, i am talking about applications that provide software as a service. for example, we may be building an accounting saas system.
a user logs into the system, and gets to see his invoices, outstanding bills, etc. this sounds simple enough to do, so what is the reason for this post? the reason is that while this may sound simple, it is also wrong .
the user is the account
let us introduce a few other semantics into the mix. i don’t want to do accounting, so i get pkida to do that for me. but, since my data is tied to my user account, i would have to provide her with my username and password. now, i am willing to let pkida do my accounting, but i am not going to give her my credentials.
this is usually the first stumbling block for systems where “user is an account” model. you want multiple users to manage the same account. a good example of a system that for a very long time failed to handle this properly is amazon aws platform. for a long time, there was your aws account and your username, and they were pretty much one and the same. consider the case of an it department that wanted to use amazon aws. until as recently as may 2011, they didn’t have any way to have multiple people manage the account, because they would need a single user/pass for the entire thing.
that is a huge problem for most scenarios. sharing user/pass means that you lost control on the account:
- you don’t know who of the people who have access to the account made a particular change (no auditing).
- you can’t use standard approaches for detecting fraud.
- it is much harder to change the password.
accounts owns the users
the next step is to ask what happen when you have something like this:
now we have a way to have an account, and it can have multiple users. and all is good in the world, right?
not so fast. what happens when it turns out that pkida isn’t just working for me, but actually manages the accounting for several companies, each of them is using the saas accounting package. in order to use the software, pkida would now have to have a separate user account for every customer she manages. that sucks:
- it may mean that you charge her for each account (she will go to a competitor).
- some users would show very little activity.
- the amount of information you will have to do things like cross selling or targeted offers would be far reduced.
- it is annoying for the users.
a much better option is a total separation of users and accounts. a user can have several accounts (usually with a default one selected), and they can use a single login to access each, and each account may have multiple users associated with it.
this brings to question how you are going to handle charging people, but that is an issue for another post, and another day…
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.