Once you have set up a new RDBMS and configured the datasource, the the
user-mgt.xml file file (user realm configuration) should be updated as explained below.
Update the datasource information using the the
<Property> element under
<Configuration>. The jndi name of the datasource should be used to refer to the datasource element under
<Configuration>. Given below are the properties that are set by default.
This is the jndi name of the datasource that is used for referring to the datasource. In the following example,
the jndi name of the
default datasource defined in the
|This property is set to 'true' by default, which enables cascade delete for the UM_USER_PERMISSION and UM_ROLE_PERMISSION tables when a permission gets deleted from the UM_PERMISSION table. That is, if a record in the parent table is deleted the corresponding records in the child table will be automatically deleted.||Mandatory|
You can add more optional configurations using the the
<Property> element element:
It is recommended to set this property to 'true' so that object connections will be validated before being borrowed from the JDBC pool. For this property to be effective, the
Configuring the Authorization Manager
Shown below is how the Authorization Manager is enabled in the user-mgt.xml file.
<AuthorizationManager class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager"> <Property name="AdminRoleManagementPermissions">/permission</Property> <Property name="AuthorizationCacheEnabled">true</Property> </AuthorizationManager>
- The The
org.wso2.carbon.user.core.authorization.JDBCAuthorizationManagerclass class enables the Authorization Manager for your product.
AdminRoleManagementPermissionsproperty property sets the registry path where the authorization information (role-based permissions) are stored. Note that this links to the repository that you defined in in Step 1.
It is recommended to enable the the
GetAllRolesOfUserEnabledproperty property in the the
AuthorizationManageras as follows:
Although using the user store manager does not depend on this property, you must consider enabling this if there are any performance issues in your production environment. Enabling this property affects the performance when the user logs in. This depends on the users, roles and permission stats.
By default, the rules linked to a permission (role name, action, resource) are not case sensitive. If you want to make them case sensitive, enable the following property: