Verifiedpermissions

This page documents function available when using the Verifiedpermissions module, created with @service Verifiedpermissions.

Index

Documentation

Main.Verifiedpermissions.create_identity_sourceMethod
create_identity_source(configuration, policy_store_id)
create_identity_source(configuration, policy_store_id, params::Dict{String,<:Any})

Creates a reference to an Amazon Cognito user pool as an external identity provider (IdP). After you create an identity source, you can use the identities provided by the IdP as proxies for the principal in authorization queries that use the IsAuthorizedWithToken operation. These identities take the form of tokens that contain claims about the user, such as IDs, attributes and group memberships. Amazon Cognito provides both identity tokens and access tokens, and Verified Permissions can use either or both. Any combination of identity and access tokens results in the same Cedar principal. Verified Permissions automatically translates the information about the identities into the standard Cedar attributes that can be evaluated by your policies. Because the Amazon Cognito identity and access tokens can contain different information, the tokens you choose to use determine which principal attributes are available to access when evaluating Cedar policies. If you delete a Amazon Cognito user pool or user, tokens from that deleted pool or that deleted user continue to be usable until they expire. To reference a user from this identity source in your Cedar policies, use the following syntax. IdentityType::"&lt;CognitoUserPoolIdentifier&gt;|&lt;CognitoClientId&gt; Where IdentityType is the string that you provide to the PrincipalEntityType parameter for this operation. The CognitoUserPoolId and CognitoClientId are defined by the Amazon Cognito user pool.

Arguments

  • configuration: Specifies the details required to communicate with the identity provider (IdP) associated with this identity source. At this time, the only valid member of this structure is a Amazon Cognito user pool configuration. You must specify a UserPoolArn, and optionally, a ClientId.
  • policy_store_id: Specifies the ID of the policy store in which you want to store this identity source. Only policies and requests made using this policy store can reference identities from the identity provider configured in the new identity source.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "clientToken": Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.
  • "principalEntityType": Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.
source
Main.Verifiedpermissions.create_policyMethod
create_policy(definition, policy_store_id)
create_policy(definition, policy_store_id, params::Dict{String,<:Any})

Creates a Cedar policy and saves it in the specified policy store. You can create either a static policy or a policy linked to a policy template. To create a static policy, provide the Cedar policy text in the StaticPolicy section of the PolicyDefinition. To create a policy that is dynamically linked to a policy template, specify the policy template ID and the principal and resource to associate with this policy in the templateLinked section of the PolicyDefinition. If the policy template is ever updated, any policies linked to the policy template automatically use the updated template. Creating a policy causes it to be validated against the schema in the policy store. If the policy doesn't pass validation, the operation fails and the policy isn't stored.

Arguments

  • definition: A structure that specifies the policy type and content to use for the new policy. You must include either a static or a templateLinked element. The policy content must be written in the Cedar policy language.
  • policy_store_id: Specifies the PolicyStoreId of the policy store you want to store the policy in.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "clientToken": Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.
source
Main.Verifiedpermissions.create_policy_storeMethod
create_policy_store(validation_settings)
create_policy_store(validation_settings, params::Dict{String,<:Any})

Creates a policy store. A policy store is a container for policy resources.

Arguments

  • validation_settings: Specifies the validation setting for this policy store. Currently, the only valid and required value is Mode. We recommend that you turn on STRICT mode only after you define a schema. If a schema doesn't exist, then STRICT mode causes any policy to fail validation, and Verified Permissions rejects the policy. You can turn off validation by using the UpdatePolicyStore. Then, when you have a schema defined, use UpdatePolicyStore again to turn validation back on.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "clientToken": Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.
source
Main.Verifiedpermissions.create_policy_templateMethod
create_policy_template(policy_store_id, statement)
create_policy_template(policy_store_id, statement, params::Dict{String,<:Any})

Creates a policy template. A template can use placeholders for the principal and resource. A template must be instantiated into a policy by associating it with specific principals and resources to use for the placeholders. That instantiated policy can then be considered in authorization decisions. The instantiated policy works identically to any other policy, except that it is dynamically linked to the template. If the template changes, then any policies that are linked to that template are immediately updated as well.

Arguments

  • policy_store_id: The ID of the policy store in which to create the policy template.
  • statement: Specifies the content that you want to use for the new policy template, written in the Cedar policy language.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "clientToken": Specifies a unique, case-sensitive ID that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.
  • "description": Specifies a description for the policy template.
source
Main.Verifiedpermissions.delete_identity_sourceMethod
delete_identity_source(identity_source_id, policy_store_id)
delete_identity_source(identity_source_id, policy_store_id, params::Dict{String,<:Any})

Deletes an identity source that references an identity provider (IdP) such as Amazon Cognito. After you delete the identity source, you can no longer use tokens for identities from that identity source to represent principals in authorization queries made using IsAuthorizedWithToken. operations.

Arguments

  • identity_source_id: Specifies the ID of the identity source that you want to delete.
  • policy_store_id: Specifies the ID of the policy store that contains the identity source that you want to delete.
source
Main.Verifiedpermissions.delete_policyMethod
delete_policy(policy_id, policy_store_id)
delete_policy(policy_id, policy_store_id, params::Dict{String,<:Any})

Deletes the specified policy from the policy store. This operation is idempotent; if you specify a policy that doesn't exist, the request response returns a successful HTTP 200 status code.

Arguments

  • policy_id: Specifies the ID of the policy that you want to delete.
  • policy_store_id: Specifies the ID of the policy store that contains the policy that you want to delete.
source
Main.Verifiedpermissions.delete_policy_storeMethod
delete_policy_store(policy_store_id)
delete_policy_store(policy_store_id, params::Dict{String,<:Any})

Deletes the specified policy store. This operation is idempotent. If you specify a policy store that does not exist, the request response will still return a successful HTTP 200 status code.

Arguments

  • policy_store_id: Specifies the ID of the policy store that you want to delete.
source
Main.Verifiedpermissions.delete_policy_templateMethod
delete_policy_template(policy_store_id, policy_template_id)
delete_policy_template(policy_store_id, policy_template_id, params::Dict{String,<:Any})

Deletes the specified policy template from the policy store. This operation also deletes any policies that were created from the specified policy template. Those policies are immediately removed from all future API responses, and are asynchronously deleted from the policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the policy template that you want to delete.
  • policy_template_id: Specifies the ID of the policy template that you want to delete.
source
Main.Verifiedpermissions.get_identity_sourceMethod
get_identity_source(identity_source_id, policy_store_id)
get_identity_source(identity_source_id, policy_store_id, params::Dict{String,<:Any})

Retrieves the details about the specified identity source.

Arguments

  • identity_source_id: Specifies the ID of the identity source you want information about.
  • policy_store_id: Specifies the ID of the policy store that contains the identity source you want information about.
source
Main.Verifiedpermissions.get_policyMethod
get_policy(policy_id, policy_store_id)
get_policy(policy_id, policy_store_id, params::Dict{String,<:Any})

Retrieves information about the specified policy.

Arguments

  • policy_id: Specifies the ID of the policy you want information about.
  • policy_store_id: Specifies the ID of the policy store that contains the policy that you want information about.
source
Main.Verifiedpermissions.get_policy_storeMethod
get_policy_store(policy_store_id)
get_policy_store(policy_store_id, params::Dict{String,<:Any})

Retrieves details about a policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that you want information about.
source
Main.Verifiedpermissions.get_policy_templateMethod
get_policy_template(policy_store_id, policy_template_id)
get_policy_template(policy_store_id, policy_template_id, params::Dict{String,<:Any})

Retrieve the details for the specified policy template in the specified policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the policy template that you want information about.
  • policy_template_id: Specifies the ID of the policy template that you want information about.
source
Main.Verifiedpermissions.get_schemaMethod
get_schema(policy_store_id)
get_schema(policy_store_id, params::Dict{String,<:Any})

Retrieve the details for the specified schema in the specified policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the schema.
source
Main.Verifiedpermissions.is_authorizedMethod
is_authorized(policy_store_id)
is_authorized(policy_store_id, params::Dict{String,<:Any})

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.

Arguments

  • policy_store_id: Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "action": Specifies the requested action to be authorized. For example, is the principal authorized to perform this action on the resource?
  • "context": Specifies additional context that can be used to make more granular authorization decisions.
  • "entities": Specifies the list of entities and their associated attributes that Verified Permissions can examine when evaluating the policies.
  • "principal": Specifies the principal for which the authorization decision is to be made.
  • "resource": Specifies the resource for which the authorization decision is to be made.
source
Main.Verifiedpermissions.is_authorized_with_tokenMethod
is_authorized_with_token(policy_store_id)
is_authorized_with_token(policy_store_id, params::Dict{String,<:Any})

Makes an authorization decision about a service request described in the parameters. The principal in this request comes from an external identity source. 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. If you delete a Amazon Cognito user pool or user, tokens from that deleted pool or that deleted user continue to be usable until they expire.

Arguments

  • policy_store_id: Specifies the ID of the policy store. Policies in this policy store will be used to make an authorization decision for the input.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "accessToken": Specifies an access token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an AccessToken or an IdentityToken, but not both.
  • "action": Specifies the requested action to be authorized. Is the specified principal authorized to perform this action on the specified resource.
  • "context": Specifies additional context that can be used to make more granular authorization decisions.
  • "entities": Specifies the list of entities and their associated attributes that Verified Permissions can examine when evaluating the policies.
  • "identityToken": Specifies an identity token for the principal to be authorized. This token is provided to you by the identity provider (IdP) associated with the specified identity source. You must specify either an AccessToken or an IdentityToken, but not both.
  • "resource": Specifies the resource for which the authorization decision is made. For example, is the principal allowed to perform the action on the resource?
source
Main.Verifiedpermissions.list_identity_sourcesMethod
list_identity_sources(policy_store_id)
list_identity_sources(policy_store_id, params::Dict{String,<:Any})

Returns a paginated list of all of the identity sources defined in the specified policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the identity sources that you want to list.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "filters": Specifies characteristics of an identity source that you can use to limit the output to matching identity sources.
  • "maxResults": Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
  • "nextToken": Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
source
Main.Verifiedpermissions.list_policiesMethod
list_policies(policy_store_id)
list_policies(policy_store_id, params::Dict{String,<:Any})

Returns a paginated list of all policies stored in the specified policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store you want to list policies from.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "filter": Specifies a filter that limits the response to only policies that match the specified criteria. For example, you list only the policies that reference a specified principal.
  • "maxResults": Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
  • "nextToken": Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
source
Main.Verifiedpermissions.list_policy_storesMethod
list_policy_stores()
list_policy_stores(params::Dict{String,<:Any})

Returns a paginated list of all policy stores in the calling Amazon Web Services account.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "maxResults": Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
  • "nextToken": Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
source
Main.Verifiedpermissions.list_policy_templatesMethod
list_policy_templates(policy_store_id)
list_policy_templates(policy_store_id, params::Dict{String,<:Any})

Returns a paginated list of all policy templates in the specified policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the policy templates you want to list.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "maxResults": Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
  • "nextToken": Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
source
Main.Verifiedpermissions.put_schemaMethod
put_schema(definition, policy_store_id)
put_schema(definition, policy_store_id, params::Dict{String,<:Any})

Creates or updates the policy schema in the specified policy store. The schema is used to validate any Cedar policies and policy templates submitted to the policy store. Any changes to the schema validate only policies and templates submitted after the schema change. Existing policies and templates are not re-evaluated against the changed schema. If you later update a policy, then it is evaluated against the new schema at that time.

Arguments

  • definition: Specifies the definition of the schema to be stored. The schema definition must be written in Cedar schema JSON.
  • policy_store_id: Specifies the ID of the policy store in which to place the schema.
source
Main.Verifiedpermissions.update_identity_sourceMethod
update_identity_source(identity_source_id, policy_store_id, update_configuration)
update_identity_source(identity_source_id, policy_store_id, update_configuration, params::Dict{String,<:Any})

Updates the specified identity source to use a new identity provider (IdP) source, or to change the mapping of identities from the IdP to a different principal entity type.

Arguments

  • identity_source_id: Specifies the ID of the identity source that you want to update.
  • policy_store_id: Specifies the ID of the policy store that contains the identity source that you want to update.
  • update_configuration: Specifies the details required to communicate with the identity provider (IdP) associated with this identity source. At this time, the only valid member of this structure is a Amazon Cognito user pool configuration. You must specify a userPoolArn, and optionally, a ClientId.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "principalEntityType": Specifies the data type of principals generated for identities authenticated by the identity source.
source
Main.Verifiedpermissions.update_policyMethod
update_policy(definition, policy_id, policy_store_id)
update_policy(definition, policy_id, policy_store_id, params::Dict{String,<:Any})

Modifies a Cedar static policy in the specified policy store. You can change only certain elements of the UpdatePolicyDefinition parameter. You can directly update only static policies. To change a template-linked policy, you must update the template instead, using UpdatePolicyTemplate. If policy validation is enabled in the policy store, then updating a static policy causes Verified Permissions to validate the policy against the schema in the policy store. If the updated static policy doesn't pass validation, the operation fails and the update isn't stored.

Arguments

  • definition: Specifies the updated policy content that you want to replace on the specified policy. The content must be valid Cedar policy language text. You can change only the following elements from the policy definition: The action referenced by the policy. Any conditional clauses, such as when or unless clauses. You can't change the following elements: Changing from static to templateLinked. Changing the effect of the policy from permit or forbid. The principal referenced by the policy. The resource referenced by the policy.
  • policy_id: Specifies the ID of the policy that you want to update. To find this value, you can use ListPolicies.
  • policy_store_id: Specifies the ID of the policy store that contains the policy that you want to update.
source
Main.Verifiedpermissions.update_policy_storeMethod
update_policy_store(policy_store_id, validation_settings)
update_policy_store(policy_store_id, validation_settings, params::Dict{String,<:Any})

Modifies the validation setting for a policy store.

Arguments

  • policy_store_id: Specifies the ID of the policy store that you want to update
  • validation_settings: A structure that defines the validation settings that want to enable for the policy store.
source
Main.Verifiedpermissions.update_policy_templateMethod
update_policy_template(policy_store_id, policy_template_id, statement)
update_policy_template(policy_store_id, policy_template_id, statement, params::Dict{String,<:Any})

Updates the specified policy template. You can update only the description and the some elements of the policyBody. Changes you make to the policy template content are immediately reflected in authorization decisions that involve all template-linked policies instantiated from this template.

Arguments

  • policy_store_id: Specifies the ID of the policy store that contains the policy template that you want to update.
  • policy_template_id: Specifies the ID of the policy template that you want to update.
  • statement: Specifies new statement content written in Cedar policy language to replace the current body of the policy template. You can change only the following elements of the policy body: The action referenced by the policy template. Any conditional clauses, such as when or unless clauses. You can't change the following elements: The effect (permit or forbid) of the policy template. The principal referenced by the policy template. The resource referenced by the policy template.

Optional Parameters

Optional parameters can be passed as a params::Dict{String,<:Any}. Valid keys are:

  • "description": Specifies a new description to apply to the policy template.
source