Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1881

DefaultKeystoreService should use Java NIO API locking as well

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.3.0
    • KnoxCLI, Server
    • None

    Description

      The file locking mechanism in org.apache.knox.gateway.services.security.impl.DefaultKeystoreService today relies on read/write locks to prevent multiple threads from editing a single keystore. Java NIO API file locking adds the protection for reading/writing from multiple JVMs. Since DefaultKeystoreService is used in both gateway and knoxcli, we need to protect against this type of access happening at once.

      https://docs.oracle.com/javase/8/docs/api/java/nio/channels/FileLock.html

      Attachments

        Issue Links

          Activity

            People

              krisden Kevin Risden
              rlevas Robert Levas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m