Working with Multi-tenancy
The goal of multi-tenancy is to maximize resource sharing across multiple users (while hiding the fact that these users are on the same server) and to ensure optimal performance. You can register tenants in the Management Console, allowing tenants to maintain separate domains for their institutions.
When multi-tenancy is used, certain tenants can sometimes become inactive for a long period of time. By default, if the inactive period is 30 minutes, the tenant is unloaded from the server memory. This requires the tenant to log in again before sending requests to the server.
If required, you can change the default time allowed for tenant inactiveness by adding the -Dtenant.idle.time=<time_in_minutes>
java property to the product startup script (./wso2server.sh
file for Linux and wso2server.bat
for Windows) as shown below:
JAVA_OPTS \ -Dtenant.idle.time=30 \
All the EMM tenants can access the public Store, but tenants are always required to log in to view their private store. Before carrying out any tasks on the Management Console, we highly recommend you to change the default super tenant administrator password.
Changing the default tenant password
Before carrying out any tasks on the Management Console, we highly recommend you to change the default super tenant administrator password. Follow the instructions below to change the default super tenant administrators password:
- Open a command prompt:
- On Windows, choose Start -> Run, type cmd at the prompt, and press Enter.
- On Linux/Solaris, establish a SSH connection to the server or log in to the text Linux Console.
Execute one of the following commands, where
<EMM_HOME>
is the directory where you installed the product distribution:OS Command Linux/Solaris sh <EMM_HOME>/bin/wso2server.sh
Windows <EMM_HOME>\bin\wso2server.bat --run
- Log into the Management Console, using the following URL: http://localhost:9443/admin/carbon/
- Enter the username as
admin
and the password asadmin
. - Click Sign-in.
- Switch to the Configure tab.
- Click Users and Roles and thereafter click User.
- Click Change Password in the Actions column, in-line with the user
admin
and set a new password. - Click Change.
- Log out and log in again with the new credentials.
Adding a new tenant
Follow the instructions below to add a new tenant:
- Log into the Management Console.
- Switch to the Configure tab and click Add New Tenant.
- Fill the data about the tenant, including:
- Domain - The domain name for the organization, which should be a unique name (e.g., abc.com)
- Usage plan for the tenant - The usage plan defines limitations (such as number of users) for the tenant.
- First Name - First name of the tenant admin.
- Last Name - Last name of the tenant admin.
- Admin Username - The username the tenant admin will use to log in. The username must always end with the domain name (e.g., admin@abc.com).
- Email - The email address of the admin.
- Click Save.
Editing a tenant
Follow the instructions below to edit a tenant:
- Log into the Management Console.
- Switch to the Configure tab and click View Tenants.
- Search for the tenant based on the tenant domain name.
- Click Edit.
- Edit the tenant details as required. Note that the domain, tenant ID and usage plan can not be modified.
- Click Update.
- Optionally, click Deactivate, if you wish to deactivate the tenant.
Viewing tenants
To view existing tenants, on the Configure tab in the Management Console, click View Tenants.