<!--
  ~ Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
  ~
  ~ Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<UserManager>
    <Realm>
        <Configuration>
            <AddAdmin>true</AddAdmin>
            <AdminRole>admin</AdminRole>
            <AdminUser>
                <UserName>admin</UserName>
                <Password>admin</Password>
            </AdminUser>
            <EveryOneRoleName>everyone</EveryOneRoleName>
            <ReadOnly>false</ReadOnly>
            <MaxUserNameListLength>500</MaxUserNameListLength>
            <Property name="url">jdbc:h2:target/databasetest/CARBON_TEST</Property>
            <Property name="driverName">org.h2.Driver</Property>
            <Property name="maxActive">50</Property>
            <Property name="maxWait">60000</Property>
            <Property name="minIdle">5</Property>
        </Configuration>
        <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager">
            <Property name="TenantManager">org.wso2.carbon.user.core.tenant.JDBCTenantManager</Property>
            <Property name="ReadOnly">false</Property>
            <Property name="MaxUserNameListLength">100</Property>
            <Property name="IsEmailUserName">false</Property>
            <Property name="DomainCalculation">default</Property>
            <Property name="PasswordDigest">SHA-256</Property>
            <Property name="StoreSaltedPassword">true</Property>
            <Property name="ReadGroups">true</Property>
            <Property name="WriteGroups">true</Property>
            <Property name="UserNameUniqueAcrossTenants">false</Property>
            <Property name="PasswordJavaRegEx">^[\S]{5,30}$</Property>
            <Property name="PasswordJavaRegExViolationErrorMsg">Password length should be between 5 to 30 characters
            </Property>
            <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
            <Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
            <Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
            <Property name="RolenameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>
            <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
            <Property name="UserRolesCacheEnabled">true</Property>
            <Property name="MaxRoleNameListLength">100</Property>
            <Property name="MaxUserNameListLength">100</Property>
            <Property name="SharedGroupEnabled">false</Property>
            <Property name="SCIMEnabled">false</Property>
            <Property name="CaseSensitiveUsername">true</Property>
            <Property name="MultiAttributeSeparator">,</Property>
            <Property name="BulkImportSupported">true</Property>
        </UserStoreManager>
        <AuthorizationManager
                class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
            <Property name="AuthorizationCacheEnabled">true</Property>
        </AuthorizationManager>
    </Realm>
    <SystemPermission>
        <Permission>login</Permission>
        <Permission>manage-configuration</Permission>
        <Permission>manage-security</Permission>
        <Permission>upload-services</Permission>
        <Permission>manage-services</Permission>
        <Permission>manage-lc-configuration</Permission>
        <Permission>manage-mediation</Permission>
        <Permission>monitor-system</Permission>
        <Permission>delegate-identity</Permission>
    </SystemPermission>
</UserManager>
