Access Analyzer

2022/11/30 - Access Analyzer - 3 updated api methods

Changes  This release adds support for S3 cross account access points. IAM Access Analyzer will now produce public or cross account findings when it detects bucket delegation to external account access points.

GetFinding (updated) Link ¶
Changes (response)
{'finding': {'sources': {'detail': {'accessPointAccount': 'string'},
                         'type': {'S3_ACCESS_POINT_ACCOUNT'}}}}

Retrieves information about the specified finding.

See also: AWS API Documentation

Request Syntax

client.get_finding(
    analyzerArn='string',
    id='string'
)
type analyzerArn

string

param analyzerArn

[REQUIRED]

The ARN of the analyzer that generated the finding.

type id

string

param id

[REQUIRED]

The ID of the finding to retrieve.

rtype

dict

returns

Response Syntax

{
    'finding': {
        'id': 'string',
        'principal': {
            'string': 'string'
        },
        'action': [
            'string',
        ],
        'resource': 'string',
        'isPublic': True|False,
        'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic',
        'condition': {
            'string': 'string'
        },
        'createdAt': datetime(2015, 1, 1),
        'analyzedAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1),
        'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
        'resourceOwnerAccount': 'string',
        'error': 'string',
        'sources': [
            {
                'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                'detail': {
                    'accessPointArn': 'string',
                    'accessPointAccount': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --

    The response to the request.

    • finding (dict) --

      A finding object that contains finding details.

      • id (string) --

        The ID of the finding.

      • principal (dict) --

        The external principal that access to a resource within the zone of trust.

        • (string) --

          • (string) --

      • action (list) --

        The action in the analyzed policy statement that an external principal has permission to use.

        • (string) --

      • resource (string) --

        The resource that an external principal has access to.

      • isPublic (boolean) --

        Indicates whether the policy that generated the finding allows public access to the resource.

      • resourceType (string) --

        The type of the resource identified in the finding.

      • condition (dict) --

        The condition in the analyzed policy statement that resulted in a finding.

        • (string) --

          • (string) --

      • createdAt (datetime) --

        The time at which the finding was generated.

      • analyzedAt (datetime) --

        The time at which the resource was analyzed.

      • updatedAt (datetime) --

        The time at which the finding was updated.

      • status (string) --

        The current status of the finding.

      • resourceOwnerAccount (string) --

        The Amazon Web Services account ID that owns the resource.

      • error (string) --

        An error.

      • sources (list) --

        The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

        • (dict) --

          The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • type (string) --

            Indicates the type of access that generated the finding.

          • detail (dict) --

            Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

            • accessPointArn (string) --

              The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

            • accessPointAccount (string) --

              The account of the cross-account access point that generated the finding.

ListAccessPreviewFindings (updated) Link ¶
Changes (response)
{'findings': {'sources': {'detail': {'accessPointAccount': 'string'},
                          'type': {'S3_ACCESS_POINT_ACCOUNT'}}}}

Retrieves a list of access preview findings generated by the specified access preview.

See also: AWS API Documentation

Request Syntax

client.list_access_preview_findings(
    accessPreviewId='string',
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    nextToken='string',
    maxResults=123
)
type accessPreviewId

string

param accessPreviewId

[REQUIRED]

The unique ID for the access preview.

type analyzerArn

string

param analyzerArn

[REQUIRED]

The ARN of the analyzer used to generate the access.

type filter

dict

param filter

Criteria to filter the returned findings.

  • (string) --

    • (dict) --

      The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

      • eq (list) --

        An "equals" operator to match for the filter used to create the rule.

        • (string) --

      • neq (list) --

        A "not equals" operator to match for the filter used to create the rule.

        • (string) --

      • contains (list) --

        A "contains" operator to match for the filter used to create the rule.

        • (string) --

      • exists (boolean) --

        An "exists" operator to match for the filter used to create the rule.

type nextToken

string

param nextToken

A token used for pagination of results returned.

type maxResults

integer

param maxResults

The maximum number of results to return in the response.

rtype

dict

returns

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'existingFindingId': 'string',
            'existingFindingStatus': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'condition': {
                'string': 'string'
            },
            'resource': 'string',
            'isPublic': True|False,
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic',
            'createdAt': datetime(2015, 1, 1),
            'changeType': 'CHANGED'|'NEW'|'UNCHANGED',
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • findings (list) --

      A list of access preview findings that match the specified filter criteria.

      • (dict) --

        An access preview finding generated by the access preview.

        • id (string) --

          The ID of the access preview finding. This ID uniquely identifies the element in the list of access preview findings and is not related to the finding ID in Access Analyzer.

        • existingFindingId (string) --

          The existing ID of the finding in IAM Access Analyzer, provided only for existing findings.

        • existingFindingStatus (string) --

          The existing status of the finding, provided only for existing findings.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to perform.

          • (string) --

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • resource (string) --

          The resource that an external principal has access to. This is the resource associated with the access preview.

        • isPublic (boolean) --

          Indicates whether the policy that generated the finding allows public access to the resource.

        • resourceType (string) --

          The type of the resource that can be accessed in the finding.

        • createdAt (datetime) --

          The time at which the access preview finding was created.

        • changeType (string) --

          Provides context on how the access preview finding compares to existing access identified in IAM Access Analyzer.

          • New - The finding is for newly-introduced access.

          • Unchanged - The preview finding is an existing finding that would remain unchanged.

          • Changed - The preview finding is an existing finding with a change in status.

          For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • status (string) --

          The preview status of the finding. This is what the status of the finding would be after permissions deployment. For example, a Changed finding with preview status Resolved and existing status Active indicates the existing Active finding would become Resolved as a result of the proposed permissions change.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource. For most Amazon Web Services resources, the owning account is the account in which the resource was created.

        • error (string) --

          An error.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

    • nextToken (string) --

      A token used for pagination of results returned.

ListFindings (updated) Link ¶
Changes (response)
{'findings': {'sources': {'detail': {'accessPointAccount': 'string'},
                          'type': {'S3_ACCESS_POINT_ACCOUNT'}}}}

Retrieves a list of findings generated by the specified analyzer.

To learn about filter keys that you can use to retrieve a list of findings, see IAM Access Analyzer filter keys in the IAM User Guide .

See also: AWS API Documentation

Request Syntax

client.list_findings(
    analyzerArn='string',
    filter={
        'string': {
            'eq': [
                'string',
            ],
            'neq': [
                'string',
            ],
            'contains': [
                'string',
            ],
            'exists': True|False
        }
    },
    sort={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    },
    nextToken='string',
    maxResults=123
)
type analyzerArn

string

param analyzerArn

[REQUIRED]

The ARN of the analyzer to retrieve findings from.

type filter

dict

param filter

A filter to match for the findings to return.

  • (string) --

    • (dict) --

      The criteria to use in the filter that defines the archive rule. For more information on available filter keys, see IAM Access Analyzer filter keys.

      • eq (list) --

        An "equals" operator to match for the filter used to create the rule.

        • (string) --

      • neq (list) --

        A "not equals" operator to match for the filter used to create the rule.

        • (string) --

      • contains (list) --

        A "contains" operator to match for the filter used to create the rule.

        • (string) --

      • exists (boolean) --

        An "exists" operator to match for the filter used to create the rule.

type sort

dict

param sort

The sort order for the findings returned.

  • attributeName (string) --

    The name of the attribute to sort on.

  • orderBy (string) --

    The sort order, ascending or descending.

type nextToken

string

param nextToken

A token used for pagination of results returned.

type maxResults

integer

param maxResults

The maximum number of results to return in the response.

rtype

dict

returns

Response Syntax

{
    'findings': [
        {
            'id': 'string',
            'principal': {
                'string': 'string'
            },
            'action': [
                'string',
            ],
            'resource': 'string',
            'isPublic': True|False,
            'resourceType': 'AWS::S3::Bucket'|'AWS::IAM::Role'|'AWS::SQS::Queue'|'AWS::Lambda::Function'|'AWS::Lambda::LayerVersion'|'AWS::KMS::Key'|'AWS::SecretsManager::Secret'|'AWS::EFS::FileSystem'|'AWS::EC2::Snapshot'|'AWS::ECR::Repository'|'AWS::RDS::DBSnapshot'|'AWS::RDS::DBClusterSnapshot'|'AWS::SNS::Topic',
            'condition': {
                'string': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'analyzedAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'status': 'ACTIVE'|'ARCHIVED'|'RESOLVED',
            'resourceOwnerAccount': 'string',
            'error': 'string',
            'sources': [
                {
                    'type': 'POLICY'|'BUCKET_ACL'|'S3_ACCESS_POINT'|'S3_ACCESS_POINT_ACCOUNT',
                    'detail': {
                        'accessPointArn': 'string',
                        'accessPointAccount': 'string'
                    }
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The response to the request.

    • findings (list) --

      A list of findings retrieved from the analyzer that match the filter criteria specified, if any.

      • (dict) --

        Contains information about a finding.

        • id (string) --

          The ID of the finding.

        • principal (dict) --

          The external principal that has access to a resource within the zone of trust.

          • (string) --

            • (string) --

        • action (list) --

          The action in the analyzed policy statement that an external principal has permission to use.

          • (string) --

        • resource (string) --

          The resource that the external principal has access to.

        • isPublic (boolean) --

          Indicates whether the finding reports a resource that has a policy that allows public access.

        • resourceType (string) --

          The type of the resource that the external principal has access to.

        • condition (dict) --

          The condition in the analyzed policy statement that resulted in a finding.

          • (string) --

            • (string) --

        • createdAt (datetime) --

          The time at which the finding was created.

        • analyzedAt (datetime) --

          The time at which the resource-based policy that generated the finding was analyzed.

        • updatedAt (datetime) --

          The time at which the finding was most recently updated.

        • status (string) --

          The status of the finding.

        • resourceOwnerAccount (string) --

          The Amazon Web Services account ID that owns the resource.

        • error (string) --

          The error that resulted in an Error finding.

        • sources (list) --

          The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

          • (dict) --

            The source of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.

            • type (string) --

              Indicates the type of access that generated the finding.

            • detail (dict) --

              Includes details about how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.

              • accessPointArn (string) --

                The ARN of the access point that generated the finding. The ARN format depends on whether the ARN represents an access point or a multi-region access point.

              • accessPointAccount (string) --

                The account of the cross-account access point that generated the finding.

    • nextToken (string) --

      A token used for pagination of results returned.