Gargi-jais11 commented on code in PR #9859:
URL: https://github.com/apache/ozone/pull/9859#discussion_r2877377467


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java:
##########
@@ -1952,8 +1969,32 @@ private void checkAdminAccess(String op) throws 
IOException {
     checkAdminAccess(getRemoteUser(), false);
   }
 
+  /**
+   * Check if admin privilege authorization should be enforced.
+   * This controls system-level admin operations (upgrades, decommission, etc.)
+   *
+   * @return true if admin authorization checks should be performed
+   */
+  public boolean isAdminAuthorizationEnabled() {
+    // ONLY IN TESTS: Allow authorization testing without Kerberos
+    if (testSecureScmFlag) {
+      return isAuthorizationEnabled;
+    }
+    return OzoneSecurityUtil.isAuthorizationEnabled(configuration);
+  }
+
+  @VisibleForTesting
+  public static void setTestSecureScmFlag(boolean flag) {
+    testSecureScmFlag = flag;
+  }
+

Review Comment:
   Okay sure.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to