Skip to content

Is Authorized

verifiedpermissions_is_authorized R Documentation

Makes an authorization decision about a service request described in the parameters

Description

Makes an authorization decision about a service request described in the parameters. The information in the parameters can also define additional context that Verified Permissions can include in the evaluation. The request is evaluated against all matching policies in the specified policy store. The result of the decision is either Allow or Deny, along with a list of the policies that resulted in the decision.

Usage

verifiedpermissions_is_authorized(policyStoreId, principal, action,
  resource, context, entities)

Arguments

policyStoreId

[required] Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

principal

Specifies the principal for which the authorization decision is to be made.

action

Specifies the requested action to be authorized. For example, is the principal authorized to perform this action on the resource?

resource

Specifies the resource for which the authorization decision is to be made.

context

Specifies additional context that can be used to make more granular authorization decisions.

entities

Specifies the list of resources and principals and their associated attributes that Verified Permissions can examine when evaluating the policies.

You can include only principal and resource entities in this parameter; you can't include actions. You must specify actions in the schema.

Value

A list with the following syntax:

list(
  decision = "ALLOW"|"DENY",
  determiningPolicies = list(
    list(
      policyId = "string"
    )
  ),
  errors = list(
    list(
      errorDescription = "string"
    )
  )
)

Request syntax

svc$is_authorized(
  policyStoreId = "string",
  principal = list(
    entityType = "string",
    entityId = "string"
  ),
  action = list(
    actionType = "string",
    actionId = "string"
  ),
  resource = list(
    entityType = "string",
    entityId = "string"
  ),
  context = list(
    contextMap = list(
      list(
        boolean = TRUE|FALSE,
        entityIdentifier = list(
          entityType = "string",
          entityId = "string"
        ),
        long = 123,
        string = "string",
        set = list(
          list()
        ),
        record = list(
          list()
        )
      )
    )
  ),
  entities = list(
    entityList = list(
      list(
        identifier = list(
          entityType = "string",
          entityId = "string"
        ),
        attributes = list(
          list(
            boolean = TRUE|FALSE,
            entityIdentifier = list(
              entityType = "string",
              entityId = "string"
            ),
            long = 123,
            string = "string",
            set = list(
              list()
            ),
            record = list(
              list()
            )
          )
        ),
        parents = list(
          list(
            entityType = "string",
            entityId = "string"
          )
        )
      )
    )
  )
)