简体   繁体   English

如何在CQ 6中通过LDAP通过目录对用户进行身份验证

[英]How to authenticate user against directory via LDAP in CQ 6

The Problem: We have CQ integrated with the external portal, the portal sends user information ie username and authorization token (passsword) in the request headers, this request is for the CQ Publish instance AEM version 6.0. 问题:我们将CQ与外部门户集成在一起,该门户在请求标头中发送用户信息,即用户名和授权令牌(密码),此请求适用于CQ Publish实例AEM 6.0版。 We have to validate the user against client provided LDAP. 我们必须根据客户端提供的LDAP验证用户。 How we can achieve this ? 我们如何实现这一目标?

Things tried so far : Followed the AEM 6 Docs to configure and connect to LDAP. 到目前为止,已进行了许多尝试:按照AEM 6文档进行配置并连接到LDAP。 Next tried login with the directory provided user in CQ, CQ tries to connect and query the user via LDAP request (provided in the config) and fetches and creates the corresponding user in crx, so that the user details are cached and LDAP requests are not fired for the same user when he/she tries to login again. 下一步尝试使用CQ中提供的目录登录用户,CQ尝试通过LDAP请求(在配置中提供)连接并查询该用户,并以crx提取并创建相应的用户,以便缓存用户详细信息,而不存储LDAP请求当他/她再次尝试登录时为同一用户触发。 However this user created in CQ has no information for the password ie no password fetched in ldap request and updated in crx. 但是,在CQ中创建的该用户没有有关密码的信息,即,没有在ldap请求中获取并在crx中更新的密码。 So the authentication to CQ fails. 因此,对CQ的身份验证失败。 In short after adding configuration CQ connects directories via LDAP, fetches user details, but doesn't fetches password of that user and this causes authentication to be failed. 简而言之,添加配置后,CQ通过LDAP连接目录,获取用户详细信息,但不获取该用户的密码,这将导致身份验证失败。

Looking for best way to do this. 寻找做到这一点的最佳方法。 Any alternative approaches are welcome. 欢迎任何其他方法。 See below configurations added. 请参阅以下添加的配置。

LdapIdentityProvider searchTimeout="60s"
host.name="***"
group.makeDnPath=B"false"
user.baseDN="ou\=people,dc\=***,dc\=com"
group.objectclass=["groupOfUniqueNames"]
user.objectclass=["person","**","**"]
host.noCertCheck=B"false"
user.makeDnPath=B"false"
bind.dn="uid\=***,ou\=***,ou\=***,dc\=***,dc\=com"
group.baseDN="ou\=groups,o\=example,dc\=com"
group.extraFilter=""
user.extraFilter=""
host.port=I"389"
bind.password="***"
group.nameAttribute="cn"
host.ssl=B"false"
provider.name="***"
host.tls=B"false"
user.idAttribute="uid"
group.memberAttribute="uniquemember"

ExternalLoginModuleFactory 
jaas.controlFlag="SUFFICIENT"
jaas.ranking=I"50"
sync.handlerName="***"
jaas.realmName=""
idp.name="***"

DefaultSyncHandler
group.pathPrefix=""
group.expirationTime="1d"
user.membershipExpTime="1h"
user.pathPrefix=""
user.propertyMapping=["rep:email\=mail","rep:fullName\=cn","profile/email\=mail","profile/familyName\=sn","profile/givenName\=gn"]
handler.name="qaldapsync"
user.autoMembership=[""]
user.expirationTime="1h"
group.propertyMapping=["description\=description","rep:email\=mail","rep:fullname\=cn"]
user.membershipNestingDepth=I"0"
group.autoMembership=[""]

The authentication always goes against the LDAP system and not to the AEM. 身份验证始终针对LDAP系统,而不针对AEM。 So it is normal that the password is not synced. 因此,密码不同步是正常的。

If I get you right you did successfully connect the LDAP to AEM and did the synchronization but complain about not synchronizing the password? 如果您说对了,您就成功地将LDAP连接到AEM并进行了同步,但是抱怨不同步密码吗? As mentioned above this is not how you normally do it and I recommend to leave the password and so the authentication to the LDAP server. 如上所述,这不是通常的操作方式,建议您保留密码,以便对LDAP服务器进行身份验证。 But if you really need the password to be synced to you can try to add it to the user.propertyMapping: rep:password=userPassword. 但是,如果确实需要同步密码,则可以尝试将其添加到user.propertyMapping:rep:password = userPassword。

The downside would be that a user deleted in LDAP or changed the password in LDAP could still use his old account and password to login in AEM. 不利的一面是,在LDAP中删除的用户或在LDAP中更改密码的用户仍可以使用其旧帐户和密码登录AEM。 So this would be a big security issue. 因此,这将是一个很大的安全问题。

Additional Hint: The groups will only be synced if you configure user.membershipNestingDepth at least with "1". 其他提示:仅当您将user.membershipNestingDepth至少配置为“ 1”时,才会同步组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过 LDAP over TLS 对 Active Directory 进行身份验证? - How to authenticate against Active Directory via LDAP over TLS? 如何使用Spring Ldap在Active Directory中对用户进行身份验证和搜索 - How authenticate and search user in Active Directory using Spring Ldap 如何使用用户名和密码从LDAP目录中对用户进行身份验证? - How to Authenticate a user from a LDAP directory with his username and password? 如何通过Java从Active Directory验证用户身份? - How to authenticate user against Active Directory from java? LDAP:如何使用sAMAccountName对用户进行身份验证? - LDAP: How to authenticate user with sAMAccountName? LDAP如何在Java中搜索/验证此LDAP - How do a LDAP search/authenticate against this LDAP in Java 如何使用Spring Security针对db或ldap对用户进行动态身份验证? - How can I dynamically authenticate a user against the db or ldap with spring security? 使用LDAP,Java Play Framework通过Active Directory进行身份验证 - Authenticate via Active Directory using LDAP, Java Play Framework LDAP:如何使用连接详细信息验证用户身份 - LDAP: How to authenticate user with connection details 通过LdapExtLoginModule针对Active Directory林(LDAP_REFERRAL)进行身份验证 - Authenticating via LdapExtLoginModule against Active Directory Forest (LDAP_REFERRAL)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM