Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-41

Password Recognition and Parsing Framework

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major Major
    • 1.1.0.CR2
    • None
    • API / SPI
    • None

      I don't think having a single PasswordUtils that recognises and parses all password types is going to be a good idea long term - I think a lot of the responsibility for what is supported needs to come from the realm.

      A scenario I am thinking is an LDAP server is configured to support clear text passwords, that server verifies the strength of the password before letting a user set it - this could be circumvented by setting the password value to something we would parse as one of the other password types. The problem is the user could just hash 'password' - this would pass the LDAP servers dictionary attack check.

      The second issue is that different formats could be realm specific, e.g. LDAP supports trival digests in formats slightly different to those we already support.

      One idea I am starting to think about it a password parser that a realm can build up with a set of supported password types, working on LDAP it is apparent realms potentially need configuration for the credential types they will claim to support before the RealmIdentity is identified so not a major deviation from the work I am already finding necessary.

      Looking at the current PasswordUtils.java the following public utility methods are exposed: -

      org.wildfly.security.password.PasswordUtils
      org.wildfly.security.password.PasswordUtils.identifyAlgorithm(char[])
      org.wildfly.security.password.PasswordUtils.identifyAlgorithm(String)
      org.wildfly.security.password.PasswordUtils.getCryptStringChars(PasswordSpec)
      org.wildfly.security.password.PasswordUtils.getCryptString(PasswordSpec)
      org.wildfly.security.password.PasswordUtils.parseCryptString(String)
      org.wildfly.security.password.PasswordUtils.parseCryptString(char[])
      

      From the perspective of a realm the primary task I am trying to achieve is to take a password string and convert it to a PasswordSpec. Algorithm identification seems to be used primarily by tests, not convinced it is justified in an API.

            darran.lofthouse@redhat.com Darran Lofthouse
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: