Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2884

Passwords not matching after restart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M7
    • None
    • None

    Description

      When I restart the web app the old passwords don’t work.
       
      I think this might be the cause of that:
       
      @Service
      @Named("isis.ext.secman.PasswordEncryptionServiceUsingJBcrypt")
      @javax.annotation.Priority(PriorityPrecedence.MIDPOINT)
      @Qualifier("JBCrypt")
      public class PasswordEncryptionServiceUsingJBcrypt implements PasswordEncryptionService {

      private String salt;

      private String getSalt() {
      if (salt == null)

      { salt = BCrypt.gensalt(); }

      return salt;
      }

      @Override
      public String encrypt(String password)

      { return password == null ? null : BCrypt.hashpw(password, getSalt()); }

      That looks like the salt is set on the service and would be different after the service is used following an app restart.
       
      One solution might be a variant that picks up the salt from a property file.

      Attachments

        Activity

          People

            hobrom Andi Huber
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: