Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3272

BUILTIN authentication: Passwords stored in a database are not hashed if also defined as system property

    XMLWordPrintableJSON

Details

    • Normal
    • Known fix, Newcomer, Workaround attached
    • Security

    Description

      Normally, passwords stored as database properties when using Derby's BUILTIN authentication provider are hashed using the well-known SHA-1 algorithm (although this is most likely not mentioned in the documentation). This makes it very hard for attackers to reconstruct the actual password even if they are able to obtain the hashed password value from the database.

      However, if credentials for the same user are also defined programmatically, for example on the command line, the password is not hashed before it is being stored in the database. This could lead to surprises if, for example, a user is using system properties during development, and decides to switch to database properties only before deployment, as recommended in the documentation [1].

      Workaround: Do not specify the same user credentials programmatically when setting credentials as database properties. For example, define a temporary user by using system properties when storing real user credentials in the database.

      [1]: http://db.apache.org/derby/docs/dev/devguide/tdevcsecure82556.html

      Attachments

        1. noPasswordHash.sql
          1 kB
          John Embretsen

        Issue Links

          Activity

            People

              Unassigned Unassigned
              johnemb John Embretsen
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: