如何在WebSphereLiberty配置文件中将安全角色映射到ldap组

如何在WebSphereLiberty配置文件中将安全角色映射到ldap组,websphere,websphere-liberty,Websphere,Websphere Liberty,我使用MS Active directory进行liberty配置文件身份验证。但我无法设置到组的角色映射 我在我的web.xml中创建了一个安全角色: <security-role> <description>Users who are authorized to do update and insert operations</description> <role-name>AuthorizedUser</role-nam

我使用MS Active directory进行liberty配置文件身份验证。但我无法设置到组的角色映射

我在我的web.xml中创建了一个安全角色:

<security-role>
    <description>Users who are authorized to do update and insert operations</description>
    <role-name>AuthorizedUser</role-name>
</security-role>

有权执行更新和插入操作的用户
授权人
对于wmm的完整WAS,我已将角色映射到ibm-application-bnd.xml中的一个组,该组可以工作:

<security-role name="AuthorizedUser" >
    <group name="mygroup" access-id="group:defaultWIMFileBasedRealm/CN=mygroup,OU=myorg,DC=mydomain,DC=AD,DC=myco,DC=com"/>
</security-role>

但这不适用于liberty profile。

是否需要更改访问id?

配置MS Active directory时是否使用了相同的realmName(defaultWIMFileBasedRealm)?
您还可以尝试删除访问id(仅使用组名),并让liberty服务器使用为注册表定义的relamName生成它,以查看这是否有帮助。

访问id必须使用与您的用户注册表配置的域名完全相同的域名。例如,如果您的注册表配置为:

<ldapRegistry realm="myLDAPRealm"/>

那么您的accessId值必须采用相同的值

<security-role name="AuthorizedUser" >
    <group name="mygroup" access-id="group:myLDAPRealm/..."/>
</security-role>

LDAP注册表的默认领域名称为“LdapRegistry”,作为参考,基本注册表的默认领域名称为“BasicRegistry”


正如AJ_R所指出的,您可以完全删除访问id字段,并让访问id自动生成。通常情况下,不需要手动指定访问id值。

问题是b/c“o”!='在“memberOf”中,我认为这在TWAS中不区分大小写

自定义MS Active directory groupMemberIdMap修复了组搜索: