Create Identity Source
verifiedpermissions_create_identity_source | R Documentation |
Adds an identity source to a policy store–an Amazon Cognito user pool or OpenID Connect (OIDC) identity provider (IdP)¶
Description¶
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 is_authorized_with_token
or batch_is_authorized_with_token
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 exampleMyCorp::User::us-east-1_EXAMPLE|a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
. -
OpenID Connect (OIDC) provider:
Namespace::[Entity type]::[principalIdClaim]|[user principal attribute]
, for exampleMyCorp::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.
Usage¶
verifiedpermissions_create_identity_source(clientToken, policyStoreId,
configuration, principalEntityType)
Arguments¶
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 anConflictException
error.Verified Permissions recognizes a
ClientToken
for eight hours. After eight hours, the next request with the same parameters performs the operation again regardless of the value ofClientToken
.policyStoreId
[required] 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.
configuration
[required] Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.
principalEntityType
Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.
Value¶
A list with the following syntax:
list(
createdDate = as.POSIXct(
"2015-01-01"
),
identitySourceId = "string",
lastUpdatedDate = as.POSIXct(
"2015-01-01"
),
policyStoreId = "string"
)
Request syntax¶
svc$create_identity_source(
clientToken = "string",
policyStoreId = "string",
configuration = list(
cognitoUserPoolConfiguration = list(
userPoolArn = "string",
clientIds = list(
"string"
),
groupConfiguration = list(
groupEntityType = "string"
)
),
openIdConnectConfiguration = list(
issuer = "string",
entityIdPrefix = "string",
groupConfiguration = list(
groupClaim = "string",
groupEntityType = "string"
),
tokenSelection = list(
accessTokenOnly = list(
principalIdClaim = "string",
audiences = list(
"string"
)
),
identityTokenOnly = list(
principalIdClaim = "string",
clientIds = list(
"string"
)
)
)
)
),
principalEntityType = "string"
)