0 Replies Latest reply on Dec 14, 2005 2:53 PM by fastboy911

    Encrypting Datasource Passwords exception: Invalid authentic

    fastboy911 Newbie

      I've been running default configuration on JBoss 3.2.7 and try to connect to MS SQL server 2000. I've followed the instructions in http://wiki.jboss.org/wiki/Wiki.jsp?page=EncryptingDataSourcePasswords to generate a password. The configuration is as shown:

      xxx-ds.xml

      <?xml version="1.0" encoding="UTF-8"?>


      <local-tx-datasource>
      <jndi-name>MyDSN</jndi-name>
      <connection-url>jdbc:jtds:sqlserver://99.99.99.99:1433/MyDB</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <security-domain>EncryptDBPassword</security-domain>

      </local-tx-datasource>


      /jboss3.2.7/server/default/conf/login-config.xml



      ...


      <application-policy name = "EncryptDBPassword">

      <login-module code = "org.jboss.resource.security.SecureIdentityLoginModule" flag = "required">
      <module-option name = "username">sa</module-option>
      <module-option name = "password">xxxxxx</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca.service=LocalTxCM,name=MyDSN</module-option>
      </login-module>

      </application-policy>
      ...



      Here is the exception I've got when above configuration is used.

      java.lang.SecurityException: Invalid authentication attempt, principal=null

      If I remove security domain and put username/password in xxx-ds.xml file, everything works perfect!! Is there anything that I need to config?