1 Reply Latest reply on Sep 5, 2008 1:04 PM by James Plessinger

    JAAS Enabled Datasource

    James Plessinger Newbie

      Hi,

      I am using JAAS to pass the password and username of the user to the JDBC driver. The problem I get is I when the server starts it connects to the database but has no username or password and fails.

      Basically with this exception.

      10:55:57,197 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: No matching credentials in Subject!
      


      I need to provide a default username and password so startup can connect to the database server and have no idea how I can configure JAAS
      to do this.

      This is my datasource config


      <local-tx-datasource>
      <jndi-name>MYDS</jndi-name>

      <!-- domain should be the windows domain the sql server is on -->
      <connection-url>jdbc:jtds:sqlserver://myserver:143/Coors;domain=MY.DOMAN</connection-url>
      <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>

      <user-name>user</user-name>
      user

      <security-domain-and-application>PAE</security-domain-and-application>
      <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>

      <type-mapping>MS SQLSERVER2000</type-mapping>

      </local-tx-datasource>



        • 1. Re: JAAS Enabled Datasource
          James Plessinger Newbie

          OK, so firefox subits the page when you hit enter or something.

          The above is my data source, This is my jass confguration


          <application-policy name = "PAE">
           <authentication>
           <login-module code = "com.sun.security.auth.module.Krb5LoginModule" flag = "required" >
           <module-option name = "debug">true</module-option>
           <module-option name="useTicketCache">true</module-option>
          
           </login-module>
          
          
          
           <login-module code = "org.jboss.security.ClientLoginModule" flag = "required">
           <module-option name="restore-login-identity">true</module-option>
           <module-option name="password-stacking">useFirstPass</module-option>
           </login-module>
          
           </authentication>
           </application-policy>


          I tried the ConfiguredIdentityLoginModule but does not allow the loged in user to pass there username/password