(AD) ldap 领域中的组成员资格

发布于 2024-10-08 01:54:16 字数 1284 浏览 0 评论 0原文

我在 java ee 企业应用程序中使用 JAAS 框架进行身份验证和授权过程。我使用 GlassFish 作为应用程序服务器。我的领域配置如下所示:

<auth-realm name="ads-realm" classname="com.sun.enterprise.security.auth.realm.ldap.LDAPRealm">
  <property name="jaas-context" value="ldapRealm" />
  <property name="base-dn" value="CN=Users,DC=company,DC=intern" />
  <property name="directory" value="ldap://ad.company.intern:389" />
  <property name="search-filter" value="(&amp;(objectClass=user)(sAMAccountName=%s))" />
  <property name="search-bind-password" value="****" />
  <property name="search-bind-dn" value="[email protected]" />
</auth-realm>

此配置在我的环境中运行良好。请参阅以下日志条目:

FEIN: JAAS login complete. 
FEIN: JAAS authentication committed.
FEIN: Password login succeeded for xyz

但我没有从 Active Directory 接收 LDAP 组成员身份

FEIN: LDAP: Group memberships found: 
FEIN: LDAP: login succeeded for: xyz

我需要执行哪些配置/条目/映射才能从 AD 接收组成员身份?

当然,我可以将该属性添加

<property name="assign-groups" value="Users" />

到我的 GlassFish 配置中,但这并不是我想要的。

I use the JAAS Framework for the authentification and authorization process in a java ee enterprise application. I use GlassFish as the application server. My realm configuration looks like:

<auth-realm name="ads-realm" classname="com.sun.enterprise.security.auth.realm.ldap.LDAPRealm">
  <property name="jaas-context" value="ldapRealm" />
  <property name="base-dn" value="CN=Users,DC=company,DC=intern" />
  <property name="directory" value="ldap://ad.company.intern:389" />
  <property name="search-filter" value="(&(objectClass=user)(sAMAccountName=%s))" />
  <property name="search-bind-password" value="****" />
  <property name="search-bind-dn" value="[email protected]" />
</auth-realm>

This configuration works fine in my environment. See following log entries:

FEIN: JAAS login complete. 
FEIN: JAAS authentication committed.
FEIN: Password login succeeded for xyz

but i don't receive a LDAP Group membership(s) from my Active Directory

FEIN: LDAP: Group memberships found: 
FEIN: LDAP: login succeeded for: xyz

Which configuration/entry/mapping have I to do, to receive a group membership from AD?

Surely, I can add the property

<property name="assign-groups" value="Users" />

to my GlassFish configuration, but that is not exactly what i want.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没企图 2024-10-15 01:54:16

您需要添加此额外属性:

group-search-filter 搜索过滤器以查找用户的组成员身份。默认值为 uniquemember=%d(%d 扩展为用户元素 DN)。对于 Active Directory,这应该是 member=%d

You need to add this extra property:

group-search-filter Search filter to find group memberships for the user. The default value is uniquemember=%d (%d expands to the user element DN). In the case of Active Directory this should be member=%d

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文