1 Reply Latest reply on Mar 30, 2010 12:53 PM by jaikiran pai

    access information from a jaas application policy

    Jose Miguel Loor Apprentice

      Hi

       

      I have an application that uses jaas, via an application policy (org.jboss.security.auth.spi.DatabaseServerLoginModule) to secure the application web interface

       

      the login-config.xml has these lines:

       

      <application-policy name="myapp-application-policy">
              <authentication>
                  <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
                      <module-option name="dsJndiName">java:/dbDS</module-option>
                      <module-option name="principalsQuery">select us_password from user where us_login = ?</module-option>
                      <module-option name="rolesQuery">select 'User', 'Roles' from user where us_login = ?</module-option>
              <module-option name="hashAlgorithm">MD5</module-option>
              <module-option name="hashEncoding">hex</module-option>
                  </login-module>
              </authentication>
          </application-policy>

       

      the jboss-web.xml is like this:

       

      <jboss-web>
          <context-root>/myApplication</context-root>
          <security-domain>java:/jaas/myapp-application-policy</security-domain>
      </jboss-web>

       

      In some application process, i have to access the information of the users that are logged to the application at certain point. How can i access that information from the application policy ??

       

      thanks a lot    

        • 1. Re: access information from a jaas application policy
          jaikiran pai Master

          I don't know of any reliable way through which you can get hold of that application policy.

           

          Jose Miguel Loor wrote:

           


           

          In some application process, i have to access the information of the users that are logged to the application at certain point. How can i access that information from the application policy ??

           

          thanks a lot    

          I don't see how the application policy configuration will help you in knowing the logged in users. Do you have anything specific in mind about how you want to do it? I don't know the details about your application, so can't think of how this can be done.