如何解决如何在Spring Security LDAP Authenitcation配置文件中禁用/隐藏/哈希管理器密码?
如何通过易于阅读的方式禁用或隐藏或哈希管理器密码值。在这种情况下,manager-password是预定义和强制性的。 LDAP认证文件如下所示。
<beans:beans
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.0.xsd">
<security:ldap-server
id="ldapServer"
url="ldap://abc.localhost.com"
manager-dn="someproject"
manager-password="abcdefghijklmnop"/>
<security:authentication-manager alias="authenticationManager">
<security:ldap-authentication-provider
server-ref="ldapServer"
role-prefix="ROLE_"
user-search-base="DC=abc,DC=localhost,DC=com"
user-search-filter="(&(objectclass=user)(sAMAccountName={0}))"
user-context-mapper-ref="ldapUserContextMapper">
</security:ldap-authentication-provider>
</security:authentication-manager>
<beans:bean id="ldapUserContextMapper" class="com.esri.geoportal.base.security.LdapUserContextMapper">
<beans:property name="defaultRole" value="ADMIN"/>
<beans:property name="roleMap">
<beans:map key-type="java.lang.String" value-type="java.lang.String">
<beans:entry key="ROLE_GPT_ADMINISTRATORS" value="ADMIN,PUBLISHER" />
<beans:entry key="ROLE_GPT_PUBLISHERS" value="PUBLISHER" />
</beans:map>
</beans:property>
</beans:bean>
</beans:beans>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。