Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

OperationREST APIBodyResponseCLI Command (from Security CLI commands)
grantsecurity/authorization/grant
GrantRequest
{
  "entity": {
    "namespace": "ns1",
    "entity": "NAMESPACE"
  },
  "principal": {
    "name": "admin",
    "type": "ROLE"
  },
  "actions": [
    "READ"
  ]
}

200: Granted the action on the entity for the principal

security grant entity <entity-id> principal-type <principal-type-name> principal-name <principal-name> actions READ
revokesecurity/authorization/revoke
RevokeRequest
{
  "entity": {
    "namespace": "ns1",
    "entity": "NAMESPACE"
  },
  "principal": {
    "name": "admin",
    "type": "ROLE"
  },
  "actions": [
    "READ"
  ]
}

200: Revoked the actions on the entity for the principal

security revoke entity <entity-id> principal-type <principal-type-name> principal-name <principal-name> actions READ
Role Based Access Control
create role

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

N/A

200: Created the role

409: role already exists

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

200: Deleted the role

404: role is not found

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

200: List of roles

Roles
["Role", "Role2"]
 
security 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

 
security 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

 
 
security 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

Roles
["Role", "Role2"]

404: Principal not found

 
security 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

Privileges
["Privilege1", "Privilege2"]

404: role not found

 
security list privileges for role <role-name>

 

 

  • No labels