Active directory WSO2标识服务器-LDAP用户存储不工作

Active directory WSO2标识服务器-LDAP用户存储不工作,active-directory,wso2,Active Directory,Wso2,我正在尝试针对我们公司的Active Directory配置Identity Server(4.1.0) 我正在使用ReadOnlyDapUserStoreManager类。以下是用户存储的配置: <UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager"> <Property name="ReadOnly">true</Prope

我正在尝试针对我们公司的Active Directory配置Identity Server(4.1.0)

我正在使用ReadOnlyDapUserStoreManager类。以下是用户存储的配置:

<UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
            <Property name="ReadOnly">true</Property>
            <Property name="MaxUserNameListLength">100</Property>
            <Property name="ConnectionURL">ldap://host</Property>
            <Property name="ConnectionName">ommitted</Property>
            <Property name="ConnectionPassword">xxxxxx</Property>
            <Property name="passwordHashMethod">PLAIN_TEXT</Property>
            <Property name="UserSearchBase">searchbase</Property>
            <Property name="UserNameListFilter">(objectClass=user)</Property>
            <Property name="UserNameAttribute">sAMAccountName</Property>
            <Property name="ReadLDAPGroups">true</Property>
            <Property name="GroupSearchBase">groupbase</Property>
            <Property name="GroupNameListFilter">(objectClass=group)</Property>
            <Property name="GroupNameAttribute">sAMAccountName</Property>
            <Property name="MembershipAttribute">memberOf</Property>
            <Property name="UserRolesCacheEnabled">false</Property>
            <Property name="ReplaceEscapeCharactersAtUserLogin">true</Property>
            <Property name="maxFailedLoginAttempt">0</Property> 
        </UserStoreManager>

真的
100
ldap://host
同意
xxxxxx
纯文本
搜索库
(objectClass=user)
sAMAccountName
真的
群基
(objectClass=group)
sAMAccountName
成员
假的
真的
0
我已经删除了特定的连接详细信息以及UserSearchBase和GroupSearchBase。IS成功启动,我可以看到列出的用户和角色

我遇到了以下问题:

  • Identity server未将分配的角色正确映射到用户。即使我的广告使用“memberOf”属性来定义组成员身份,Identity server也没有为特定用户分配任何成员身份
  • 我无法使用LDAP存储中的用户登录到Identity server管理UI。当我以以下方式配置领域/配置时:

    管理 广告用户名称 管理 每个人 jdbc/WSO2CarbonDB org.wso2.carbon.user.core.config.Multitenance.CommonLDAPRealmConfigBuilder org.wso2.carbon.user.core.config.Multitenance.CommonLDAPRealmConfigBuilder

是否有人对与只读LDAP存储(即ACtive directory)集成有任何建议

更新
在使用WSO2支持时,我建议大家等到IS 4.1.1之后再尝试这个特定的用例。旧版本的产品根本不能很好地工作。我将根据我了解的更多信息进行更新。

我在最近的一次客户服务中使用了附加的配置 你能试试这个,和一个对广告有读权限的用户连接吗

此外,最新版本的IS现在支持多个用户存储。如果需要单个活动存储,请确保注释默认存储。否则,您需要为每个用户存储添加域名(此处为ad domain)

此处介绍了用户存储设置:

希望这有帮助, 伊莎贝尔

