Amazon Verified Permissions

2024/04/04 - Amazon Verified Permissions - 5 updated api methods

Changes  Adds GroupConfiguration field to Identity Source API's

CreateIdentitySource (updated) Link ¶
Changes (request)
{'configuration': {'cognitoUserPoolConfiguration': {'groupConfiguration': {'groupEntityType': 'string'}}}}

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.

Warning

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.

Note

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.

Note

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.

See also: AWS API Documentation

Request Syntax

client.create_identity_source(
    clientToken='string',
    policyStoreId='string',
    configuration={
        'cognitoUserPoolConfiguration': {
            'userPoolArn': 'string',
            'clientIds': [
                'string',
            ],
            'groupConfiguration': {
                'groupEntityType': 'string'
            }
        }
    },
    principalEntityType='string'
)
type clientToken

string

param 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 ConflictException 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 of ClientToken .

This field is autopopulated if not provided.

type policyStoreId

string

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

type configuration

dict

param configuration

[REQUIRED]

Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.

Note

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 .

  • cognitoUserPoolConfiguration (dict) --

    Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool and one or more application client IDs.

    Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

    • userPoolArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

      Example: "UserPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

    • clientIds (list) --

      The unique application client IDs that are associated with the specified Amazon Cognito user pool.

      Example: "ClientIds": ["&ExampleCogClientId;"]

      • (string) --

    • groupConfiguration (dict) --

      The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

      • groupEntityType (string) -- [REQUIRED]

        The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup .

type principalEntityType

string

param principalEntityType

Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.

rtype

dict

returns

Response Syntax

{
    'createdDate': datetime(2015, 1, 1),
    'identitySourceId': 'string',
    'lastUpdatedDate': datetime(2015, 1, 1),
    'policyStoreId': 'string'
}

Response Structure

  • (dict) --

    • createdDate (datetime) --

      The date and time the identity source was originally created.

    • identitySourceId (string) --

      The unique ID of the new identity source.

    • lastUpdatedDate (datetime) --

      The date and time the identity source was most recently updated.

    • policyStoreId (string) --

      The ID of the policy store that contains the identity source.

GetIdentitySource (updated) Link ¶
Changes (response)
{'configuration': {'cognitoUserPoolConfiguration': {'groupConfiguration': {'groupEntityType': 'string'}}}}

Retrieves the details about the specified identity source.

See also: AWS API Documentation

Request Syntax

client.get_identity_source(
    policyStoreId='string',
    identitySourceId='string'
)
type policyStoreId

string

param policyStoreId

[REQUIRED]

Specifies the ID of the policy store that contains the identity source you want information about.

type identitySourceId

string

param identitySourceId

[REQUIRED]

Specifies the ID of the identity source you want information about.

rtype

dict

returns

Response Syntax

