Base solution for your next web application
Open Closed

multi-tenant effectiveness #7980


User avatar
0
pnocera created

Hi,

I just purchased ASP.NET Zero, which I consider a nice effort for its patterns and practices implementation. I've been thinking a lot wether I'll use it or not for my project. There's one thing which will probably make me take another way, but is quite fundamental to my sense, and it's in the title :)

I would rather create a tenant for each user as soon as he registers. Then any user could reference another user and give him a role in his tenant which would provide access to some resources ( features or permissions, which btw I would gather in a single parent/child entity ). This would allow a single access, a single account for one given email. The user logs-in, then chooses which tenant he is interacting with. The permissions would be defined by the subscription of the tenant whithin which context the user is acting, and the role he's been provided in this tenant.

The high level db schema would be something ike that :

I know it's a big impact. I'd probably would have to fork the boilerplate. Or restart from scratch with a nodejs backend...

What guys do you think ?


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pnocera

    I couldn't understand your question, sorry. Would you like to implement user based subscription system rather than tenant based subscription ?

  • User Avatar
    0
    pnocera created

    Hi @ismcagdas, basicaly yes.

    The idea is that either an individual user or either an organization with multiple users could subdcribe to my services.

    The high level schema could be something like this

    Here the tenant or organization is the entity which has one or more subscriptions. The features one user can access are defined by the role he has been given in the org, and the features provided by the subscription. There's a unique user email and an n-n relation between users and organizations. A personal organization is provisioned at the user's subscription.

    It seems to me the overall idea takes me too far from the basic concepts the boilerplate was developped. I'm going to take benefit from the nice work you did on the angular client and the p&p of your solution, but will develop a new backend, probably with nestjs.

    Thanks

  • User Avatar
    0
    ryancyq created
    Support Team

    There's a unique user email and an n-n relation between users and organizations. A personal organization is provisioned at the user's subscription.

    Hi @pnocera for single account access, it can be done via LinkedAccount feauture in ANZ. When a user choose to login to another tenant, its roles and permission will be scoped to the context of the chosen tenant

  • User Avatar
    0
    pnocera created

    Hi Ryan, thanks, this is interesting. I'll investigate with this option.