无法让 Apache Archiva 与 LDAP 一起使用
我已取消注释 application.xml 中的 LDAP 和 UserMapper 连接器,
我知道我的 LDAP 凭据(binddn、主机名等)都正常工作,因为我对服务器上的其他应用程序使用 LDAP 身份验证和授权。
我所做的就是对 application.xml 和 security.properties 进行更改。还有什么我应该做的吗?
当我尝试使用 LDAP 中的用户登录时,未成功。是否有一个日志文件可供我检查以了解出了什么问题?我发现档案文档稀疏而简洁。
这是我的 security.properties 文件 - 一些值已被更改,也许有人可以验证结构是否完整:
# LDAP
user.manager.impl=ldap
ldap.bind.authenticator.enabled=true
redback.default.admin=admin
security.policy.password.expiration.enabled=false
ldap.config.hostname=localhost
ldap.config.port=389
ldap.config.base.dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com
ldap.config.context.factory=com.sun.jndi.ldap.LdapCtxFactory
ldap.config.bind.dn=cn=Manager,dc=mydomain,dc=com
ldap.config.password=mypass
ldap.config.mapper.attribute.email=mail
ldap.config.mapper.attribute.fullname=displayName
ldap.config.mapper.attribute.password=userPassword
ldap.config.mapper.attribute.user.id=mail
ldap.config.mapper.attribute.user.base.dn=ou=Users
ldap.config.mapper.attribute.user.object.class=inetOrgPerson
ldap.config.mapper.attribute.user.filter=(objectclass=inetOrgPerson)
此外,config.mapper.attribute.user.base.dn 让我感到困惑。我的用户的基础在这里: ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com
那么这对于我输入的基本 DN 是否意味着:domainName=scoresecret.com,o=domains,dc=scoresecret,dc=com
和 for config.mapper.attribute.user.base.dn: ou=Users
如果我做错了什么,如果我忘记做一些“打开 LDAP”的事情,如果我可以找到一些日志来为我指明正确的方向。非常感谢
I have uncommented the LDAP and UserMapper connectors in application.xml
I know my LDAP credentials (binddn, hostname, etc) are all working, because I use LDAP authentication and authorization for other apps on my server.
All I've done, is make the changes to application.xml and security.properties. Is there something else I'm supposed to do?
When I try to login with a user from LDAP, it is unsuccessful. Is there a log file I can check to see what's going wrong? I find the archiva documentation to be sparse and laconic.
Here is my security.properties file - some values have been altered, maybe someone can verify the structure is in-tact:
# LDAP
user.manager.impl=ldap
ldap.bind.authenticator.enabled=true
redback.default.admin=admin
security.policy.password.expiration.enabled=false
ldap.config.hostname=localhost
ldap.config.port=389
ldap.config.base.dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com
ldap.config.context.factory=com.sun.jndi.ldap.LdapCtxFactory
ldap.config.bind.dn=cn=Manager,dc=mydomain,dc=com
ldap.config.password=mypass
ldap.config.mapper.attribute.email=mail
ldap.config.mapper.attribute.fullname=displayName
ldap.config.mapper.attribute.password=userPassword
ldap.config.mapper.attribute.user.id=mail
ldap.config.mapper.attribute.user.base.dn=ou=Users
ldap.config.mapper.attribute.user.object.class=inetOrgPerson
ldap.config.mapper.attribute.user.filter=(objectclass=inetOrgPerson)
Also, the config.mapper.attribute.user.base.dn confuses me. The basedn of my users is here:
ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com
So does that mean for base DN I put: domainName=scoresecret.com,o=domains,dc=scoresecret,dc=com
and for config.mapper.attribute.user.base.dn: ou=Users
Let me know if I'm doing something wrong, if I'm forgetting to do something to "switch LDAP on", and if I can find some logs to point me in the right direction. Thanks a ton
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您已配置 LDAP 中存在的管理员用户 - 目前无法为此使用内部用户。
将
admin
替换为 LDAP 服务器中可用于此目的的角色帐户。这是我使用的配置模板,它应该显示您需要填充的值:
https://github.com/maestrodev/puppet-archiva /blob/master/templates/security.properties.erb
看来主要区别可能是用户过滤器为空?
(另请参阅 [电子邮件受保护] 上的帖子:http://s.apache.org/KDj)
Make sure you have configured an admin user that exists in LDAP - at the moment there's no way to use an internal user for that.
Replace
admin
with a role account in your LDAP server that can be used for this.Here is a configuration template I use which should show the values you'd need to populate:
https://github.com/maestrodev/puppet-archiva/blob/master/templates/security.properties.erb
It seems the main difference could be the user filter being empty?
(See also thread on [email protected]: http://s.apache.org/KDj)