Jboss AS7数据库连接密码加密

            <datasources>
                <datasource jndi-name="java:jboss/datasources/testDS" pool-name="oracle" enabled="true" use-java-context="true">
                    <connection-url>jdbc:oracle:thin:@192.168.0.110:1521:mydb</connection-url>
                    <driver>com.oracle</driver>
                    <pool>
                        <min-pool-size>1</min-pool-size>
                        <max-pool-size>5</max-pool-size>
                        <prefill>true</prefill>
                    </pool>
                    <security>
                        <security-domain>EncryptedPassword</security-domain>
                    </security>
                </datasource>
                <drivers>
                    <driver name="com.oracle" module="com.oracle">
                        <xa-datasource-class>oracle.jdbc.xa.OracleXADataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>

 

 

                <security-domain name="EncryptedPassword" cache-type="default">
                    <authentication>
                        <login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required">
                            <module-option name="username" value="cache"/>  <!--账号-->
                            <module-option name="password" value="5f8ee7d8e226d537"/>  <!--加密密码-->
                        </login-module>
                    </authentication>
                </security-domain>

 

java -cp %{JBOSS_HOME}/modules/org/picketbox/main/picketbox-4.0.7.Final.jar:%{JBOSS_HOME}/modules/org/jboss/logging/main/jboss-logging-3.1.0.GA.jar:$CLASSPATH org.picketbox.datasource.security.SecureIdentityLoginModule cache

 

你可能感兴趣的:(jboss)