You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/08/18 20:10:47 UTC

[GitHub] [ozone] Cyrill opened a new pull request, #3693: HDDS-2954 Support admin groups

Cyrill opened a new pull request, #3693:
URL: https://github.com/apache/ozone/pull/3693

   ## What changes were proposed in this pull request?
   
   Two new properties have been added to support admin groups:
   - "ozone.administrators.groups" 
   - "ozone.recon.administrators.groups"
   
   These properties are somewhat similar to existing "ozone.administrators" and  "ozone.recon.administrators" (hence the naming) but specify groups the user is directly or indirectly a part of.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-2954
   
   
   ## How was this patch tested?
   
   unit tests and manual testing
   


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1226977481

   @adoroszlai Now that the verification tests results are green, can we proceed with reviewing and merging this PR?


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1225775271

   @Cyrill _acceptance (HA)_ failed due to HDDS-7172.  I'm working on the fix.


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on a diff in pull request #3693: HDDS-2954 Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r950900009


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -92,7 +97,8 @@ private boolean hasPermission(UserGroupInformation user) {
     if (aclEnabled && isSpnegoEnabled) {
       return allowedUsers.contains(OZONE_ADMINISTRATORS_WILDCARD)
           || allowedUsers.contains(user.getShortUserName())
-          || allowedUsers.contains(user.getUserName());
+          || allowedUsers.contains(user.getUserName())
+          || !Sets.intersection(new HashSet<>(allowedGroups), new HashSet<>(user.getGroups())).isEmpty();

Review Comment:
   Thank you, 
   I decided to make one step further and extracted the duplicated code that checks admin users to a separate class



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951494869


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   @adoroszlai Reverted. 
   But I'm still puzzled with the following error. What is the best way to resolve it?
   <img width="1377" alt="image" src="https://user-images.githubusercontent.com/56274/185942786-3dc93f12-bc1a-45cf-8749-5307de12b905.png">
   



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951461982


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   The verification fails with the following error without it:
   ```
   [build-info](https://github.com/Cyrill/ozone/runs/7952516390?check_suite_focus=true)
   This is a scheduled Ubuntu-18.04 brownout. The Ubuntu-18.04 environment is deprecated and will be removed on December 1st, 2022. For more details, see https://github.com/actions/runner-images/issues/6002
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] myskov commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
myskov commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951434134


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   I don't think these are required changes for the issue.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951480872


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   Thanks @Cyrill for the info on the failure.  It seems this failure is only temporary, it will happen periodically until final removal of the 18.04 image, but in other periods builds will be successful.
   
   This should be fixed as part of a separate Jira issue.  Would you like to file that and submit your fix?



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951483682


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   > @adoroszlai could you please approve build workflows?
   
   @myskov Sorry, but it's [failing](https://github.com/Cyrill/ozone/runs/7952291029?check_suite_focus=true#step:6:8) in @Cyrill's fork (at findbugs), so this will need to wait.  I don't think it makes sense to start PR workflow until we get a clean run in fork.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] myskov commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
myskov commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1222347266

   @smengcl @Galsza, can anybody approve workflows for the latest changes, please?


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai merged pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #3693:
URL: https://github.com/apache/ozone/pull/3693


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1227701332

   Thanks @Cyrill for the patch, @Galsza, @myskov, @smengcl for reviews.


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r954724468


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -194,9 +195,18 @@ public static HttpServer2.Builder newHttpServer2BuilderForOzone(
       final InetSocketAddress httpsAddr, String name) throws IOException {
     HttpConfig.Policy policy = getHttpPolicy(conf);
 
+    String userString = conf.get(OZONE_ADMINISTRATORS, " ");
+    String groupString = conf.get(OZONE_ADMINISTRATORS_GROUPS, "");
+    String userGroupString;
+    if (!groupString.trim().isEmpty()) {
+      userGroupString = userString.trim() + " " + groupString.trim();
+    } else {
+      userGroupString = userString;
+    }
+
     HttpServer2.Builder builder = new HttpServer2.Builder().setName(name)
-        .setConf(conf).setACL(new AccessControlList(conf.get(
-            OZONE_ADMINISTRATORS, " ")));
+        .setConf(conf)
+        .setACL(new AccessControlList(userGroupString));

Review Comment:
   Can we skip this string magic by using the `AccessControlList(String user, String groups)` constructor?



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/OzoneAdmins.java:
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hdds.server;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
+
+import org.apache.hadoop.security.UserGroupInformation;
+
+import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD;
+
+/**
+ * This class contains ozone admin user information, username and group,
+ * and is able to check whether the provided {@link UserGroupInformation}
+ * has admin permissions.
+ */
+public class OzoneAdmins {
+
+  /**
+   * Ozone super user / admin username list.
+   */
+  private final Set<String> adminUsernames;
+  /**
+   * Ozone super user / admin group list.
+   */
+  private final Set<String> adminGroups;
+
+  public OzoneAdmins(Collection<String> adminUsernames) {
+    this(adminUsernames, null);
+  }
+
+  public OzoneAdmins(Collection<String> adminUsernames,
+      Collection<String> adminGroups) {
+    this.adminUsernames = adminUsernames != null ?
+            new LinkedHashSet<>(adminUsernames) : Collections.emptySet();
+    this.adminGroups = adminGroups != null ?
+            new LinkedHashSet<>(adminGroups) : Collections.emptySet();
+  }
+
+  private boolean hasAdminGroup(Collection<String> userGroups) {
+    return !Sets.intersection(adminGroups,
+            new LinkedHashSet<>(userGroups)).isEmpty();
+  }
+
+  /**
+   * Check whether the provided {@link UserGroupInformation user}
+   * has admin permissions.
+   *
+   * @param user
+   *
+   * @return
+   */
+  public boolean isAdmin(UserGroupInformation user) {
+    return adminUsernames.contains(OZONE_ADMINISTRATORS_WILDCARD)
+        || adminUsernames.contains(user.getShortUserName())
+        || adminUsernames.contains(user.getUserName())
+        || hasAdminGroup(user.getGroups());
+  }
+
+  public Collection<String> getAdminGroups() {
+    return Collections.unmodifiableSet(adminGroups);

Review Comment:
   Nit: could wrap the underlying sets in unmodifiable once, in the constructor.



##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/filters/TestAdminFilter.java:
##########
@@ -102,6 +103,17 @@ public void testAdminFilterOzoneAdminsOnly() throws Exception {
     conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS,
         OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD);
     testAdminFilterWithPrincipal(conf, "other", true);
+
+    UserGroupInformation.createUserForTesting("user1",
+        new String[]{"admingroup"});
+    try {
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS, "ozone");
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS_GROUPS,
+          "admingroup");
+      testAdminFilterWithPrincipal(conf, "user1", true);
+    } finally {
+      UserGroupInformation.reset();
+    }

Review Comment:
   This should be tested before setting admin users to wildcard (in lines 103-104), which allows any user regardless of the group.



##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/filters/TestAdminFilter.java:
##########
@@ -114,6 +126,17 @@ public void testAdminFilterReconAdminsOnly() throws Exception {
     conf.setStrings(ReconConfigKeys.OZONE_RECON_ADMINISTRATORS,
         OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD);
     testAdminFilterWithPrincipal(conf, "other", true);
+
+    UserGroupInformation.createUserForTesting("user1",
+        new String[]{"reconadmingroup"});
+    try {
+      conf.setStrings(ReconConfigKeys.OZONE_RECON_ADMINISTRATORS, "recon");
+      conf.setStrings(ReconConfigKeys.OZONE_RECON_ADMINISTRATORS_GROUPS,
+          "reconadmingroup");
+      testAdminFilterWithPrincipal(conf, "user1", true);
+    } finally {
+      UserGroupInformation.reset();
+    }

Review Comment:
   Same here: please move this test before the wildcard case.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Galsza commented on a diff in pull request #3693: HDDS-2954 Support admin groups

Posted by GitBox <gi...@apache.org>.
Galsza commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r949997558


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -92,7 +97,8 @@ private boolean hasPermission(UserGroupInformation user) {
     if (aclEnabled && isSpnegoEnabled) {
       return allowedUsers.contains(OZONE_ADMINISTRATORS_WILDCARD)
           || allowedUsers.contains(user.getShortUserName())
-          || allowedUsers.contains(user.getUserName());
+          || allowedUsers.contains(user.getUserName())
+          || !Sets.intersection(new HashSet<>(allowedGroups), new HashSet<>(user.getGroups())).isEmpty();

Review Comment:
   Nit: I kinda wish the `Sets.intersection(new HashSet<>(allowedGroups), new HashSet<>(user.getGroups())).isEmpty()` could be extracted to a small helper method like `isUserInAdminGroup` to decrease cognitive load when looking at the whole boolean expression. It's up to your preference.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951461881


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   Not only is it not related to this change, it causes Findbugs errors.
   
   https://github.com/Cyrill/ozone/runs/7952291029?check_suite_focus=true#step:6:8
   
   @Cyrill can you please revert this part of the change?



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1223644098

   @Cyrill this integration test failure looks related:
   
   ```
   Error:  Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 49.054 s <<< FAILURE! - in org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet
   Error:  org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet.testSpnegoEnabled  Time elapsed: 22.015 s  <<< FAILURE!
   Argument(s) are different! Wanted:
   httpServletResponse.setStatus(403);
   -> at org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet.testSpnegoEnabled(TestOMDbCheckpointServlet.java:234)
   Actual invocations have different arguments:
   httpServletResponse.setStatus(500);
   -> at org.apache.hadoop.hdds.utils.DBCheckpointServlet.doGet(DBCheckpointServlet.java:113)
   
   	at org.apache.hadoop.ozone.om.TestOMDbCheckpointServlet.testSpnegoEnabled(TestOMDbCheckpointServlet.java:234)
   ```
   
   https://github.com/apache/ozone/runs/7956795029?check_suite_focus=true#step:4:3098
   
   Can you please check?
   
   `TestSecureOzoneCluster` can be fixed by merging from `master`.  Please do that before/after your fix for `TestOMDbCheckpointServlet`, then push the two changes in a batch.


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on pull request #3693: HDDS-2954 Support admin groups

Posted by GitBox <gi...@apache.org>.
smengcl commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1221030071

   Thanks for the patch @Cyrill . Would you fix the [PR title](https://github.com/apache/ozone/runs/7923662726?check_suite_focus=true) and [checkstyle](https://github.com/apache/ozone/runs/7923668456?check_suite_focus=true)?


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] myskov commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
myskov commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951477367


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   @adoroszlai could you please approve build workflows?



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r951567612


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   > What is the best way to resolve it?
   
   Fix is in progress: https://github.com/adoroszlai/hadoop-ozone/actions/runs/2904661184
   
   I'll submit a PR once my workflow completes successfully.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on PR #3693:
URL: https://github.com/apache/ozone/pull/3693#issuecomment-1225757011

   @adoroszlai with the latest updates from master different tests are now failing. I tried to investigate the reason of the failures but it looks like the pipeline does not collect any logs but SCM. I would be interested in OM and perhaps s3 gateway. Is there any chance to add them?


-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
smengcl commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r954450631


##########
.github/workflows/post-commit.yml:
##########
@@ -27,7 +27,7 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 jobs:
   build-info:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04

Review Comment:
   #3707 and #3708 (for HDDS-7159) are merged now.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] Cyrill commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
Cyrill commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r954842291


##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/filters/TestAdminFilter.java:
##########
@@ -102,6 +103,17 @@ public void testAdminFilterOzoneAdminsOnly() throws Exception {
     conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS,
         OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD);
     testAdminFilterWithPrincipal(conf, "other", true);
+
+    UserGroupInformation.createUserForTesting("user1",
+        new String[]{"admingroup"});
+    try {
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS, "ozone");
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS_GROUPS,
+          "admingroup");
+      testAdminFilterWithPrincipal(conf, "user1", true);
+    } finally {
+      UserGroupInformation.reset();
+    }

Review Comment:
   But would it change anything? the line 110 resets `OzoneConfigKeys.OZONE_ADMINISTRATORS` back to `ozone`



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a diff in pull request #3693: HDDS-2954. Support admin groups

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #3693:
URL: https://github.com/apache/ozone/pull/3693#discussion_r954844576


##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/filters/TestAdminFilter.java:
##########
@@ -102,6 +103,17 @@ public void testAdminFilterOzoneAdminsOnly() throws Exception {
     conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS,
         OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD);
     testAdminFilterWithPrincipal(conf, "other", true);
+
+    UserGroupInformation.createUserForTesting("user1",
+        new String[]{"admingroup"});
+    try {
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS, "ozone");
+      conf.setStrings(OzoneConfigKeys.OZONE_ADMINISTRATORS_GROUPS,
+          "admingroup");
+      testAdminFilterWithPrincipal(conf, "user1", true);
+    } finally {
+      UserGroupInformation.reset();
+    }

Review Comment:
   Sorry, I missed that.



-- 
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: issues-unsubscribe@ozone.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org