1 Reply Latest reply on Jan 15, 2013 3:48 AM by veenaonnet

    To encode bindCredential in JBoss7

    veenaonnet Newbie

      Hi,

       

      I am trying to port security code which was running on jboss4 to jboss7. As a part of it I need to encode the bindCredentials. Previously I defined a bean in jboss-service.xml as JaasSecurityDomain and used encode64 operation of it.

      How will I achieve the same in Jboss7?

       

      Currently I have defines security-domain with loginmodule LdapExtLoginModule in standalone-full.xml. However as bind credentials are not encoded it failes with Incorrect password error.

      Please let me know the equivalent operation or a way to do it in JBoss7.

       

      Regards,

      Veena

        • 1. Re: To encode bindCredential in JBoss7
          veenaonnet Newbie

          Any views on it? There is no way to encode bindCredentials in JBoss7? Shall we use plain bindCredential in the configurations?

           

          In JBoss4.2 below code was used -

          ObjectName jaasSecurityDomain = new ObjectName("jboss.security:domain=jmx-console,service=JaasSecurityDomain");

          Object[] params = {Base64.decode(accessControl.getBindCredential())};

          String[] signature = {byte[].class.getName()};

          accessControl.setBindCredential((String)server.invoke(jaasSecurityDomain, "encode64", params, signature));