Configuring Roles via the Management Console
User management functionality is provided by default in all WSO2 Carbon-based products and is configured in the user-mgt.xml
file found in the <PRODUCT_HOME>/repository/conf
directory. The instructions given in this topic explain how you can add and manager user roles from the management console.
Roles contain permissions for users to manage the server. You can create different roles with various combinations of permissions and assign them to a user or a group of users. Through the Management Console, you can also edit and delete an existing user role. WSO2 supports the role-based authentication model where privileges of a user are based on the role to which it is attached. By default, WSO2 products come with the following roles: If a user has several assigned roles, their permissions are added together. Follow the instructions below to add a user role. The role is created and is listed on the Roles page. You can now edit the role as needed. If you need to do modifications to a role, select the domain (user store) where the role resides, and then use the relevant links in the Actions column on the Roles screen: If the role is in an external user store to which you are connected in read-only mode, you will be able to view the existing roles but not edit or delete them. However, you can still create new editable roles. If you need to do modifications to the role names, you need to do one of the following: The default role names ( The following are the changes that need to be made in the configurations above: You do not have to do this when updating before the first startup. The following steps guide you through updating the role names: If you are connected to The schema can be located by referring to the data source defined in the user-mgt.xml file. The data source definition can be found under Adding a user role
Note that when you assign this role to a user, you can override the role's permissions and customize them for the user. *
in the search field.Editing or deleting a role
Updating role names
Update before the first startup (recommended)
admin
and everyone
) can be changed before starting the WSO2 product by editing <PRODUCT_HOME>/repository/conf/user-mgt.xml
. See more information about configuring the system administrator.<Configuration>
<AdminRole>admin</AdminRole>
<AdminUser>
<UserName>admin</UserName>
<Password>admin</Password>
</AdminUser>
<EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
<Property name="dataSource">jdbc/WSO2CarbonDB</Property>
<Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
</Configuration>
<AdminRole>admin</AdminRole>
to <AdminRole>administrator</AdminRole>
.<EveryOneRoleName>everyone</EveryOneRoleName>
to <EveryOneRoleName>Your role</EveryOneRoleName>
.Update after the product is used for sometime
See more information about setting up user stores.JDBCUserStoreManager
you need to update the UM_USER_ROLE
table with the existing users after changing the admin
and everyone
role names. Also if you have changed the permission of everyone
role, the UM_ROLE_PERMISSION
has to be updated with the permissions to the new role.<PRODUCT_HOME>
/repository/conf/datasources/master-datasources.xml
.ReadWriteLdapUserStoreManager
, you need to populate the members of the previous admin role to the new role under the Groups.Related Topics
- Configuring the System Administrator: This section describes how the system administrator user and role is set up and configured.
- Configuring User Stores: This section explains how user stores (which are repositories storing information about Users and Roles) are set up and configured.