[ 
https://issues.apache.org/jira/browse/HDDS-1768?focusedWorklogId=290946&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-290946
 ]

ASF GitHub Bot logged work on HDDS-1768:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Aug/19 02:22
            Start Date: 08/Aug/19 02:22
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1204: 
HDDS-1768. Audit xxxAcl methods in OzoneManager
URL: https://github.com/apache/hadoop/pull/1204#discussion_r311832848
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -3029,24 +3044,39 @@ public boolean addAcl(OzoneObj obj, OzoneAcl acl) 
throws IOException {
    */
   @Override
   public boolean removeAcl(OzoneObj obj, OzoneAcl acl) throws IOException {
-    if(isAclEnabled) {
-      checkAcls(obj.getResourceType(), obj.getStoreType(), ACLType.WRITE_ACL,
-          obj.getVolumeName(), obj.getBucketName(), obj.getKeyName());
-    }
-    // TODO: Audit ACL operation.
-    switch (obj.getResourceType()) {
-    case VOLUME:
-      return volumeManager.removeAcl(obj, acl);
-    case BUCKET:
-      return bucketManager.removeAcl(obj, acl);
-    case KEY:
-      return keyManager.removeAcl(obj, acl);
-    case PREFIX:
-      return prefixManager.removeAcl(obj, acl);
+    Map<String, String> auditMap = obj.toAuditMap();
+    auditMap.put(OzoneConsts.ACLS, acl.toString());
 
 Review comment:
   We can move this audit log to the common method.
   As this is common code for all ACL requests.
   
   `auditAcl(OzoneObj ozoneObj, OzoneAcl ozoneAcl, OMAction omAction, Exception 
exception)`
    
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 290946)
    Time Spent: 1h 10m  (was: 1h)

> Audit xxxAcl methods in OzoneManager
> ------------------------------------
>
>                 Key: HDDS-1768
>                 URL: https://issues.apache.org/jira/browse/HDDS-1768
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Ajay Kumar
>            Assignee: Dinesh Chitlangia
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Audit permission failures from authorizer



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to