Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-868

SimpleAuthenticator contains many potential pbs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1, 1.5.0
    • 1.5.0
    • None
    • None

    Description

      While analysing the Authenticator classes, I found that the SimpleAutheticator won't deal correctly with many potential cases :

      • The credentials stored in the java.naming.security.credentials may be a byte array, so transfming it to a String may simply fail
      • as we use a WeakHashMap to store some cached passwords, it would be good to check that the passward has correctly been got from the cache, not that the password exists in the cache then try to get it. We may have a null password in this case.
      • it may be possible that the user hasn't created a password. In this case, we will get an Authentication error because the password won't be found on the server, and the code is expecting to get something.
      • if the password is encrypted, it must be stored as a base 64 encoded String into the server, prefixed with the encryption mechanism. This is OK, but then we can compare passwords using a String comparizon, not a Arrays.equals() on byte arrays, as both elements are Strings.

      I might have missed some steps, or be wrong, so consider this JIRA as a reminder for the real issues.

      Attachments

        Activity

          People

            elecharny Emmanuel Lécharny
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: