Identify tenancy information
Use hierarchies to determine tenancy information
One way to determine tenancy information is to reuse the node structure information within a hierarchy.
Ancestors information | Hierarchy | LDAP example |
---|---|---|
ancestors[0] | Directory node | |
ancestors[1] | Namespace ID | base DN |
ancestors[2] | Tenant grouping, such as folders | organizational units |
multitenancy.TenantPattern = ~/ancestors[2]/defaultName
- name/locale, where locale is based on the mapping in the namespace configuration. If no locale is given, the name is the title of the object. For example, you could specify: multitenancy.TenantPattern = ~/ancestors[2]/name/EN-ca.
- searchPath/objectID. For example, you could specify: multitenancy.TenantPattern = ~/ancestors[2]/searchPath/objectId.
Use object attributes to determine tenancy information
If you cannot use the node structure hierarchy to determine the tenancy information, you can use specific object attributes from your authentication provider. This method requires that you also identify any additional properties to be queried during the user authentication process.
multitenancy.TenantPattern = ~/parameters/parameter_name AdditionalUserPropertiesToQuery = parametersIn this example, you must also set the following LDAP custom property:
parameter_name = departmentNumber
Use custom code to determine tenancy information
When the tenancy information cannot be obtained through a hierarchy or a user attribute, you must create a custom class that is invoked during the user authentication process to determine the tenancy information. For example, you might need to join data from multiple authentication sources, or from an authentication source and a relational database.
multitenancy.ITenantProvider = custom_class_namewhere custom_class_name represents the name of your custom class, for example, com.example.Class.
IBM Cognos Software Development Kit includes a sample custom class to determine tenancy information. You can find the sample files in the c10_location\sdk\java\AuthenticationProvider\MultiTenancyTenantProviderSample directory.