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 2021/08/23 17:53:36 UTC

[GitHub] [ozone] smengcl opened a new pull request #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

smengcl opened a new pull request #2564:
URL: https://github.com/apache/ozone/pull/2564


   This PR implements `AssignUserToTenant`, replacing `CreateUserTenant` in the prototype.
   
   ## How was this patch tested?
   
   - [ ] UTs to be added.
   


-- 
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 merged pull request #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

Posted by GitBox <gi...@apache.org>.
smengcl merged pull request #2564:
URL: https://github.com/apache/ozone/pull/2564


   


-- 
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] prashantpogde commented on a change in pull request #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

Posted by GitBox <gi...@apache.org>.
prashantpogde commented on a change in pull request #2564:
URL: https://github.com/apache/ozone/pull/2564#discussion_r696085590



##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
##########
@@ -637,18 +637,22 @@ public void createTenant(String tenantName) throws IOException {
   // TODO: modify, delete
 
   /**
-   * Create tenant user.
-   * @param tenantUsername tenant user name.
+   * Assign user to tenant.
+   * @param username user name to be assigned.
+   * @param tenantName tenant name.
    * @throws IOException
    */
   @Override
-  public S3SecretValue createTenantUser(
-      String tenantUsername, String tenantName) throws IOException {
-    Preconditions.checkArgument(Strings.isNotBlank(tenantUsername),
-        "tenantUsername cannot be null or empty.");
+  public S3SecretValue assignUserToTenant(
+      String username, String tenantName, String accessId) throws IOException {
+    Preconditions.checkArgument(Strings.isNotBlank(username),
+        "username can't be null or empty.");
     Preconditions.checkArgument(Strings.isNotBlank(tenantName),
-        "tenantName cannot be null or empty.");
-    return ozoneManagerClient.createTenantUser(tenantUsername, tenantName);
+        "tenantName can't be null or empty.");
+    Preconditions.checkArgument(Strings.isNotBlank(accessId),

Review comment:
       Same comment as above. If a preferred accessId is not given  by the user, Ozone should create one and return it.




-- 
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] prashantpogde commented on a change in pull request #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

Posted by GitBox <gi...@apache.org>.
prashantpogde commented on a change in pull request #2564:
URL: https://github.com/apache/ozone/pull/2564#discussion_r696085012



##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java
##########
@@ -573,13 +573,14 @@ void cancelDelegationToken(Token<OzoneTokenIdentifier> token)
 //  void deleteTenant(String tenantName) throws IOException;
 
   /**
-   * Create tenant user.
-   * @param tenantUsername tenant user name.
+   * Assign user to tenant.
+   * @param username user name to be assigned.
    * @param tenantName tenant name.
+   * @param accessId access ID.
    * @throws IOException
    */
-  S3SecretValue createTenantUser(String tenantUsername, String tenantName)
-      throws IOException;
+  S3SecretValue assignUserToTenant(String username, String tenantName,

Review comment:
       accessID as input is optional. If its not given, Ozone should create and return the unique accessID.




-- 
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 #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

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


   Thanks @prashantpogde for reviewing this.


-- 
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 change in pull request #2564: HDDS-5647. [Multi-Tenant] Implement AssignUserToTenant

Posted by GitBox <gi...@apache.org>.
smengcl commented on a change in pull request #2564:
URL: https://github.com/apache/ozone/pull/2564#discussion_r696087877



##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java
##########
@@ -573,13 +573,14 @@ void cancelDelegationToken(Token<OzoneTokenIdentifier> token)
 //  void deleteTenant(String tenantName) throws IOException;
 
   /**
-   * Create tenant user.
-   * @param tenantUsername tenant user name.
+   * Assign user to tenant.
+   * @param username user name to be assigned.
    * @param tenantName tenant name.
+   * @param accessId access ID.
    * @throws IOException
    */
-  S3SecretValue createTenantUser(String tenantUsername, String tenantName)
-      throws IOException;
+  S3SecretValue assignUserToTenant(String username, String tenantName,

Review comment:
       It **is** indeed optional, see `AssignUserToTenantHandler`.




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