1 Reply Latest reply on Nov 12, 2012 1:37 AM by handat

    OVD custom Bind plugin

      I have a db adapter with users in a table. Their passwords are md5 hashes in a mapped field to userPassword. Without any plugins just default behavior the only way I can login as a user in this space is to use the md5 hash as the entered password from my LDAP client. Can you modify a password (take entered password and md5 it) then allow it to attempt to login with the modified password? I have successfully created and ran a bind plugin that takes the password and does md5 it successful as evidenced by my logging (I have a known md5 hash for the password and verify that my code reproduces that md5). I have tried to convert the md5 into a BinarySyntax and simply call chain.nextBind() with the correct params

           byte[] bArray=String.valueOf(md5).getBytes();
           BinarySyntax bSyntax=new BinarySyntax(bArray);
           chain.nextBind(creds, dn, bSyntax, result);

      The issue is I don't have any more bind plugins other than my custom one and when the md5 (after putting into the BinarySyntax format) is used the chain.nextBind call it fails. Do I need to do a chain.getVSI and do something with it there or what am I missing?
        • 1. Re: OVD custom Bind plugin
          You don't need to chain it to next bind if it is successful, so if your md5 hash matches, you just set the result to true. If it doesn't match, you can either set it to false or chain it to the next bind and let another plugin have a go.