You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "prashantpogde (via GitHub)" <gi...@apache.org> on 2023/02/23 18:52:43 UTC

[GitHub] [ranger] prashantpogde commented on a diff in pull request #218: Hdds 6986

prashantpogde commented on code in PR #218:
URL: https://github.com/apache/ranger/pull/218#discussion_r1116118344


##########
plugin-ozone/src/main/java/org/apache/ranger/authorization/ozone/authorizer/RangerOzoneAuthorizer.java:
##########
@@ -151,6 +160,18 @@ public boolean checkAccess(IOzoneObj ozoneObject, RequestContext context) {
 		}
 
 		try {
+			if (snapShotName != null) {
+				rangerResource.setValue(KEY_RESOURCE_KEY,".snapshot/" + snapShotName + "/" + ozoneObj.getKeyName());
+				RangerAccessResult result = rangerPlugin
+						.isAccessAllowed(rangerRequest);
+				if (result == null) {
+					LOG.error("Ranger Plugin returned null. Returning false");
+					return false;

Review Comment:
   If we return false from here for snapshotted path, we will miss out on emitting logs. Check the corresponding code path for non-snapshotted path below.



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@ranger.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org