/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.verifiedpermissions; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.verifiedpermissions.model.*; /** * Interface for accessing Amazon Verified Permissions. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.verifiedpermissions.AbstractAmazonVerifiedPermissions} instead. *

*

*

* 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. *

* *

* When you write Cedar policies that reference principals, resources and actions, you can define the unique identifiers * used for each of those elements. We strongly recommend that you follow these best practices: *

* *
*

* 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: *

* */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonVerifiedPermissions { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "verifiedpermissions"; /** *

* 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::"<CognitoUserPoolIdentifier>|<CognitoClientId> *

*

* 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. *

*
* * @param createIdentitySourceRequest * @return Result of the CreateIdentitySource operation returned by the service. * @throws ValidationException * The request failed because one or more input parameters don't satisfy their constraint requirements. The * output is provided as a list of fields and a reason for each field that isn't valid.

*

* The possible reasons include the following: *

*