Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
OperationREST APIBodyResponseCLI Command (from Security CLI commands)
grantsecurity/authorization/grant
Code Block
titleGrantRequest
{
  "entity": {
    "namespace": "ns1",
    "entity": "NAMESPACE"
  },
  "principal": {
    "name": "admin",
    "type": "ROLE"
  },
  "actions": [
    "READ"
  ]
}
  
revokesecurity/authorization/revoke
Code Block
titleRevokeRequest
{
  "entity": {
    "namespace": "ns1",
    "entity": "NAMESPACE"
  },
  "principal": {
    "name": "admin",
    "type": "ROLE"
  },
  "actions": [
    "READ"
  ]
}
  
check authorizedsecurity/authorization/authorized 
Code Block
titleCheckAuthorizedRequest
{
  "entity": {
    "namespace": "ns1",
    "entity": "NAMESPACE"
  },
  "principal": {
    "name": "admin",
    "type": "ROLE"
  },
  "actions": [
    "READ"
  ]
}
  
create role

PUT /security/authorization/roles/<role-name>

N/A

200: Created the role

409: role already exists

 
create role <role-name>
delete roleDELETE /security/authorization/roles/<role-name>N/A

200: Deleted the role

404: role is not found

 
drop role <role-name>
List rolesGET /security/authorization/roles/N/A

200: List of roles

Code Block
titleRoles
["Role", "Role2"]
list roles
add role to principalPUT /security/authorization/<principal-type>/<principal-name>/roles/<role-name>

 

200: Added role to principal

404: role not found

404: principal not found

 
add role <role-name> to group/user <group/user-name>
remove role from principalDELETE /security/authorization/<principal-type>/<principal-name>/roles/<role-name>

 

200: removed role from principal

404: role not found

404: principal not found

 
remove role <role-name> from group/user <group/user-name>
List roles for principalGET /security/authorization/<principal-type>/<principal-name>/roles

N/A

 200: List of roles

Code Block
titleRoles
["Role", "Role2"]

404: Principal not found

list roles for group/user <group/user-name>
 List privileges for roleGET /security/authorization/roles/<role-name>/privilegesN/A 

 200: List of privileges for the role

Code Block
titlePrivileges
["Privilege1", "Privilege2"]

404: role not found

list privileges for role <role-name>