2 Replies Latest reply on Jan 26, 2004 6:02 PM by jmartin_hc

    jmartin_hc@hotmail.com

    jmartin_hc Newbie

       

      "jmartin_hc" wrote:
      Hi:

      I am writing an application using jboss and ejb. This application have defined 3 roles an all operation in ejb use some of this roles.

      In the jboss.xml file I have the security-domain, and in the loggin-config.xml I have a application policy with Its principalsQuery and rolesQuery.

      I have a problem when I am using Oracle data base. The problem happens when the container try to find the rol using the sql rolesQuery, always It say me 'the interfaz Home need role=[XXXXX, YYYY], role=null'. Nevertheless the authentication (validate user/password) run ok.

      It is happening to me with Oracle, because I tried another example with MySql and It run ok.

      Please, if somebody know something write me, Thank


        • 1. Re: Password Encryption with DatabaseLoginModule
          jmartin_hc Newbie

          Mr. Starks,

          Thank you for the reply, but I think I may have been unclear on my question. For this inquery, I am not concerned about the Datasource password, but rather a User's password. I want to have all Users' passwords stored in the database encrypted.

          The problem will be when the user logs in, I need to decrypt the database password to match the unencrypted password the user would enter on a login form.

          This is why I inquired about the convertRawPassword method in the DatabaseServerLogin file. I suppose there are two ways to do it; 1) Somehow intercept the j_password submitted by the login page and encrypt it befor it reaches j_security_check, or 2) Decrypt the database passsword in the login module to compare with the unencypted password the user would enter.

          Am I getting close or trying to make this to hard?

          Thank you for your support,
          SJ

          • 2. Re: jmartin_hc@hotmail.com
            Juha Lindfors Master

             

            "juha@jboss.org" wrote:
            Make sure the query you run against Oracle correctly returns string "Roles" as the role group (or make sure the oracle table contains this value in the RoleGroup column)