{
    'createdDate': datetime(2015, 1, 1),
    'details': {
        'clientIds': [
            'string',
        ],
        'userPoolArn': 'string',
        'discoveryUrl': 'string',
        'openIdIssuer': 'COGNITO'
    },
    'identitySourceId': 'string',
    'lastUpdatedDate': datetime(2015, 1, 1),
    'policyStoreId': 'string',
    'principalEntityType': 'string',
    'configuration': {
        'cognitoUserPoolConfiguration': {
            'userPoolArn': 'string',
            'clientIds': [
                'string',
            ],
            'issuer': 'string',
            'groupConfiguration': {
                'groupEntityType': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • createdDate (datetime) --

      The date and time that the identity source was originally created.

    • details (dict) --

      A structure that describes the configuration of the identity source.

      • clientIds (list) --

        The application client IDs associated with the specified Amazon Cognito user pool that are enabled for this identity source.

        • (string) --

      • userPoolArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Cognito user pool whose identities are accessible to this Verified Permissions policy store.

      • discoveryUrl (string) --

        The well-known URL that points to this user pool's OIDC discovery endpoint. This is a URL string in the following format. This URL replaces the placeholders for both the Amazon Web Services Region and the user pool identifier with those appropriate for this user pool.

        https://cognito-idp.*<region>* .amazonaws.com/*<user-pool-id>* /.well-known/openid-configuration

      • openIdIssuer (string) --

        A string that identifies the type of OIDC service represented by this identity source.

        At this time, the only valid value is cognito .

    • identitySourceId (string) --

      The ID of the identity source.

    • lastUpdatedDate (datetime) --

      The date and time that the identity source was most recently updated.

    • policyStoreId (string) --

      The ID of the policy store that contains the identity source.

    • principalEntityType (string) --

      The data type of principals generated for identities authenticated by this identity source.

    • configuration (dict) --

      Contains configuration information about an identity source.

      • cognitoUserPoolConfiguration (dict) --

        Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool, the policy store entity that you want to assign to user groups, and one or more application client IDs.

        Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

        • userPoolArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

          Example: "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

        • clientIds (list) --

          The unique application client IDs that are associated with the specified Amazon Cognito user pool.

          Example: "clientIds": ["&ExampleCogClientId;"]

          • (string) --

        • issuer (string) --

          The OpenID Connect (OIDC) issuer ID of the Amazon Cognito user pool that contains the identities to be authorized.

          Example: "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5"

        • groupConfiguration (dict) --

          The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

          • groupEntityType (string) --

            The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup .

IsAuthorizedWithToken (updated) Link ¶
Changes (response)
{'principal': {'entityId': 'string', 'entityType': 'string'}}

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.

Warning

If you specify the identityToken parameter, then this operation derives the principal from that token. You must not also include that principal in the entities parameter or the operation fails and reports a conflict between the two entity sources.

If you provide only an accessToken , then you can include the entity as part of the entities parameter to provide additional attributes.

At this time, Verified Permissions accepts tokens from only Amazon Cognito.

Verified Permissions validates each token that is specified in a request by checking its expiration date and its signature.

Warning

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.

See also: AWS API Documentation

Request Syntax

client.is_authorized_with_token(
    policyStoreId='string',
    identityToken='string',
    accessToken='string',
    action={
        'actionType': 'string',
        'actionId': 'string'
    },
    resource={
        'entityType': 'string',
        'entityId': 'string'
    },
    context={
        'contextMap': {
            'string': {
                'boolean': True|False,
                'entityIdentifier': {
                    'entityType': 'string',
                    'entityId': 'string'
                },
                'long': 123,
                'string': 'string',
                'set': [
                    {'... recursive ...'},
                ],
                'record': {
                    'string': {'... recursive ...'}
                }
            }
        }
    },
    entities={
        'entityList': [
            {
                'identifier': {
                    'entityType': 'string',
                    'entityId': 'string'
                },
                'attributes': {
                    'string': {
                        'boolean': True|False,
                        'entityIdentifier': {
                            'entityType': 'string',
                            'entityId': 'string'
                        },
                        'long': 123,
                        'string': 'string',
                        'set': [
                            {'... recursive ...'},
                        ],
                        'record': {
                            'string': {'... recursive ...'}
                        }
                    }
                },
                'parents': [
                    {
                        'entityType': 'string',
                        'entityId': 'string'
                    },
                ]
            },
        ]
    }
)
type policyStoreId

string

param policyStoreId

[REQUIRED]

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

type identityToken

string

param 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 , an identityToken , or both.

Must be an ID token. Verified Permissions returns an error if the token_use claim in the submitted token isn't id .

type accessToken

string

param 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 , an identityToken , or both.

Must be an access token. Verified Permissions returns an error if the token_use claim in the submitted token isn't access .

type action

dict

param action

Specifies the requested action to be authorized. Is the specified principal authorized to perform this action on the specified resource.

  • actionType (string) -- [REQUIRED]

    The type of an action.

  • actionId (string) -- [REQUIRED]

    The ID of an action.

type resource

dict

param resource

Specifies the resource for which the authorization decision is made. For example, is the principal allowed to perform the action on the resource?

  • entityType (string) -- [REQUIRED]

    The type of an entity.

    Example: "entityType":"*typeName* "

  • entityId (string) -- [REQUIRED]

    The identifier of an entity.

    "entityId":"*identifier* "

type context

dict

param context

Specifies additional context that can be used to make more granular authorization decisions.

  • contextMap (dict) --

    An list of attributes that are needed to successfully evaluate an authorization request. Each attribute in this array must include a map of a data type and its value.

    Example: "contextMap":{"<KeyName1>":{"boolean":true},"<KeyName2>":{"long":1234}}

    • (string) --

      • (dict) --

        The value of an attribute.

        Contains information about the runtime context for a request for which an authorization decision is made.

        This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

        • boolean (boolean) --

          An attribute value of Boolean type.

          Example: {"boolean": true}

        • entityIdentifier (dict) --

          An attribute value of type EntityIdentifier .

          Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

          • entityType (string) -- [REQUIRED]

            The type of an entity.

            Example: "entityType":"*typeName* "

          • entityId (string) -- [REQUIRED]

            The identifier of an entity.

            "entityId":"*identifier* "

        • long (integer) --

          An attribute value of Long type.

          Example: {"long": 0}

        • string (string) --

          An attribute value of String type.

          Example: {"string": "abc"}

        • set (list) --

          An attribute value of Set type.

          Example: {"set": [ {} ] }

        • record (dict) --

          An attribute value of Record type.

          Example: {"record": { "keyName": {} } }

          • (string) --

type entities

dict

param entities

Specifies the list of resources and their associated attributes that Verified Permissions can examine when evaluating the policies.

Note

You can include only resource and action entities in this parameter; you can't include principals.

  • The IsAuthorizedWithToken operation takes principal attributes from ** only ** the identityToken or accessToken passed to the operation.

  • For action entities, you can include only their Identifier and EntityType .

  • entityList (list) --

    An array of entities that are needed to successfully evaluate an authorization request. Each entity in this array must include an identifier for the entity, the attributes of the entity, and a list of any parent entities.

    • (dict) --

      Contains information about an entity that can be referenced in a Cedar policy.

      This data type is used as one of the fields in the EntitiesDefinition structure.

      { "identifier": { "entityType": "Photo", "entityId": "VacationPhoto94.jpg" }, "attributes": {}, "parents": [ { "entityType": "Album", "entityId": "alice_folder" } ] }

      • identifier (dict) -- [REQUIRED]

        The identifier of the entity.

        • entityType (string) -- [REQUIRED]

          The type of an entity.

          Example: "entityType":"*typeName* "

        • entityId (string) -- [REQUIRED]

          The identifier of an entity.

          "entityId":"*identifier* "

      • attributes (dict) --

        A list of attributes for the entity.

        • (string) --

          • (dict) --

            The value of an attribute.

            Contains information about the runtime context for a request for which an authorization decision is made.

            This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

            • boolean (boolean) --

              An attribute value of Boolean type.

              Example: {"boolean": true}

            • entityIdentifier (dict) --

              An attribute value of type EntityIdentifier .

              Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}

              • entityType (string) -- [REQUIRED]

                The type of an entity.

                Example: "entityType":"*typeName* "

              • entityId (string) -- [REQUIRED]

                The identifier of an entity.

                "entityId":"*identifier* "

            • long (integer) --

              An attribute value of Long type.

              Example: {"long": 0}

            • string (string) --

              An attribute value of String type.

              Example: {"string": "abc"}

            • set (list) --

              An attribute value of Set type.

              Example: {"set": [ {} ] }

            • record (dict) --

              An attribute value of Record type.

              Example: {"record": { "keyName": {} } }

              • (string) --

      • parents (list) --

        The parents in the hierarchy that contains the entity.

        • (dict) --

          Contains the identifier of an entity, including its ID and type.

          This data type is used as a request parameter for IsAuthorized operation, and as a response parameter for the CreatePolicy , GetPolicy , and UpdatePolicy operations.

          Example: {"entityId":"*string* ","entityType":"*string* "}

          • entityType (string) -- [REQUIRED]

            The type of an entity.

            Example: "entityType":"*typeName* "

          • entityId (string) -- [REQUIRED]

            The identifier of an entity.

            "entityId":"*identifier* "

rtype

dict

returns

Response Syntax

{
    'decision': 'ALLOW'|'DENY',
    'determiningPolicies': [
        {
            'policyId': 'string'
        },
    ],
    'errors': [
        {
            'errorDescription': 'string'
        },
    ],
    'principal': {
        'entityType': 'string',
        'entityId': 'string'
    }
}

Response Structure

  • (dict) --

    • decision (string) --

      An authorization decision that indicates if the authorization request should be allowed or denied.

    • determiningPolicies (list) --

      The list of determining policies used to make the authorization decision. For example, if there are multiple matching policies, where at least one is a forbid policy, then because forbid always overrides permit the forbid policies are the determining policies. If all matching policies are permit policies, then those policies are the determining policies. When no policies match and the response is the default DENY, there are no determining policies.

      • (dict) --

        Contains information about one of the policies that determined an authorization decision.

        This data type is used as an element in a response parameter for the IsAuthorized , BatchIsAuthorized , and IsAuthorizedWithToken operations.

        Example: "determiningPolicies":[{"policyId":"SPEXAMPLEabcdefg111111"}]

        • policyId (string) --

          The Id of a policy that determined to an authorization decision.

          Example: "policyId":"SPEXAMPLEabcdefg111111"

    • errors (list) --

      Errors that occurred while making an authorization decision. For example, a policy references an entity or entity attribute that does not exist in the slice.

    • principal (dict) --

      The identifier of the principal in the ID or access token.

      • entityType (string) --

        The type of an entity.

        Example: "entityType":"*typeName* "

      • entityId (string) --

        The identifier of an entity.

        "entityId":"*identifier* "

ListIdentitySources (updated) Link ¶
Changes (response)
{'identitySources': {'configuration': {'cognitoUserPoolConfiguration': {'groupConfiguration': {'groupEntityType': 'string'}}}}}

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

See also: AWS API Documentation

Request Syntax

client.list_identity_sources(
    policyStoreId='string',
    nextToken='string',
    maxResults=123,
    filters=[
        {
            'principalEntityType': 'string'
        },
    ]
)
type policyStoreId

string

param policyStoreId

[REQUIRED]

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

type nextToken

string

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

type maxResults

integer

param maxResults

Specifies the total number of results that you want included in each response. 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 set of 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.

If you do not specify this parameter, the operation defaults to 10 identity sources per response. You can specify a maximum of 200 identity sources per response.

type filters

list

param filters

Specifies characteristics of an identity source that you can use to limit the output to matching identity sources.

  • (dict) --

    A structure that defines characteristics of an identity source that you can use to filter.

    This data type is a request parameter for the ListIdentityStores operation.

    • principalEntityType (string) --

      The Cedar entity type of the principals returned by the identity provider (IdP) associated with this identity source.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'identitySources': [
        {
            'createdDate': datetime(2015, 1, 1),
            'details': {
                'clientIds': [
                    'string',
                ],
                'userPoolArn': 'string',
                'discoveryUrl': 'string',
                'openIdIssuer': 'COGNITO'
            },
            'identitySourceId': 'string',
            'lastUpdatedDate': datetime(2015, 1, 1),
            'policyStoreId': 'string',
            'principalEntityType': 'string',
            'configuration': {
                'cognitoUserPoolConfiguration': {
                    'userPoolArn': 'string',
                    'clientIds': [
                        'string',
                    ],
                    'issuer': 'string',
                    'groupConfiguration': {
                        'groupEntityType': 'string'
                    }
                }
            }
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null . This indicates that this is the last page of results.

    • identitySources (list) --

      The list of identity sources stored in the specified policy store.

      • (dict) --

        A structure that defines an identity source.

        This data type is a response parameter to the ListIdentitySources operation.

        • createdDate (datetime) --

          The date and time the identity source was originally created.

        • details (dict) --

          A structure that contains the details of the associated identity provider (IdP).

          • clientIds (list) --

            The application client IDs associated with the specified Amazon Cognito user pool that are enabled for this identity source.

            • (string) --

          • userPoolArn (string) --

            The Amazon Cognito user pool whose identities are accessible to this Verified Permissions policy store.

          • discoveryUrl (string) --

            The well-known URL that points to this user pool's OIDC discovery endpoint. This is a URL string in the following format. This URL replaces the placeholders for both the Amazon Web Services Region and the user pool identifier with those appropriate for this user pool.

            https://cognito-idp.*<region>* .amazonaws.com/*<user-pool-id>* /.well-known/openid-configuration

          • openIdIssuer (string) --

            A string that identifies the type of OIDC service represented by this identity source.

            At this time, the only valid value is cognito .

        • identitySourceId (string) --

          The unique identifier of the identity source.

        • lastUpdatedDate (datetime) --

          The date and time the identity source was most recently updated.

        • policyStoreId (string) --

          The identifier of the policy store that contains the identity source.

        • principalEntityType (string) --

          The Cedar entity type of the principals returned from the IdP associated with this identity source.

        • configuration (dict) --

          Contains configuration information about an identity source.

          • cognitoUserPoolConfiguration (dict) --

            Contains configuration details of a Amazon Cognito user pool that Verified Permissions can use as a source of authenticated identities as entities. It specifies the Amazon Resource Name (ARN) of a Amazon Cognito user pool, the policy store entity that you want to assign to user groups, and one or more application client IDs.

            Example: "configuration":{"cognitoUserPoolConfiguration":{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds": ["a1b2c3d4e5f6g7h8i9j0kalbmc"],"groupConfiguration": {"groupEntityType": "MyCorp::Group"}}}

            • userPoolArn (string) --

              The Amazon Resource Name (ARN) of the Amazon Cognito user pool that contains the identities to be authorized.

              Example: "userPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5"

            • clientIds (list) --

              The unique application client IDs that are associated with the specified Amazon Cognito user pool.

              Example: "clientIds": ["&ExampleCogClientId;"]

              • (string) --

            • issuer (string) --

              The OpenID Connect (OIDC) issuer ID of the Amazon Cognito user pool that contains the identities to be authorized.

              Example: "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_1a2b3c4d5"

            • groupConfiguration (dict) --

              The type of entity that a policy store maps to groups from an Amazon Cognito user pool identity source.

              • groupEntityType (string) --

                The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup .

UpdateIdentitySource (updated) Link ¶
Changes (request)
{'updateConfiguration': {'cognitoUserPoolConfiguration': {'groupConfiguration': {'groupEntityType': 'string'}}}}

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.

Note

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.

See also: AWS API Documentation

Request Syntax

client.update_identity_source(
    policyStoreId='string',
    identitySourceId='string',
    updateConfiguration={
        'cognitoUserPoolConfiguration': {
            'userPoolArn': 'string',
            'clientIds': [
                'string',
            ],
            'groupConfiguration': {
                'groupEntityType': 'string'
            }
        }
    },
    principalEntityType='string'
)
type policyStoreId

string

param policyStoreId

[REQUIRED]

Specifies the ID of the policy store that contains the identity source that you want to update.

type identitySourceId

string

param identitySourceId

[REQUIRED]

Specifies the ID of the identity source that you want to update.

type updateConfiguration

dict

param updateConfiguration

[REQUIRED]

Specifies the details required to communicate with the identity provider (IdP) associated with this identity source.

Note

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 .

  • cognitoUserPoolConfiguration (dict) --

    Contains configuration details of a Amazon Cognito user pool.

    • userPoolArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Amazon Cognito user pool associated with this identity source.

    • clientIds (list) --

      The client ID of an app client that is configured for the specified Amazon Cognito user pool.

      • (string) --

    • groupConfiguration (dict) --

      The configuration of the user groups from an Amazon Cognito user pool identity source.

      • groupEntityType (string) -- [REQUIRED]

        The name of the schema entity type that's mapped to the user pool group. Defaults to AWS::CognitoGroup .

type principalEntityType

string

param principalEntityType

Specifies the data type of principals generated for identities authenticated by the identity source.

rtype

dict

returns

Response Syntax

{
    'createdDate': datetime(2015, 1, 1),
    'identitySourceId': 'string',
    'lastUpdatedDate': datetime(2015, 1, 1),
    'policyStoreId': 'string'
}

Response Structure

  • (dict) --

    • createdDate (datetime) --

      The date and time that the updated identity source was originally created.

    • identitySourceId (string) --

      The ID of the updated identity source.

    • lastUpdatedDate (datetime) --

      The date and time that the identity source was most recently updated.

    • policyStoreId (string) --

      The ID of the policy store that contains the updated identity source.