VerifiedPermissions class

Amazon Verified Permissions is a permissions management service from Amazon Web Services. You can use Verified Permissions to manage permissions for your application, and authorize user access based on those permissions. Using Verified Permissions, application developers can grant access based on information about the users, resources, and requested actions. You can also evaluate additional information like group membership, attributes of the resources, and session context, such as time of request and IP addresses. Verified Permissions manages these permissions by letting you create and store authorization policies for your applications, such as consumer-facing web sites and enterprise business systems.

Verified Permissions uses Cedar as the policy language to express your permission requirements. Cedar supports both role-based access control (RBAC) and attribute-based access control (ABAC) authorization models.

For more information about configuring, administering, and using Amazon Verified Permissions in your applications, see the Amazon Verified Permissions User Guide.

For more information about the Cedar policy language, see the Cedar Policy Language Guide.

  • Use values like universally unique identifiers (UUIDs) for all principal and resource identifiers.

    For example, if user jane leaves the company, and you later let someone else use the name jane, then that new user automatically gets access to everything granted by policies that still reference User::"jane". Cedar can’t distinguish between the new user and the old. This applies to both principal and resource identifiers. Always use identifiers that are guaranteed unique and never reused to ensure that you don’t unintentionally grant access because of the presence of an old identifier in a policy.

    Where you use a UUID for an entity, we recommend that you follow it with the // comment specifier and the ‘friendly’ name of your entity. This helps to make your policies easier to understand. For example: principal == User::"a1b2c3d4-e5f6-a1b2-c3d4-EXAMPLE11111", // alice

  • Do not include personally identifying, confidential, or sensitive information as part of the unique identifier for your principals or resources. These identifiers are included in log entries shared in CloudTrail trails.
Several operations return structures that appear similar, but have different purposes. As new functionality is added to the product, the structure used in a parameter of one operation might need to change in a way that wouldn't make sense for the same parameter in a different operation. To help you understand the purpose of each, the following naming convention is used for the structures:
  • Parameter type structures that end in Detail are used in Get operations.
  • Parameter type structures that end in Item are used in List operations.
  • Parameter type structures that use neither suffix are used in the mutating (create and update) operations.

Constructors

VerifiedPermissions({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchGetPolicy({required List<BatchGetPolicyInputItem> requests}) Future<BatchGetPolicyOutput>
Retrieves information about a group (batch) of policies.
batchIsAuthorized({required String policyStoreId, required List<BatchIsAuthorizedInputItem> requests, EntitiesDefinition? entities}) Future<BatchIsAuthorizedOutput>
Makes a series of decisions about multiple authorization requests for one principal or resource. Each request contains the equivalent content of an IsAuthorized request: principal, action, resource, and context. Either the principal or the resource parameter must be identical across all requests. For example, Verified Permissions won't evaluate a pair of requests where bob views photo1 and alice views photo2. Authorization of bob to view photo1 and photo2, or bob and alice to view photo1, are valid batches.
batchIsAuthorizedWithToken({required String policyStoreId, required List<BatchIsAuthorizedWithTokenInputItem> requests, String? accessToken, EntitiesDefinition? entities, String? identityToken}) Future<BatchIsAuthorizedWithTokenOutput>
Makes a series of decisions about multiple authorization requests for one token. The principal in this request comes from an external identity source in the form of an identity or access token, formatted as a JSON web token (JWT). The information in the parameters can also define additional context that Verified Permissions can include in the evaluations.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createIdentitySource({required Configuration configuration, required String policyStoreId, String? clientToken, String? principalEntityType}) Future<CreateIdentitySourceOutput>
Adds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) identity provider (IdP).
createPolicy({required PolicyDefinition definition, required String policyStoreId, String? clientToken, String? name}) Future<CreatePolicyOutput>
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.
createPolicyStore({required ValidationSettings validationSettings, String? clientToken, DeletionProtection? deletionProtection, String? description, EncryptionSettings? encryptionSettings, Map<String, String>? tags}) Future<CreatePolicyStoreOutput>
Creates a policy store. A policy store is a container for policy resources.
createPolicyStoreAlias({required String aliasName, required String policyStoreId}) Future<CreatePolicyStoreAliasOutput>
Creates a policy store alias for the specified policy store. A policy store alias is an alternative identifier that you can use to reference a policy store in API operations.
createPolicyTemplate({required String policyStoreId, required String statement, String? clientToken, String? description, String? name}) Future<CreatePolicyTemplateOutput>
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.
deleteIdentitySource({required String identitySourceId, required String policyStoreId}) Future<void>
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.
deletePolicy({required String policyId, required String policyStoreId}) Future<void>
Deletes the specified policy from the policy store.
deletePolicyStore({required String policyStoreId}) Future<void>
Deletes the specified policy store.
deletePolicyStoreAlias({required String aliasName, DeletionMode? deletionMode}) Future<void>
Deletes the specified policy store alias.
deletePolicyTemplate({required String policyStoreId, required String policyTemplateId}) Future<void>
Deletes the specified policy template from the policy store.
getIdentitySource({required String identitySourceId, required String policyStoreId}) Future<GetIdentitySourceOutput>
Retrieves the details about the specified identity source.
getPolicy({required String policyId, required String policyStoreId}) Future<GetPolicyOutput>
Retrieves information about the specified policy.
getPolicyStore({required String policyStoreId, bool? tags}) Future<GetPolicyStoreOutput>
Retrieves details about a policy store.
getPolicyStoreAlias({required String aliasName}) Future<GetPolicyStoreAliasOutput>
Retrieves details about the specified policy store alias.
getPolicyTemplate({required String policyStoreId, required String policyTemplateId}) Future<GetPolicyTemplateOutput>
Retrieve the details for the specified policy template in the specified policy store.
getSchema({required String policyStoreId}) Future<GetSchemaOutput>
Retrieve the details for the specified schema in the specified policy store.
isAuthorized({required String policyStoreId, ActionIdentifier? action, ContextDefinition? context, EntitiesDefinition? entities, EntityIdentifier? principal, EntityIdentifier? resource}) Future<IsAuthorizedOutput>
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.
isAuthorizedWithToken({required String policyStoreId, String? accessToken, ActionIdentifier? action, ContextDefinition? context, EntitiesDefinition? entities, String? identityToken, EntityIdentifier? resource}) Future<IsAuthorizedWithTokenOutput>
Makes an authorization decision about a service request described in the parameters. The principal in this request comes from an external identity source in the form of an identity token formatted as a JSON web token (JWT). 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.
listIdentitySources({required String policyStoreId, List<IdentitySourceFilter>? filters, int? maxResults, String? nextToken}) Future<ListIdentitySourcesOutput>
Returns a paginated list of all of the identity sources defined in the specified policy store.
listPolicies({required String policyStoreId, PolicyFilter? filter, int? maxResults, String? nextToken}) Future<ListPoliciesOutput>
Returns a paginated list of all policies stored in the specified policy store.
listPolicyStoreAliases({PolicyStoreAliasFilter? filter, int? maxResults, String? nextToken}) Future<ListPolicyStoreAliasesOutput>
Returns a paginated list of all policy store aliases in the calling Amazon Web Services account.
listPolicyStores({int? maxResults, String? nextToken}) Future<ListPolicyStoresOutput>
Returns a paginated list of all policy stores in the calling Amazon Web Services account.
listPolicyTemplates({required String policyStoreId, int? maxResults, String? nextToken}) Future<ListPolicyTemplatesOutput>
Returns a paginated list of all policy templates in the specified policy store.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceOutput>
Returns the tags associated with the specified Amazon Verified Permissions resource. In Verified Permissions, policy stores can be tagged.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putSchema({required SchemaDefinition definition, required String policyStoreId}) Future<PutSchemaOutput>
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.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Assigns one or more tags (key-value pairs) to the specified Amazon Verified Permissions resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. In Verified Permissions, policy stores can be tagged.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes one or more tags from the specified Amazon Verified Permissions resource. In Verified Permissions, policy stores can be tagged.
updateIdentitySource({required String identitySourceId, required String policyStoreId, required UpdateConfiguration updateConfiguration, String? principalEntityType}) Future<UpdateIdentitySourceOutput>
Updates the specified identity source to use a new identity provider (IdP), or to change the mapping of identities from the IdP to a different principal entity type.
updatePolicy({required String policyId, required String policyStoreId, UpdatePolicyDefinition? definition, String? name}) Future<UpdatePolicyOutput>
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.
updatePolicyStore({required String policyStoreId, required ValidationSettings validationSettings, DeletionProtection? deletionProtection, String? description}) Future<UpdatePolicyStoreOutput>
Modifies the validation setting for a policy store.
updatePolicyTemplate({required String policyStoreId, required String policyTemplateId, required String statement, String? description, String? name}) Future<UpdatePolicyTemplateOutput>
Updates the specified policy template. You can update only the description and the some elements of the policyBody.

Operators

operator ==(Object other) bool
The equality operator.
inherited