Category Permissions for Project Users

September 1, 2020

by Nimal Kunnath

Intended Audience Level: Intermediate

Code Sample Type: Complete Script

Nutanix Technologies: Prism Central

Minimum Product Version: 5.10

Script/Code Language: Python

REST API Sample? Yes

REST API Version: v3

Nutanix does not have RBAC on Categories (at the time of this post). That means project users are able to see all Categories. This is particularly an issue for Service Providers who have multiple customer’s infrastructure on the same cluster. While this is a FEAT in progress, this script is a workaround to mask the categories view and ensure Prism Central users do not view/access/modify Categories they are not intended to.

Code Sample Details

Note this section may be empty, if additional code sample details are not available.

Sample output from running this script:

Enter Prism Central IP address: 10.42.x.x
Enter username: admin
Enter the password: 
All the roles in this cluster are
('Self-Service Admin', 'f1f8c1dd-ca2e-454a-9040-2c126d682608')
('Prism Admin', 'c1486719-a518-40ce-a510-1b462cbb534c')
('Prism Viewer', '6b0166df-28bb-4fae-8ac6-3aa81140b3aa')
('Project Admin', '0fd980cd-dbd7-4aaf-828d-658466adc82f')
('Operator', '7421c0fd-38c0-4098-90d6-1300cab92f43')
('Super Admin', 'a2acf39e-3093-419f-9112-b31badcb1e75')
('Consumer', '8d9848b2-0f40-4022-abd3-2252a00af07f')
('Developer', 'd6f8ba14-60f2-4c3b-8557-71d29d170392')
('DemonstrationRole', '9292b8d3-c272-44d6-8468-496b2fac47eb')