【问题标题】:WSO2 Data Services Server and LDAP IntegrationWSO2 数据服务服务器和 LDAP 集成
【发布时间】:2012-05-16 03:52:36
【问题描述】:

我目前正在尝试将 WSO2 数据服务服务器与我公司的 LDAP 服务器集成。 我已密切遵循 DSS 管理员指南中的步骤: http://wso2.org/project/data-services/2.6.3/docs/user-core/admin_guide.html#LDAP 在以下部分: 5. 如何配置外部 LDAP 用户存储/Active Directory 用户存储

经过一些故障排除后,我能够使用 LDAP 设置启动 DSS 服务器
CARBON_HOME\repository\conf\user-mgt.xml

但是,当我尝试通过管理页面登录时@

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

使用我的 LDAP 用户 ID 和密码,我无法成功登录。

CARBON_HOME\repository\logs\wso2carbon.log 中的错误信息:

警告 {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} - 管理员在 [2012-05-16 11:33:49,0720] 从 IP 地址 127.0 登录尝试“userID[0]”失败。 0.1 {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}

以下是我的配置文件:

<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>

我也参考了这个链接: http://wso2.org/library/knowledge-base/import-ldap-users-carbon-based-products 关于“如何将 LDAP 用户导入 WSO2 碳产品” 但它似乎不适用于 DSS,因为它在用户管理页面中没有“添加外部用户存储”选项。

对于我做错的任何建议,我将不胜感激。我正在使用 wso2dataservices-2.6.3。

谢谢!

【问题讨论】:

  • 您的管理员角色是否也在 ldap 中为“管理员”?此外,您能否仔细检查基于用户的属性。尽管 DSS 的 UI 中没有此功能,但您使用的是正确的方法,并且只要配置正确,它就应该可以工作。
  • 谢谢。我已经设法通过全新安装 DSS 解决了这个问题,在我第一次启动服务器之前,user-mgt.xml 设置指向外部 ldap。

标签: wso2 wso2dss


【解决方案1】:

您是否尝试以 admin 用户身份登录 - 在 user-mgt.xml 的顶部或 LDAP 中提到的任何其他用户身份?

如果您尝试以非管理员用户身份登录,您需要先以管理员用户身份登录并启用每个角色的登录权限。

您提供的第二个参考不适用于当前版本的产品。

谢谢, 哈西尼。

【讨论】:

  • 我试图以 user-mgt.xml 顶部提到的管理员用户身份登录。无论如何,我已经设法通过全新安装 DSS 解决了这个问题,在我第一次启动服务器之前,user-mgt.xml 设置指向外部 ldap。
猜你喜欢
  • 1970-01-01
  • 2013-02-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-23
  • 2023-02-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多