此内容没有您所选择的语言版本。

Chapter 19. Using LdapExtLoginModule with JaasSecurityDomain


This chapter provides guidance on how the LdapExtLoginModule can be used with an encrypted password to be decrypted by a JaasSecurityDomain. This chapter assumes that the LdapExtLoginModule is already running correctly with a non-encrypted password.

Procedure 19.1. 

  1. Define JaasSecurityDomain MBean

    Define the JaasSecurityDomain MBean used to decrypt the encrypted version of the password. You can add the MBean to $JBOSS_HOME/server/$PROFILE/conf/jboss-service.xml, or to a *-service.xml deployment descriptor in the $JBOSS_HOME/server/$PROFILE/deploy folder.
             
      <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
          name="jboss.security:service=JaasSecurityDomain,domain=jmx-console">
          <constructor>
             <arg type="java.lang.String" value="jmx-console"></arg>
          </constructor>
          <attribute name="KeyStorePass">some_password</attribute>
          <attribute name="Salt">abcdefgh</attribute>
          <attribute name="IterationCount">66</attribute>
       </mbean>
    
    Copy to Clipboard Toggle word wrap

    Note

    The default cipher algorithm used by the JaasSecurityDomain implementation is PBEwithMD5andDES. Other cipher algorithms include DES, TripleDES, Blowfish, and PBEWithMD5AndTripleDES. All algorithms are symmetric algorithms. You specify a cipher algorithm by appending an <attribute> element with the CypherElement attribute set to one of these values.
  2. Adjust password, salt, and iteration count

    Step One contains a simple configuration where the required password, Salt, and Iteration Count used for the encryption or decryption are contained within the MBean definition.
    Ensure you change the KeyStorePass, Salt, and IterationCount values suitable for your own deployment.
After this MBean has been defined, start the JBoss Enterprise Application Platform. Navigate to the JMX Console (http://localhost:8080/jmx-console/ by default) and select the org.jboss.security.plugins.JaasSecurityDomain MBean.
On the org.jboss.security.plugins.JaasSecurityDomain page, look for the encode64(String password) method. Pass the plain text version of the password being used by the LdapExtLoginModule to this method, and invoke it. The return value should be the encrypted version of the password encoded as Base64.
Within the login module configuration, the following module-options should be set:
 <module-option name="jaasSecurityDomain">jboss.security:service=JaasSecurityDomain,domain=jmx-console</module-option>
  <module-option name="bindCredential">2gx7gcAxcDuaHaJMgO5AVo</module-option>
Copy to Clipboard Toggle word wrap
The first option is a new option to specify that the JaasSecurityDomain used previously should be used to decrypt the password.
The bindCredential is then replaced with the encrypted form as Base64.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat