Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-505 OzoneManager HA
  3. HDDS-2966

ACL checks should be done after acquiring lock

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: OM HA, Ozone Manager
    • Labels:
      None
    • Target Version/s:

      Description

      Currently in OMClientRequests#validateAndUpdateCache, we perform ACL checks before acquiring the required object lock. This could lead to race condition. The ACL check should be done after acquiring the lock.
      For example, in OMKeyCreateRequest:

            // check Acl
            checkKeyAcls(ozoneManager, volumeName, bucketName, keyName,
                IAccessAuthorizer.ACLType.CREATE, OzoneObj.ResourceType.KEY);
      
            acquireLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,
                volumeName, bucketName);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hanishakoneru Hanisha Koneru
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: