2
votes

I am currently trying to integrate WSO2 Data Services Server with my company LDAP server. I have followed closely the steps in the DSS admin guide: http://wso2.org/project/data-services/2.6.3/docs/user-core/admin_guide.html#LDAP under the section: 5. How to Configure an External LDAP User Store / Active Directory User Store

After some trouble shooting I was able to start the DSS Server with the LDAP settings in
CARBON_HOME\repository\conf\user-mgt.xml

However, when I try to login in via the admin page @

https://localhost:9443/carbon/admin/login.jsp 

using my LDAP user id and password, I was not able to login successfully.

The error message in CARBON_HOME\repository\logs\wso2carbon.log :

WARN {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - Failed Administrator login attempt 'userID[0]' at [2012-05-16 11:33:49,0720] from IP address 127.0.0.1 {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}

Following is my configuration file:

<UserManager>
    <Realm>
        <Configuration>
                <AdminRole>admin</AdminRole>
                <AdminUser>
                     <UserName>userID</UserName>
                     <Password>XXXXXX</Password>
                </AdminUser>
            <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
            <Property name="url">jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE</Property>
            <Property name="userName">wso2carbon</Property>
            <Property name="password">wso2carbon</Property>
            <Property name="driverName">org.h2.Driver</Property>
            <Property name="maxActive">50</Property>
            <Property name="maxWait">60000</Property>
            <Property name="minIdle">5</Property>
        </Configuration>
    <!-- If product is using an external LDAP as the user store in read only mode, use following user manager -->
        <UserStoreManager class="org.wso2.carbon.user.core.ldap.LDAPUserStoreManager">
            <Property name="ReadOnly">true</Property>
            <Property name="MaxUserNameListLength">100</Property>
            <Property name="ConnectionURL">ldap://ldap.xx.xx.xx:389</Property>
            <Property name="ConnectionName">cn=ssssss,OU=YYYYYY,dc=aa,dc=bb,dc=cc</Property>
            <Property name="ConnectionPassword">pppppp</Property>
            <Property name="UserSearchBase">DC=aa,DC=bb,DC=cc</Property>
            <Property name="UserNameListFilter">(objectClass=user)</Property>
            <Property name="UserNameAttribute">cn</Property>
            <Property name="ReadLDAPGroups">false</Property>
            <Property name="GroupSearchBase">ou=system</Property>
            <Property name="GroupNameListFilter">(objectClass=groupOfNames)</Property>
            <Property name="GroupNameAttribute">cn</Property>
            <Property name="MembershipAttribute">member</Property>
            <Property name="UserRolesCacheEnabled">true</Property>
        <Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
        </UserStoreManager>
        <AuthorizationManager
            class="org.wso2.carbon.user.core.authorization.JDBCAuthorizationManager">
            <Property name="AdminRoleManagementPermissions">/permission</Property>
            <!-- Uncommenting the following element will enable the periodically running permission update task.
             It is disabled by default. -->
            <!-- <Property name="UpdatePermissionTreePeriodically">true</Property> -->
        </AuthorizationManager>
    </Realm>
</UserManager>

I have also referred to this link: http://wso2.org/library/knowledge-base/import-ldap-users-carbon-based-products about "How to Import LDAP Users to WSO2 Carbon Based Products" But it doesn't seem to be applicable to DSS as it has no option to "Add External User Store" in the User Management page.

Will appreciate any advice in what I have done wrong. I am using wso2dataservices-2.6.3.

Thanks!

1
Is your admin role 'admin' in the ldap as well? Also, can you double check the User based properties. Even though this is not there in the UI for DSS, you are following the correct method and it should just work once the configuration is done right.dev_nut
Thanks. I have managed to resolve the issue by doing a fresh installation of DSS, with the user-mgt.xml set pointing to the external ldap BEFORE i start the server for the first time.gkl

1 Answers

0
votes

Are you trying to login as the admin user - which is mentioned as the top of the user-mgt.xml or as any other user in the LDAP?

If you are trying to login as a non-admin user, you need to first login as admin user and enable login permission to every one role.

The second reference you have provided doesn't apply to the current versions of the products.

Thanks, Hasini.