MonkeyCanCode opened a new pull request, #1019:
URL: https://github.com/apache/polaris/pull/1019

   This is one of the purposed CLI option in 
https://github.com/apache/polaris/issues/989 (item 1). This new subcommand will 
display the entities relation a given principal has.
   
   Here is a sample output for quickstart_user based on our example:
   ```json
   {
     "principal": "quickstart_user",
     "principal_roles": [
       {
         "name": "quickstart_user_role",
         "catalog_roles": [
           {
             "name": "quickstart_catalog_role",
             "catalog": "quickstart_catalog",
             "privileges": [
               {
                 "type": "catalog",
                 "privilege": "CATALOG_MANAGE_CONTENT"
               }
             ]
           }
         ]
       }
     ]
   }
   ```
   
   Here is another example for the same user but with additional access, 
principal roles, and catalogs:
   ```json
   {
     "principal": "quickstart_user",
     "principal_roles": [
       {
         "name": "demo_user_role",
         "catalog_roles": [
           {
             "name": "demo_catalog_role",
             "catalog": "demo_catalog",
             "privileges": [
               {
                 "type": "catalog",
                 "privilege": "CATALOG_MANAGE_CONTENT"
               },
               {
                 "type": "namespace",
                 "namespace": [
                   "default"
                 ],
                 "privilege": "NAMESPACE_LIST"
               },
               {
                 "type": "table",
                 "namespace": [
                   "default"
                 ],
                 "tableName": "test",
                 "privilege": "TABLE_READ_PROPERTIES"
               },
               {
                 "type": "table",
                 "namespace": [
                   "default"
                 ],
                 "tableName": "test",
                 "privilege": "TABLE_READ_DATA"
               }
             ]
           }
         ]
       },
       {
         "name": "demo_user_empty_role",
         "catalog_roles": []
       },
       {
         "name": "quickstart_user_role",
         "catalog_roles": [
           {
             "name": "quickstart_catalog_role",
             "catalog": "quickstart_catalog",
             "privileges": [
               {
                 "type": "catalog",
                 "privilege": "CATALOG_MANAGE_CONTENT"
               }
             ]
           }
         ]
       }
     ]
   }
   ```
   
   Here is an sample output for a user with zero reference:
   ```json
   {
     "principal": "test",
     "principal_roles": []
   }
   ``` 


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

Reply via email to