Multiple Tenant User Model

In a multi-level system that hosts several organizations and applications, where an organization can use several applications hosted on the system, should my user and role model be such that a single user or role can exist in several applications and organizations? Or should I limit the user object to one organization / application pair and then define some comprehensive model to link these user objects together?

I.e:

  • John Doe - man

  • He wants to use ApplicationA and ApplicationB

  • It works for two different companies (just a bear with me), OrganizationA and OrganizationB

If user model:

  • johndoe @someuniquesuffix is ​​his unique username. This gives him access to both applications for both organizations.

  • johndoe @applicationa @organizationa is his username ApplicationA at OrganizationA. johndoe @applicationb @organizationa is his username for ApplicationB at OrganizationA ... and the same for OrganizationB. Then enter the "master" list, which says that all 4 user accounts for applications / organizations correspond to the same actual "person", John Doe?

The same scenario (s) described above applies to how I will develop my role scheme.

Thanks for any resistance!

+3
source share
2

, , - , , , , . -, , , B John Doe, . , ( " , ?", !) (, ) B?) .

, , OpenID OAuth, , , . . google openId. A, B Twitter, Google A A.

+2

IMO, . , , . I.e., . - , A, B.

+3

Source: https://habr.com/ru/post/1759705/


All Articles