This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Using External User Stores
You can also connect an external user store (database/LDAP) with WSO2 Gadget Server. Such external stores are configured through the user-mgt.xml file which can be found in the <GS_HOME>/repository/conf directory. Settings required to connect to different user stores (an external LDAP-based user store, internal JDBC user store etc.) are already provided in the default user-mgt.xml file. You have to simply un-comment the relevant entries in the file and update the required parameters.
Note
The Gadget Server can have only one user store at any given moment. Therefore, when you want to connect to a different user store, you need to comment out the default user store settings (LDAP user store manager) in the user-mgt.xml file and un-comment the required user store settings.
Configuration settings for the default LDAP-based user store is given below.
<!-- Following is the default user store manager. This user store manager is based on embedded-apacheds LDAP. It reads/writes users and roles into the default apacheds LDAP user store. Descriptions about each of the following properties can be found in user management documentation of the respective product. Â Â Â Note: Do not comment within UserStoreManager tags. Cause, specific tag names are used as tokens when building configurations for products. --> Â Â Â <UserStoreManager class="org.wso2.carbon.user.core.ldap.ApacheDSUserStoreManager"> Â Â Â Â <Property name="ReadOnly">false</Property> Â Â Â Â <Property name="ConnectionURL">ldap://localhost:${Ports.EmbeddedLDAP.LDAPServerPort}</Property> Â Â Â Â <Property name="ConnectionName">uid=admin,ou=system</Property> Â Â Â Â <Property name="ConnectionPassword">admin</Property> Â Â Â Â <Property name="passwordHashMethod">SHA</Property> Â Â Â Â <Property name="UserNameListFilter">(objectClass=person)</Property> Â Â Â <Property name="UserEntryObjectClass">wso2Person</Property> Â Â Â Â <Property name="UserSearchBase">ou=Users,dc=wso2,dc=org</Property> Â Â Â Â <Property name="UserNameSearchFilter">(&(objectClass=person)(uid=?))</Property> Â Â Â Â <Property name="UserNameAttribute">uid</Property> Â Â Â Â <Property name="PasswordJavaScriptRegEx">[\\S]{5,30}</Property> Â Â Â Â <Property name="UsernameJavaScriptRegEx">[\\S]{3,30}</Property> Â Â Â <Property name="UsernameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\<>]{3,30}$</Property> Â Â Â Â <Property name="RolenameJavaScriptRegEx">[\\S]{3,30}</Property> Â Â Â Â <Property name="RolenameJavaRegEx">^[^~!@#$;%^*+={}\\|\\\\<>]{3,30}$</Property> Â Â Â Â <Property name="ReadLDAPGroups">true</Property> Â Â Â <Property name="WriteLDAPGroups">true</Property> Â Â Â <Property name="EmptyRolesAllowed">true</Property> Â Â Â Â <Property name="GroupSearchBase">ou=Groups,dc=wso2,dc=org</Property> Â Â Â Â <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property> Â Â Â Â <Property name="GroupEntryObjectClass">groupOfNames</Property> Â Â Â Â <Property name="GroupNameSearchFilter">(&(objectClass=groupOfNames)(cn=?))</Property> Â Â Â Â <Property name="GroupNameAttribute">cn</Property> Â Â Â Â <Property name="MembershipAttribute">member</Property> </UserStoreManager>