Skip to main content

identity_sources

Creates, updates, deletes, gets or lists an identity_sources resource.

Overview

Nameidentity_sources
TypeResource
Idaws.verifiedpermissions.identity_sources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
configurationobjectContains configuration information about an identity source.
created_datestring (date-time)The date and time that the identity source was originally created.
detailsobjectA structure that describes the configuration of the identity source.
identity_source_idstringThe ID of the identity source. (pattern: <code>[a-zA-Z0-9-]*</code>)
last_updated_datestring (date-time)The date and time that the identity source was most recently updated.
policy_store_idstringThe ID of the policy store that contains the identity source. (pattern: <code>[a-zA-Z0-9-/_]*</code>)
principal_entity_typestringThe data type of principals generated for identities authenticated by this identity source. (pattern: <code>.*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_sourceselectregionRetrieves the details about the specified identity source.
list_identity_sourcesselectregionReturns a paginated list of all of the identity sources defined in the specified policy store.
create_identity_sourceinsertregion, policyStoreId, configurationAdds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) 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 or BatchIsAuthorizedWithToken API operations. These identities take the form of tokens that contain claims about the user, such as IDs, attributes and group memberships. Identity sources provide identity (ID) tokens and access tokens. Verified Permissions derives information about your user and session from token claims. Access tokens provide action context to your policies, and ID tokens provide principal Attributes. Tokens from an identity source user continue to be usable until they expire. Token revocation and resource deletion have no effect on the validity of a token in your policy store To reference a user from this identity source in your Cedar policies, refer to the following syntax examples. Amazon Cognito user pool: Namespace::[Entity type]::[User pool ID]|[user principal attribute], for example MyCorp::User::us-east-1_EXAMPLE|a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. OpenID Connect (OIDC) provider: Namespace::[Entity type]::[entityIdPrefix]|[user principal attribute], for example MyCorp::User::MyOIDCProvider|a1b2c3d4-5678-90ab-cdef-EXAMPLE22222. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.
update_identity_sourceupdateregion, policyStoreId, identitySourceId, updateConfigurationUpdates 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. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.
delete_identity_sourcedeleteregionDeletes 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the details about the specified identity source.

SELECT
configuration,
created_date,
details,
identity_source_id,
last_updated_date,
policy_store_id,
principal_entity_type
FROM aws.verifiedpermissions.identity_sources
WHERE region = '{{ region }}' -- required
;

INSERT examples

Adds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) 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 or BatchIsAuthorizedWithToken API operations. These identities take the form of tokens that contain claims about the user, such as IDs, attributes and group memberships. Identity sources provide identity (ID) tokens and access tokens. Verified Permissions derives information about your user and session from token claims. Access tokens provide action context to your policies, and ID tokens provide principal Attributes. Tokens from an identity source user continue to be usable until they expire. Token revocation and resource deletion have no effect on the validity of a token in your policy store To reference a user from this identity source in your Cedar policies, refer to the following syntax examples. Amazon Cognito user pool: Namespace::[Entity type]::[User pool ID]|[user principal attribute], for example MyCorp::User::us-east-1_EXAMPLE|a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. OpenID Connect (OIDC) provider: Namespace::[Entity type]::[entityIdPrefix]|[user principal attribute], for example MyCorp::User::MyOIDCProvider|a1b2c3d4-5678-90ab-cdef-EXAMPLE22222. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

INSERT INTO aws.verifiedpermissions.identity_sources (
clientToken,
policyStoreId,
configuration,
principalEntityType,
region
)
SELECT
'{{ clientToken }}',
'{{ policyStoreId }}' /* required */,
'{{ configuration }}' /* required */,
'{{ principalEntityType }}',
'{{ region }}'
RETURNING
created_date,
identity_source_id,
last_updated_date,
policy_store_id
;

UPDATE examples

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. Verified Permissions is eventually consistent . It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.

UPDATE aws.verifiedpermissions.identity_sources
SET
policyStoreId = '{{ policyStoreId }}',
identitySourceId = '{{ identitySourceId }}',
updateConfiguration = '{{ updateConfiguration }}',
principalEntityType = '{{ principalEntityType }}'
WHERE
region = '{{ region }}' --required
AND policyStoreId = '{{ policyStoreId }}' --required
AND identitySourceId = '{{ identitySourceId }}' --required
AND updateConfiguration = '{{ updateConfiguration }}' --required
RETURNING
created_date,
identity_source_id,
last_updated_date,
policy_store_id;

DELETE examples

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.

DELETE FROM aws.verifiedpermissions.identity_sources
WHERE region = '{{ region }}' --required
;