[jboss-user] [Security] - Re: MD5 Authentication Fails with JBoss 5.1

ssisDeveloper do-not-reply at jboss.com
Mon Nov 16 02:46:29 EST 2009


Guys, we were able to solve this problem.

If you have a look at the JBoss Manual (chapter 9), you will see that the hashes from jboss are Base64-Encoded. The hashes I used were Hex-Encoded, so as you can see, that doesn't fit together.

How can you now change them to Base64-Encoding?

Make a short database-script with the following code:

------
  | set sqlblanklines on;
  | set serveroutput on;
  | 
  | DECLARE
  | 
  | BEGIN
  |   -- read password field as hex-encoded raw data and convert data using base64 encoding
  |   update users set password=utl_raw.cast_to_varchar2(utl_encode.base64_encode(utl_raw.cast_to_raw(utl_raw.cast_to_varchar2(password))));
  | END;
  | ------
  | 

After this, you should be able to login.

Hope that helps. Maybe there is anyone out there how thinks this is useful.

Best regards!

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265785#4265785

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265785



More information about the jboss-user mailing list