-
Notifications
You must be signed in to change notification settings - Fork 238
Multi Tenancy
MembersipReboot supports multi-tenancy. A tenant is simply a logical grouping of different users. This means that two different tenants can each have a user with the same username. Two users in the same tenant can not have the same username.
Multi-tenancy is a boolean flag and can be configured either via the SecuritySettings.MultiTenant property, or in the config file:
<membershipReboot multiTenant="true" />
The default value is false.
If multi-tenancy is being used, then it is required that the UserAccountService APIs that accept a tenant as the first parameter be used. This way each operation is explicit about which tenant to use.
If multi-tenancy is not being used, then it is not necessary to use UserAccountService APIs that accept a tenant as the first parameter. In fact, the tenant parameter will be ignored and a default value will be used for the tenant when storing the UserAccount in the database. It is possible to configure this default value -- it is a string value and can be configured either via the SecuritySettings.DefaultTenant property, or in the config file:
<membershipReboot defaultTenant="SomeName" />
The default value is "default".
Another feature related to tenancy is the option to require that usernames be unique to all tenants. It is possible to configure this feature with a boolean value on the SecuritySettings.UsernamesUniqueAcrossTenants property, or in the config file:
<membershipReboot usernamesUniqueAcrossTenants="true" />
The default value is false.