<UserStoreManager class="org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager">
<Property name="DomainName">ad-domain</Property>
<Property name="defaultRealmName">My-Realm</Property>
<Property name="kdcEnabled">false</Property>
<Property name="ConnectionURL">ldap://myserver:389</Property>
<Property name="ConnectionName">CN=yyyy,ou=xxxxx</Property>
<Property name="ConnectionPassword">xxxxxxx</Property>
<Property name="passwordHashMethod">PLAIN_TEXT</Property>
<Property name="UserSearchBase">ou=xxxx,...</Property>
<Property name="UserEntryObjectClass">user</Property>
<Property name="UserNameAttribute">sAMAccountName</Property>
<Property name="isADLDSRole">false</Property>
<Property name="userAccountControl">512</Property>
<Property name="UserNameListFilter">(objectClass=user)</Property>
<Property name="UserNameSearchFilter">(&amp;(objectClass=user)(cn=?))</Property>
<Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
<Property name="UsernameJavaScriptRegEx">^[\\S]{3,30}$</Property>
<Property name="PasswordJavaScriptRegEx">^[\\S]{5,30}$</Property>
<Property name="RolenameJavaScriptRegEx">^[\\S]{3,30}$</Property>
<Property name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
<Property name="ReadLDAPGroups">true</Property>
<Property name="WriteLDAPGroups">false</Property>
<Property name="EmptyRolesAllowed">true</Property>
<Property name="GroupSearchBase">ou=xxxxx</Property>
<Property name="GroupEntryObjectClass">group</Property>
<Property name="GroupNameAttribute">cn</Property>
<Property name="MembershipAttribute">member</Property>
<Property name="GroupNameListFilter">(objectcategory=group)</Property>
<Property name="GroupNameSearchFilter">(&amp;(objectClass=group)(cn=?))</Property>
<Property name="UserRolesCacheEnabled">true</Property>
<Property name="Referral">follow</Property>
<Property name="BackLinksEnabled">true</Property>
<Property name="maxFailedLoginAttempt">0</Property>
</UserStoreManager>

广告领域
我的王国
假的
ldap://myserver:389
CN=yyyy,ou=xxxxx
xxxxxxx
纯文本
ou=xxxx,。。。
用户
sAMAccountName
假的
512
(objectClass=user)
(&;(objectClass=user)(cn=?)
[a-zA-Z0-9.|-|/][3,30}$
^[\\S]{3,30}$
^[\\S]{5,30}$
^[\\S]{3,30}$
[a-zA-Z0-9.|-|/][3,30}$
真的
假的
真的
ou=xxxxx
组
cn
成员
(objectcategory=组)
(&;(objectClass=group)(cn=?)
真的
跟随
真的
0

请参阅以下Suresh的博客文章

它有一个使用
ReadOnlyDapUserStoreManager
的示例

我希望这有帮助


谢谢。

我不知道Active Directory的情况,但我们在OpenLDAP上遇到了类似的问题,我们无法列出用户的角色,原因是,我们的LDAP仅通过使用用户的UID将用户与组关联,例如,在角色属性memberUid上:

memberUid = alandaniel
但是WSO2 org.WSO2.carbon.user.core.ldap.ReadOnlyDapUserStoreManager 预计是:

memberUid = uid=alandaniel,ou=x,dc=y,dc=z
所以我不得不定制user.core插件。 而不是创建查询:

(&(objectClass=posixGroup)(memberUid=uid=alandaniel,ou=x,dc=y,dc=z))
它现在将使用

(&(objectClass=posixGroup)(memberUid=alandaniel))
因此,如果确实需要对其进行自定义,请扩展ReadOnlyDapUserStoreManager并自定义方法GetExternalRoleListFuser(..)


*使用的版本是WSO2 IS 4.1.0和WSO2 ESB 4.6.0。

更新:

我可以确认WSO2 IS 4.1.1解决了这个问题,并且按照预期工作。我得出结论,产品4.1.0完全不起作用

开发团队已经修复了这些特性中的问题,并在最新版本中发布


祝你好运。

我也有同样的问题。你运气好吗?这里也一样。要想让WSO2以AD作为后端,所有配置组合似乎都不能用于只读访问。如果您能够在这方面取得任何进展,请更新。看起来此设置是针对读/写用户存储的-Identity Server可以在其中添加/编辑用户和角色,对吗?我特别需要的是一个只读存储…感谢您的响应,但得到相同的结果。我也在使用最新版本的IS-4.1.0是的,我已经看完了那篇博文。不幸的是,我无法让它工作。感谢链接到该博客-我以前从未见过。不幸的是,我得到了同样的结果。WSO2 Is 5.0.0是否仍然存在问题?