如何在 jboss 中的 server.password 中创建 KeyStorePass

如何在 jboss 中的 server.password 中创建 KeyStorePass

我正在使用 Jboss4.2.2 配置基于密码加密 (PBE) 的配置身份,有人能​​告诉我 server.password 的用途是什么,以及如何创建它吗?

项目-产品-ds.xml

 <local-tx-datasource>
    <jndi-name>mobeeadminDatasource</jndi-name>
            <use-java-context>false</use-java-context>
            <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
            <driver-class>oracle.jdbc.OracleDriver</driver-class>

             <security-domain>EncryptedOracleDbRealm</security-domain>
            </local-tx-datasource>
         <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
                     name="jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword">
          <constructor>
             <arg type="java.lang.String" value="ServerMasterPassword"></arg>
          </constructor>
          <!-- The opaque master password file used to decrypt the encrypted
          database password key -->
          <attribute name="KeyStorePass">{CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/conf/server.password</attribute>
          <attribute name="Salt">mobeeadm</attribute>
          <attribute name="IterationCount">13</attribute>
        </mbean>
        <mbean code="org.jboss.jdbc.HypersonicDatabase"
          name="jboss:service=Hypersonic,database=mobeeadminDatasource">
          <attribute name="Database">mobeeadminDatasource</attribute>
          <attribute name="InProcessMode">true</attribute>
       </mbean>

登录配置.xml

<application-policy name="EncryptedOracleDbRealm">
   <authentication>
      <login-module code= "org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule"
         flag = "required">
         <module-option name="username">kcbuser</module-option>
         <module-option name="password">29gsr5RGZ9cUs5/sDXk81r</module-option>
         <module-option name="managedConnectionFactoryName">
            jboss.jca:service=LocalTxCM,name=mobeeadminDatasource
         </module-option>
         <module-option name="jaasSecurityDomain">
            jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword
         </module-option>
      </login-module>
   </authentication>
</application-policy>

相关内容