Jump to content
Changes to the Jaspersoft community edition download ×

Jasperserver Customizing external authentication password validation

Go to solution Solved by akshathajcta,

Recommended Posts


  M performing external login authentication for my requirement. It works fine with MD5/SHA encryption. My external database encrypts and stores password  as below,

   md5(password + key):key

     where key-> randomly generated during pwd encryption.

How i can validate encrypted password as above with jasperserver ? Please help.





Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

I found answer. Created my own password validation function,placed it inside WEB-INF/lib/customized.jar file, and called that function from applicationContext-externalAuth-db.xml as below.

    <bean id="passwordValidator" class="org.springframework.security.providers.encoding.CustomizedMd5PasswordEncoder">
        <property name="encodeHashAsBase64"><value>false</value></property>

Pasting my customized java function,

    package org.springframework.security.providers.encoding;

    import org.springframework.security.providers.encoding.Md5PasswordEncoder;

    public class CustomizedMd5PasswordEncoder extends Md5PasswordEncoder
     public boolean isPasswordValid(String encPass, String rawPass, Object salt)
         String[] pass1 = encPass.split(":");
         if(pass1.length != 2)
             return false;
         String encResult= encodePassword(pass1[1]+rawPass, salt);
             return true;
             return false;

          /* Above function is for my requirement, please make appropriate changes as you need*/

Refer below url for detail steps,



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...