Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-4421

jmx-invoker-service.xml server for DatabaseModuleLogin credentials not "accepted"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • LATER
    • 3.0.0.GA
    • server
    • None
    • Documentation (Ref Guide, User Guide, etc.)
    • Workaround Exists
    • Hide

      For DB Credentials Enter the wrong credentials in the Server "Overview" before starting up then when the pop-up appears enter the correct credentials. Note, these are the credentials to the policy configured in deploy/jmx-invoker-service.xml NOT the policy for the JMX-CONSOLE web-app

      For Credentials from the jmx-console-users.properties you may enter them before startup or even when the pop-up appears, they both work

      Show
      For DB Credentials Enter the wrong credentials in the Server "Overview" before starting up then when the pop-up appears enter the correct credentials. Note, these are the credentials to the policy configured in deploy/jmx-invoker-service.xml NOT the policy for the JMX-CONSOLE web-app For Credentials from the jmx-console-users.properties you may enter them before startup or even when the pop-up appears, they both work

      Setup the following authentication policy
      <application-policy name="CLSIS-Security">
      <authentication>
      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required">
      <module-option name="unauthenticatedIdentity">guest</module-option>
      <module-option name="dsJndiName">java:/DefaultDS</module-option>
      <!--module-option name="hashAlgorithm">MD5</module-option>
      <module-option name="hashEncoding">base64</module-option>
      <module-option name="principalsQuery">SELECT USER_PWD FROM WEB_USERS WHERE USER_ID=?</module-option>
      <module-option name="rolesQuery">SELECT ROLE_ID, 'Roles' FROM WEB_ROLES WHERE USER_ID=?</module-option-->
      <module-option name = "principalsQuery">SELECT PASSWD FROM JBM_USER WHERE USER_ID=?</module-option>
      <module-option name = "rolesQuery">SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?</module-option>
      </login-module>
      </authentication>
      </application-policy>

      and for jmx-console.war set the jaas policy in jboss-web.xml
      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web>

      <resource-ref>

      <res-ref-name>jdbc/DefaultDS</res-ref-name>

      <res-type>javax.sql.DataSource</res-type>

      <jndi-name>java:/DefaultDS</jndi-name>

      </resource-ref>

      <security-domain>java:/jaas/CLSIS-Security</security-domain>

      </jboss-web>

      finally setting the web-app with role "john" and user/pass guest/guest

      OPTION A: left deploy/jmx-invoker-service.xml unchanged with default policy "jmx-console"

      Back in JBDS,
      Open Server View
      Right click on server --> Open
      In Overview set the Server Credentials to admin/admin
      Start the server and all is well

      OPTION B: left deploy/jmx-invoker-service.xml change the policy to "CLSIS-Security"

      Back in JBDS,
      Open Server View
      Right click on server --> Open
      In Overview set the Server Credentials to admin/admin
      Start the server pop-up comes up asking for the correct credentials enter guest/guest and all is well

      OPTION B1: all as in OPTION B but
      In Overview set the Server Credentials to guest/guest
      Start the server and expect that since the correct credentials for the DB policy held in deploy/jmx-invoker-service.xml are given no pop-up will appear BUT
      pop-up appears pre-populated with guest/guest I enter guest/guest and it keeps popping up (why?) if I choose "ignore" it does so server starts and JMX-CONSOLE is available via http://localhost:8080/jmx-console but JBDS is showing in Server View next to the server "Starting .... Synchnonized"

      then after 450 secs the JBDS throws an error popup and the server stops (why?)

            skoussou Stelios Koussouris (Inactive)
            skoussou Stelios Koussouris (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: