errose28 commented on a change in pull request #3095:
URL: https://github.com/apache/ozone/pull/3095#discussion_r813366441



##########
File path: hadoop-hdds/docs/content/feature/Multi-Tenancy.md
##########
@@ -0,0 +1,74 @@
+---
+title: "Multi-Tenancy"

Review comment:
       We should probably call this "S3 Multi-Tenancy", since it only works 
with s3 api for now, and a lot of the things in the docs here are s3 specific 
anyways.

##########
File path: hadoop-hdds/docs/content/feature/Multi-Tenancy.md
##########
@@ -0,0 +1,74 @@
+---
+title: "Multi-Tenancy"
+weight: 1
+menu:
+   main:
+      parent: Features
+summary: Ozone Multi-Tenancy that allows multiple tenants to share the same 
Ozone cluster. Compatible with S3 API.
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+Before Ozone multi-tenancy, all S3 access to Ozone (via [S3 Gateway]({{< ref 
"interface/S3.md" >}})) are
+confined to a **single** designated S3 volume (that is volume `s3v`, by 
default).
+
+Ozone multi-tenancy allows **multiple** S3-accessible volumes to be created.
+Each volume can be managed separately by their own tenant admins via CLI for 
user operations, and via Apache Ranger for access control.
+
+The concept **tenant** is introduced to Ozone by multi-tenancy.
+Each tenant has its own designated volume.
+Each user assigned to a tenant will be able to access the associated volume 
with an _Access ID & Secret Key_ pair
+generated when an Ozone cluster admin or tenant admin assigns the user to the 
tenant using CLI.
+
+> This multi-tenant feature allows Ozone resources to be compartmentalized in 
different isolation zones (tenants).
+
+> This multi-tenant support will also allow users to access Ozone volumes over 
AWS S3 APIs (without any modifications to the APIs).
+
+## Basics
+
+1. Initial tenant creation has to be done by an Ozone cluster admin under the 
CLI.
+2. The Ozone cluster admin will have to assign the first user of a tenant. 
Once assigned, an _Access ID & Secret Key_ pair will be generated for that user 
for access via S3 Gateway. 
+3. The Ozone cluster admin can then assign tenant admin roles to that user.
+4. Tenant admin are able to assign new users to the tenant. 
+   - They can even assign new tenant admins in their tenant, if they are 
delegated tenant admins, which is the default. See the usage below for more 
details.
+   - Note that tenant admins still need to use Ozone tenant CLI to assign new 
users to the tenant.
+     - On a Kerberized cluster, once tenant admins get the Kerberos TGT (via 
`kinit`), they can run `user assign` command to assign new users. OzoneManager 
will recognize that they are the tenant admins and allow the user to do so in 
their tenants.  

Review comment:
       I don't think s3 tenancy will work without kerberos, but this makes it 
sound optional.

##########
File path: hadoop-hdds/docs/content/interface/Tenant.md
##########
@@ -0,0 +1,294 @@
+---
+title: "Multi-Tenant commands"
+weight: 1
+menu:
+   main:
+      parent: "Client Interfaces"
+summary: Ozone subcommands for tenant management
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+For a higher level understanding of multi-tenancy architecture, see 
[Multi-Tenancy feature]({{< ref "feature/Multi-Tenancy.md" >}}).
+
+All Multi-Tenancy subcommands are located under CLI `ozone tenant`.
+
+The commands below assume a Kerberized Ozone cluster with Ranger install. 
Enabling HTTPS on S3 Gateway is optional but recommended.
+
+## Quick Start
+
+### Setup
+
+Follow the [Multi-Tenancy Setup]({{< ref "feature/Multi-Tenancy-Setup.md" >}}) 
guide if you haven't done so.
+
+If the OzoneManagers are running in HA, append `--om-service-id=` accordingly 
to the commands.
+
+### Create a tenant
+
+Create a new tenant in the current Ozone cluster.
+This operation requires Ozone cluster administrator privilege.
+
+Creating a tenant creates a volume of the exact same name. Volume name 
restrictions apply.
+
+```shell
+ozone tenant create <TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ kinit -kt /etc/security/keytabs/om.keytab om/[email protected]
+bash-4.2$ ozone tenant create tenantone
+2022-02-16 00:00:00,000 [main] INFO rpc.RpcClient: Creating Tenant: 
'tenantone', with new volume: 'tenantone'
+Created tenant 'tenantone'.
+```
+
+
+### List tenants
+
+List all tenants in an Ozone cluster.
+
+```shell
+ozone tenant list
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant list
+tenantone
+```
+
+
+### Assign a user to a tenant
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+By default when user `testuser` is assigned to tenant `tenantone`, the 
generated Access ID for the user in this tenant is `tenantone$testuser`.
+
+- Be sure to enclose the Access ID in single quotes in Bash when using it so 
it doesn't get auto-translated into environment variables.
+
+It is possible to assign a user to multiple tenants.
+
+```shell
+ozone tenant user assign <USER_NAME> --tenant=<TENANT_NAME>

Review comment:
       We should specify that the user name here must be a valid kerberos 
principal that also exists in ranger. If it is not, I think Ranger will just 
always deny access.

##########
File path: hadoop-hdds/docs/content/interface/Tenant.md
##########
@@ -0,0 +1,294 @@
+---
+title: "Multi-Tenant commands"
+weight: 1
+menu:
+   main:
+      parent: "Client Interfaces"
+summary: Ozone subcommands for tenant management
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+For a higher level understanding of multi-tenancy architecture, see 
[Multi-Tenancy feature]({{< ref "feature/Multi-Tenancy.md" >}}).
+
+All Multi-Tenancy subcommands are located under CLI `ozone tenant`.
+
+The commands below assume a Kerberized Ozone cluster with Ranger install. 
Enabling HTTPS on S3 Gateway is optional but recommended.
+
+## Quick Start
+
+### Setup
+
+Follow the [Multi-Tenancy Setup]({{< ref "feature/Multi-Tenancy-Setup.md" >}}) 
guide if you haven't done so.
+
+If the OzoneManagers are running in HA, append `--om-service-id=` accordingly 
to the commands.
+
+### Create a tenant
+
+Create a new tenant in the current Ozone cluster.
+This operation requires Ozone cluster administrator privilege.
+
+Creating a tenant creates a volume of the exact same name. Volume name 
restrictions apply.
+
+```shell
+ozone tenant create <TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ kinit -kt /etc/security/keytabs/om.keytab om/[email protected]
+bash-4.2$ ozone tenant create tenantone
+2022-02-16 00:00:00,000 [main] INFO rpc.RpcClient: Creating Tenant: 
'tenantone', with new volume: 'tenantone'
+Created tenant 'tenantone'.
+```
+
+
+### List tenants
+
+List all tenants in an Ozone cluster.
+
+```shell
+ozone tenant list
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant list
+tenantone
+```
+
+
+### Assign a user to a tenant
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+By default when user `testuser` is assigned to tenant `tenantone`, the 
generated Access ID for the user in this tenant is `tenantone$testuser`.
+
+- Be sure to enclose the Access ID in single quotes in Bash when using it so 
it doesn't get auto-translated into environment variables.
+
+It is possible to assign a user to multiple tenants.
+
+```shell
+ozone tenant user assign <USER_NAME> --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user assign testuser --tenant=tenantone
+Assigned 'testuser' to 'tenantone' with accessId 'tenantone$testuser'.
+export AWS_ACCESS_KEY_ID='tenantone$testuser'
+export AWS_SECRET_ACCESS_KEY='<GENERATED_SECRET>'
+```
+
+
+### Assign a user as a tenant admin
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+Both delegated and non-delegated tenant admin can assign and revoke 
**regular** tenant users.
+
+The only difference between delegated tenant admin and non-delegated tenant 
admin is that delegated tenant admin can assign and revoke tenant **admins** in 
the tenant,
+while non-delegated tenant admin can't.
+
+Unless specified, `ozone tenant assignadmin` assigns **delegated** tenant 
admins by default.
+
+It is possible to assign a user to be tenant admins in multiple tenants.
+
+```shell
+ozone tenant user assignadmin <ACCESS_ID> --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user assignadmin 'tenantone$testuser' --tenant=tenantone
+Assigned admin to 'tenantone$testuser' in tenant 'tenantone'
+```
+
+Once `testuser` becomes a tenant admin of `tenantone`, one can kinit as 
`testuser` and assign new users to the tenant,
+even new tenant admins (if delegated). Example commands for illustration:
+
+```shell
+kinit -kt /etc/security/keytabs/testuser.keytab testuser/[email protected]
+ozone tenant user assign testuser2 --tenant=tenantone
+ozone tenant user assignadmin 'tenantone$testuser2' --tenant=tenantone
+```
+
+
+### List users in a tenant
+
+```shell
+ozone tenant user list --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user list --tenant=tenantone
+- User 'testuser' with accessId 'tenantone$testuser'
+```
+
+
+### Get tenant user info
+
+This command lists all tenants a user is assigned to.
+
+```shell
+ozone tenant user info <USER_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user info testuser
+User 'testuser' is assigned to:
+- Tenant 'tenantone' delegated admin with accessId 'tenantone$testuser'
+```
+
+
+### Bonus: Accessing a bucket in a tenant volume via S3 Gateway using S3 API
+
+- {{< detail-tag "Click here to expand/collapse" >}}
+
+#### Configure AWS CLI
+
+```shell
+bash-4.2$ aws configure
+AWS Access Key ID [****************fslf]: tenantone$testuser
+AWS Secret Access Key [****************fslf]: <GENERATED_SECRET>
+Default region name [us-west-1]:
+Default output format [None]:
+```
+
+#### List buckets, create a bucket
+
+```shell
+bash-4.2$ aws s3api --endpoint-url http://s3g:9878 list-buckets
+{
+    "Buckets": []
+}
+bash-4.2$ aws s3api --endpoint-url http://s3g:9878 create-bucket --bucket 
bucket-test1
+{
+    "Location": "http://s3g:9878/bucket-test1";
+}
+bash-4.2$ aws s3api --endpoint-url http://s3g:9878 list-buckets

Review comment:
       It might be good to add a bucket list from the Ozone CLI for the tenant 
volume here too, to highlight that the bucket was created in the tenant volume.

##########
File path: hadoop-hdds/docs/content/feature/Multi-Tenancy-Setup.md
##########
@@ -0,0 +1,97 @@
+---
+title: "Setup"
+weight: 1
+menu:
+   main:
+      parent: "Multi-Tenancy"
+summary: Preparing Ozone clusters to enable Multi-Tenancy feature
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+Steps to enable Multi-Tenancy feature in Ozone clusters. 

Review comment:
       We should probably link to the kerberos and s3g set up pages here as 
well, and indicate that those, along with Ranger, are requirements for 
multi-tenancy to work.

##########
File path: hadoop-hdds/docs/content/feature/Multi-Tenancy.md
##########
@@ -0,0 +1,74 @@
+---
+title: "Multi-Tenancy"
+weight: 1
+menu:
+   main:
+      parent: Features
+summary: Ozone Multi-Tenancy that allows multiple tenants to share the same 
Ozone cluster. Compatible with S3 API.
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+Before Ozone multi-tenancy, all S3 access to Ozone (via [S3 Gateway]({{< ref 
"interface/S3.md" >}})) are
+confined to a **single** designated S3 volume (that is volume `s3v`, by 
default).
+
+Ozone multi-tenancy allows **multiple** S3-accessible volumes to be created.
+Each volume can be managed separately by their own tenant admins via CLI for 
user operations, and via Apache Ranger for access control.
+
+The concept **tenant** is introduced to Ozone by multi-tenancy.
+Each tenant has its own designated volume.
+Each user assigned to a tenant will be able to access the associated volume 
with an _Access ID & Secret Key_ pair
+generated when an Ozone cluster admin or tenant admin assigns the user to the 
tenant using CLI.
+
+> This multi-tenant feature allows Ozone resources to be compartmentalized in 
different isolation zones (tenants).
+
+> This multi-tenant support will also allow users to access Ozone volumes over 
AWS S3 APIs (without any modifications to the APIs).
+
+## Basics
+
+1. Initial tenant creation has to be done by an Ozone cluster admin under the 
CLI.
+2. The Ozone cluster admin will have to assign the first user of a tenant. 
Once assigned, an _Access ID & Secret Key_ pair will be generated for that user 
for access via S3 Gateway. 

Review comment:
       I think there should be more clarification about how users and tenants 
are associated. For example, there is one kerberos principal used to identify a 
user regardless of which tenant they are a part of. These principals must be 
present in Ranger for things to work. The access ID and secret is used to 
associate the kerberos principal with the tenant. So each user will have one 
principal, but may have multiple access ID/secret key pairs for each tenant 
they are a part of.

##########
File path: hadoop-hdds/docs/content/interface/Tenant.md
##########
@@ -0,0 +1,294 @@
+---
+title: "Multi-Tenant commands"
+weight: 1
+menu:
+   main:
+      parent: "Client Interfaces"
+summary: Ozone subcommands for tenant management
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+For a higher level understanding of multi-tenancy architecture, see 
[Multi-Tenancy feature]({{< ref "feature/Multi-Tenancy.md" >}}).
+
+All Multi-Tenancy subcommands are located under CLI `ozone tenant`.
+
+The commands below assume a Kerberized Ozone cluster with Ranger install. 
Enabling HTTPS on S3 Gateway is optional but recommended.
+
+## Quick Start
+
+### Setup
+
+Follow the [Multi-Tenancy Setup]({{< ref "feature/Multi-Tenancy-Setup.md" >}}) 
guide if you haven't done so.
+
+If the OzoneManagers are running in HA, append `--om-service-id=` accordingly 
to the commands.
+
+### Create a tenant
+
+Create a new tenant in the current Ozone cluster.
+This operation requires Ozone cluster administrator privilege.
+
+Creating a tenant creates a volume of the exact same name. Volume name 
restrictions apply.
+
+```shell
+ozone tenant create <TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ kinit -kt /etc/security/keytabs/om.keytab om/[email protected]
+bash-4.2$ ozone tenant create tenantone
+2022-02-16 00:00:00,000 [main] INFO rpc.RpcClient: Creating Tenant: 
'tenantone', with new volume: 'tenantone'
+Created tenant 'tenantone'.
+```
+
+
+### List tenants
+
+List all tenants in an Ozone cluster.
+
+```shell
+ozone tenant list
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant list
+tenantone
+```
+
+
+### Assign a user to a tenant
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+By default when user `testuser` is assigned to tenant `tenantone`, the 
generated Access ID for the user in this tenant is `tenantone$testuser`.
+
+- Be sure to enclose the Access ID in single quotes in Bash when using it so 
it doesn't get auto-translated into environment variables.
+
+It is possible to assign a user to multiple tenants.
+
+```shell
+ozone tenant user assign <USER_NAME> --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user assign testuser --tenant=tenantone
+Assigned 'testuser' to 'tenantone' with accessId 'tenantone$testuser'.
+export AWS_ACCESS_KEY_ID='tenantone$testuser'
+export AWS_SECRET_ACCESS_KEY='<GENERATED_SECRET>'
+```
+
+
+### Assign a user as a tenant admin
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+Both delegated and non-delegated tenant admin can assign and revoke 
**regular** tenant users.
+
+The only difference between delegated tenant admin and non-delegated tenant 
admin is that delegated tenant admin can assign and revoke tenant **admins** in 
the tenant,
+while non-delegated tenant admin can't.
+
+Unless specified, `ozone tenant assignadmin` assigns **delegated** tenant 
admins by default.
+
+It is possible to assign a user to be tenant admins in multiple tenants.
+
+```shell
+ozone tenant user assignadmin <ACCESS_ID> --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user assignadmin 'tenantone$testuser' --tenant=tenantone
+Assigned admin to 'tenantone$testuser' in tenant 'tenantone'
+```
+
+Once `testuser` becomes a tenant admin of `tenantone`, one can kinit as 
`testuser` and assign new users to the tenant,
+even new tenant admins (if delegated). Example commands for illustration:
+
+```shell
+kinit -kt /etc/security/keytabs/testuser.keytab testuser/[email protected]
+ozone tenant user assign testuser2 --tenant=tenantone
+ozone tenant user assignadmin 'tenantone$testuser2' --tenant=tenantone
+```
+
+
+### List users in a tenant
+
+```shell
+ozone tenant user list --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user list --tenant=tenantone
+- User 'testuser' with accessId 'tenantone$testuser'
+```
+
+
+### Get tenant user info
+
+This command lists all tenants a user is assigned to.
+
+```shell
+ozone tenant user info <USER_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user info testuser
+User 'testuser' is assigned to:
+- Tenant 'tenantone' delegated admin with accessId 'tenantone$testuser'
+```
+
+
+### Bonus: Accessing a bucket in a tenant volume via S3 Gateway using S3 API

Review comment:
       I think this makes more sense at the end of the document so it doesn't 
disrupt the flow of tenant specific stuff. Also I don't think it needs to be 
hidden if it is at the end, otherwise people will probably not read it.

##########
File path: hadoop-hdds/docs/content/interface/Tenant.md
##########
@@ -0,0 +1,294 @@
+---
+title: "Multi-Tenant commands"
+weight: 1
+menu:
+   main:
+      parent: "Client Interfaces"

Review comment:
       This isn't really a different Ozone interface. I think it should be a 
subsection of the multi-tenancy entry under Features.

##########
File path: hadoop-hdds/docs/content/interface/Tenant.md
##########
@@ -0,0 +1,294 @@
+---
+title: "Multi-Tenant commands"
+weight: 1
+menu:
+   main:
+      parent: "Client Interfaces"
+summary: Ozone subcommands for tenant management
+---
+<!---
+  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
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+For a higher level understanding of multi-tenancy architecture, see 
[Multi-Tenancy feature]({{< ref "feature/Multi-Tenancy.md" >}}).
+
+All Multi-Tenancy subcommands are located under CLI `ozone tenant`.
+
+The commands below assume a Kerberized Ozone cluster with Ranger install. 
Enabling HTTPS on S3 Gateway is optional but recommended.
+
+## Quick Start
+
+### Setup
+
+Follow the [Multi-Tenancy Setup]({{< ref "feature/Multi-Tenancy-Setup.md" >}}) 
guide if you haven't done so.
+
+If the OzoneManagers are running in HA, append `--om-service-id=` accordingly 
to the commands.
+
+### Create a tenant
+
+Create a new tenant in the current Ozone cluster.
+This operation requires Ozone cluster administrator privilege.
+
+Creating a tenant creates a volume of the exact same name. Volume name 
restrictions apply.
+
+```shell
+ozone tenant create <TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ kinit -kt /etc/security/keytabs/om.keytab om/[email protected]
+bash-4.2$ ozone tenant create tenantone
+2022-02-16 00:00:00,000 [main] INFO rpc.RpcClient: Creating Tenant: 
'tenantone', with new volume: 'tenantone'
+Created tenant 'tenantone'.
+```
+
+
+### List tenants
+
+List all tenants in an Ozone cluster.
+
+```shell
+ozone tenant list
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant list
+tenantone
+```
+
+
+### Assign a user to a tenant
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+By default when user `testuser` is assigned to tenant `tenantone`, the 
generated Access ID for the user in this tenant is `tenantone$testuser`.
+
+- Be sure to enclose the Access ID in single quotes in Bash when using it so 
it doesn't get auto-translated into environment variables.
+
+It is possible to assign a user to multiple tenants.
+
+```shell
+ozone tenant user assign <USER_NAME> --tenant=<TENANT_NAME>
+```
+
+Example:
+
+```shell
+bash-4.2$ ozone tenant user assign testuser --tenant=tenantone
+Assigned 'testuser' to 'tenantone' with accessId 'tenantone$testuser'.
+export AWS_ACCESS_KEY_ID='tenantone$testuser'
+export AWS_SECRET_ACCESS_KEY='<GENERATED_SECRET>'
+```
+
+
+### Assign a user as a tenant admin
+
+The first user in a tenant must be assigned by an Ozone cluster administrator.
+
+Both delegated and non-delegated tenant admin can assign and revoke 
**regular** tenant users.
+
+The only difference between delegated tenant admin and non-delegated tenant 
admin is that delegated tenant admin can assign and revoke tenant **admins** in 
the tenant,
+while non-delegated tenant admin can't.
+
+Unless specified, `ozone tenant assignadmin` assigns **delegated** tenant 
admins by default.

Review comment:
       How would I assign a non-delegated admin?




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