From 494fc2e44dc0395b7801697b11bde57e9c39f556 Mon Sep 17 00:00:00 2001 From: Christos Bisias Date: Mon, 16 Oct 2023 20:42:30 +0300 Subject: [PATCH] RANGER-4477: RangerOzoneAuthorizer doesn't set the resource owner Signed-off-by: Madhan Neethiraj --- .../authorization/ozone/authorizer/RangerOzoneAuthorizer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java b/plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java index 12e647ca3c..53cc0201ec 100644 --- a/plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java +++ b/plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java @@ -125,6 +125,8 @@ public boolean checkAccess(IOzoneObj ozoneObject, RequestContext context) { rangerRequest.setAccessTime(eventTime); RangerAccessResourceImpl rangerResource = new RangerAccessResourceImpl(); + rangerResource.setOwnerUser(context.getOwnerName()); + rangerRequest.setResource(rangerResource); rangerRequest.setAccessType(accessType); rangerRequest.setAction(action);