cartography 0.102.0rc2__py3-none-any.whl → 0.103.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cartography might be problematic. Click here for more details.
- cartography/__main__.py +1 -2
- cartography/_version.py +2 -2
- cartography/cli.py +302 -253
- cartography/client/core/tx.py +39 -18
- cartography/config.py +4 -0
- cartography/driftdetect/__main__.py +1 -2
- cartography/driftdetect/add_shortcut.py +10 -2
- cartography/driftdetect/cli.py +71 -75
- cartography/driftdetect/detect_deviations.py +7 -3
- cartography/driftdetect/get_states.py +20 -8
- cartography/driftdetect/model.py +5 -5
- cartography/driftdetect/serializers.py +8 -6
- cartography/driftdetect/storage.py +2 -2
- cartography/graph/cleanupbuilder.py +35 -15
- cartography/graph/job.py +46 -17
- cartography/graph/querybuilder.py +165 -80
- cartography/graph/statement.py +35 -26
- cartography/intel/analysis.py +4 -1
- cartography/intel/aws/__init__.py +114 -55
- cartography/intel/aws/apigateway.py +134 -63
- cartography/intel/aws/cloudtrail.py +127 -0
- cartography/intel/aws/config.py +56 -20
- cartography/intel/aws/dynamodb.py +108 -40
- cartography/intel/aws/ec2/__init__.py +2 -2
- cartography/intel/aws/ec2/auto_scaling_groups.py +181 -78
- cartography/intel/aws/ec2/elastic_ip_addresses.py +41 -13
- cartography/intel/aws/ec2/images.py +49 -20
- cartography/intel/aws/ec2/instances.py +234 -136
- cartography/intel/aws/ec2/internet_gateways.py +40 -11
- cartography/intel/aws/ec2/key_pairs.py +44 -20
- cartography/intel/aws/ec2/launch_templates.py +101 -59
- cartography/intel/aws/ec2/load_balancer_v2s.py +104 -39
- cartography/intel/aws/ec2/load_balancers.py +82 -42
- cartography/intel/aws/ec2/network_acls.py +89 -65
- cartography/intel/aws/ec2/network_interfaces.py +146 -87
- cartography/intel/aws/ec2/reserved_instances.py +45 -16
- cartography/intel/aws/ec2/route_tables.py +138 -98
- cartography/intel/aws/ec2/security_groups.py +71 -21
- cartography/intel/aws/ec2/snapshots.py +61 -22
- cartography/intel/aws/ec2/subnets.py +54 -18
- cartography/intel/aws/ec2/tgw.py +100 -34
- cartography/intel/aws/ec2/util.py +1 -1
- cartography/intel/aws/ec2/volumes.py +69 -41
- cartography/intel/aws/ec2/vpc.py +37 -12
- cartography/intel/aws/ec2/vpc_peerings.py +83 -24
- cartography/intel/aws/ecr.py +88 -32
- cartography/intel/aws/ecs.py +83 -47
- cartography/intel/aws/eks.py +55 -29
- cartography/intel/aws/elasticache.py +42 -18
- cartography/intel/aws/elasticsearch.py +57 -20
- cartography/intel/aws/emr.py +61 -23
- cartography/intel/aws/iam.py +401 -145
- cartography/intel/aws/iam_instance_profiles.py +22 -22
- cartography/intel/aws/identitycenter.py +71 -37
- cartography/intel/aws/inspector.py +159 -89
- cartography/intel/aws/kms.py +92 -38
- cartography/intel/aws/lambda_function.py +103 -34
- cartography/intel/aws/organizations.py +30 -10
- cartography/intel/aws/permission_relationships.py +133 -51
- cartography/intel/aws/rds.py +249 -85
- cartography/intel/aws/redshift.py +107 -46
- cartography/intel/aws/resourcegroupstaggingapi.py +120 -66
- cartography/intel/aws/resources.py +53 -46
- cartography/intel/aws/route53.py +108 -61
- cartography/intel/aws/s3.py +168 -83
- cartography/intel/aws/s3accountpublicaccessblock.py +157 -0
- cartography/intel/aws/secretsmanager.py +24 -12
- cartography/intel/aws/securityhub.py +20 -9
- cartography/intel/aws/sns.py +166 -0
- cartography/intel/aws/sqs.py +60 -28
- cartography/intel/aws/ssm.py +70 -30
- cartography/intel/aws/util/arns.py +7 -7
- cartography/intel/aws/util/common.py +31 -4
- cartography/intel/azure/__init__.py +78 -19
- cartography/intel/azure/compute.py +101 -27
- cartography/intel/azure/cosmosdb.py +496 -170
- cartography/intel/azure/sql.py +296 -105
- cartography/intel/azure/storage.py +322 -113
- cartography/intel/azure/subscription.py +39 -23
- cartography/intel/azure/tenant.py +13 -4
- cartography/intel/azure/util/credentials.py +95 -55
- cartography/intel/bigfix/__init__.py +2 -2
- cartography/intel/bigfix/computers.py +93 -65
- cartography/intel/create_indexes.py +3 -2
- cartography/intel/crowdstrike/__init__.py +11 -9
- cartography/intel/crowdstrike/endpoints.py +5 -1
- cartography/intel/crowdstrike/spotlight.py +8 -3
- cartography/intel/cve/__init__.py +46 -13
- cartography/intel/cve/feed.py +48 -12
- cartography/intel/digitalocean/__init__.py +22 -13
- cartography/intel/digitalocean/compute.py +75 -108
- cartography/intel/digitalocean/management.py +44 -80
- cartography/intel/digitalocean/platform.py +48 -43
- cartography/intel/dns.py +36 -10
- cartography/intel/duo/__init__.py +21 -16
- cartography/intel/duo/api_host.py +14 -9
- cartography/intel/duo/endpoints.py +50 -45
- cartography/intel/duo/groups.py +18 -14
- cartography/intel/duo/phones.py +37 -34
- cartography/intel/duo/tokens.py +26 -23
- cartography/intel/duo/users.py +54 -50
- cartography/intel/duo/web_authn_credentials.py +30 -25
- cartography/intel/entra/__init__.py +25 -7
- cartography/intel/entra/ou.py +112 -0
- cartography/intel/entra/users.py +69 -63
- cartography/intel/gcp/__init__.py +185 -49
- cartography/intel/gcp/compute.py +418 -231
- cartography/intel/gcp/crm.py +96 -43
- cartography/intel/gcp/dns.py +60 -19
- cartography/intel/gcp/gke.py +72 -38
- cartography/intel/gcp/iam.py +61 -41
- cartography/intel/gcp/storage.py +84 -55
- cartography/intel/github/__init__.py +13 -11
- cartography/intel/github/repos.py +270 -137
- cartography/intel/github/teams.py +170 -88
- cartography/intel/github/users.py +70 -39
- cartography/intel/github/util.py +36 -34
- cartography/intel/gsuite/__init__.py +47 -26
- cartography/intel/gsuite/api.py +73 -30
- cartography/intel/jamf/__init__.py +19 -1
- cartography/intel/jamf/computers.py +30 -7
- cartography/intel/jamf/util.py +7 -2
- cartography/intel/kandji/__init__.py +6 -3
- cartography/intel/kandji/devices.py +14 -8
- cartography/intel/kubernetes/namespaces.py +7 -4
- cartography/intel/kubernetes/pods.py +7 -4
- cartography/intel/kubernetes/services.py +8 -4
- cartography/intel/lastpass/__init__.py +2 -2
- cartography/intel/lastpass/users.py +23 -12
- cartography/intel/oci/__init__.py +44 -11
- cartography/intel/oci/iam.py +134 -38
- cartography/intel/oci/organizations.py +13 -6
- cartography/intel/oci/utils.py +43 -20
- cartography/intel/okta/__init__.py +66 -15
- cartography/intel/okta/applications.py +42 -20
- cartography/intel/okta/awssaml.py +93 -33
- cartography/intel/okta/factors.py +16 -4
- cartography/intel/okta/groups.py +56 -29
- cartography/intel/okta/organization.py +5 -1
- cartography/intel/okta/origins.py +6 -2
- cartography/intel/okta/roles.py +15 -5
- cartography/intel/okta/users.py +20 -8
- cartography/intel/okta/utils.py +6 -4
- cartography/intel/pagerduty/__init__.py +8 -7
- cartography/intel/pagerduty/escalation_policies.py +18 -6
- cartography/intel/pagerduty/schedules.py +12 -4
- cartography/intel/pagerduty/services.py +11 -4
- cartography/intel/pagerduty/teams.py +8 -3
- cartography/intel/pagerduty/users.py +3 -1
- cartography/intel/pagerduty/vendors.py +3 -1
- cartography/intel/semgrep/__init__.py +24 -6
- cartography/intel/semgrep/dependencies.py +50 -28
- cartography/intel/semgrep/deployment.py +3 -1
- cartography/intel/semgrep/findings.py +42 -18
- cartography/intel/snipeit/__init__.py +17 -3
- cartography/intel/snipeit/asset.py +12 -6
- cartography/intel/snipeit/user.py +8 -5
- cartography/intel/snipeit/util.py +9 -4
- cartography/models/aws/apigateway.py +21 -17
- cartography/models/aws/apigatewaycertificate.py +28 -22
- cartography/models/aws/apigatewayresource.py +28 -20
- cartography/models/aws/apigatewaystage.py +33 -25
- cartography/models/aws/cloudtrail/__init__.py +0 -0
- cartography/models/aws/cloudtrail/trail.py +61 -0
- cartography/models/aws/dynamodb/gsi.py +30 -22
- cartography/models/aws/dynamodb/tables.py +25 -17
- cartography/models/aws/ec2/auto_scaling_groups.py +102 -82
- cartography/models/aws/ec2/images.py +36 -34
- cartography/models/aws/ec2/instances.py +51 -45
- cartography/models/aws/ec2/keypair.py +21 -16
- cartography/models/aws/ec2/keypair_instance.py +28 -21
- cartography/models/aws/ec2/launch_configurations.py +30 -26
- cartography/models/aws/ec2/launch_template_versions.py +48 -38
- cartography/models/aws/ec2/launch_templates.py +21 -17
- cartography/models/aws/ec2/load_balancer_listeners.py +27 -23
- cartography/models/aws/ec2/load_balancers.py +47 -37
- cartography/models/aws/ec2/network_acl_rules.py +38 -30
- cartography/models/aws/ec2/network_acls.py +38 -29
- cartography/models/aws/ec2/networkinterface_instance.py +52 -39
- cartography/models/aws/ec2/networkinterfaces.py +53 -37
- cartography/models/aws/ec2/privateip_networkinterface.py +32 -22
- cartography/models/aws/ec2/reservations.py +18 -14
- cartography/models/aws/ec2/route_table_associations.py +44 -34
- cartography/models/aws/ec2/route_tables.py +50 -43
- cartography/models/aws/ec2/routes.py +45 -37
- cartography/models/aws/ec2/securitygroup_instance.py +29 -20
- cartography/models/aws/ec2/securitygroup_networkinterface.py +24 -15
- cartography/models/aws/ec2/subnet_instance.py +24 -19
- cartography/models/aws/ec2/subnet_networkinterface.py +40 -31
- cartography/models/aws/ec2/volumes.py +47 -40
- cartography/models/aws/eks/clusters.py +23 -21
- cartography/models/aws/emr.py +32 -30
- cartography/models/aws/iam/instanceprofile.py +33 -24
- cartography/models/aws/identitycenter/awsidentitycenter.py +18 -14
- cartography/models/aws/identitycenter/awspermissionset.py +37 -29
- cartography/models/aws/identitycenter/awsssouser.py +23 -21
- cartography/models/aws/inspector/findings.py +77 -65
- cartography/models/aws/inspector/packages.py +35 -29
- cartography/models/aws/s3/__init__.py +0 -0
- cartography/models/aws/s3/account_public_access_block.py +51 -0
- cartography/models/aws/sns/__init__.py +0 -0
- cartography/models/aws/sns/topic.py +50 -0
- cartography/models/aws/ssm/instance_information.py +51 -39
- cartography/models/aws/ssm/instance_patch.py +32 -26
- cartography/models/bigfix/bigfix_computer.py +42 -38
- cartography/models/bigfix/bigfix_root.py +3 -3
- cartography/models/core/common.py +12 -10
- cartography/models/core/nodes.py +5 -2
- cartography/models/core/relationships.py +14 -6
- cartography/models/crowdstrike/hosts.py +37 -35
- cartography/models/cve/cve.py +34 -32
- cartography/models/cve/cve_feed.py +6 -6
- cartography/models/digitalocean/__init__.py +0 -0
- cartography/models/digitalocean/account.py +21 -0
- cartography/models/digitalocean/droplet.py +56 -0
- cartography/models/digitalocean/project.py +48 -0
- cartography/models/duo/api_host.py +3 -3
- cartography/models/duo/endpoint.py +43 -41
- cartography/models/duo/group.py +14 -14
- cartography/models/duo/phone.py +27 -27
- cartography/models/duo/token.py +16 -16
- cartography/models/duo/user.py +46 -44
- cartography/models/duo/web_authn_credential.py +27 -19
- cartography/models/entra/ou.py +48 -0
- cartography/models/entra/tenant.py +24 -18
- cartography/models/entra/user.py +64 -48
- cartography/models/gcp/iam.py +23 -23
- cartography/models/github/orgs.py +5 -4
- cartography/models/github/teams.py +37 -31
- cartography/models/github/users.py +34 -23
- cartography/models/kandji/device.py +22 -16
- cartography/models/kandji/tenant.py +6 -4
- cartography/models/lastpass/tenant.py +3 -3
- cartography/models/lastpass/user.py +32 -28
- cartography/models/semgrep/dependencies.py +36 -24
- cartography/models/semgrep/deployment.py +5 -5
- cartography/models/semgrep/findings.py +58 -42
- cartography/models/semgrep/locations.py +27 -21
- cartography/models/snipeit/asset.py +30 -21
- cartography/models/snipeit/tenant.py +6 -4
- cartography/models/snipeit/user.py +19 -12
- cartography/stats.py +3 -3
- cartography/sync.py +107 -31
- cartography/util.py +84 -62
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/METADATA +3 -14
- cartography-0.103.0rc1.dist-info/RECORD +396 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/WHEEL +1 -1
- cartography-0.102.0rc2.dist-info/RECORD +0 -381
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/entry_points.txt +0 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.102.0rc2.dist-info → cartography-0.103.0rc1.dist-info}/top_level.txt +0 -0
|
@@ -12,39 +12,41 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class EKSClusterNodeProperties(CartographyNodeProperties):
|
|
15
|
-
id: PropertyRef = PropertyRef(
|
|
16
|
-
arn: PropertyRef = PropertyRef(
|
|
17
|
-
name: PropertyRef = PropertyRef(
|
|
18
|
-
region: PropertyRef = PropertyRef(
|
|
19
|
-
created_at: PropertyRef = PropertyRef(
|
|
20
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
21
|
-
endpoint: PropertyRef = PropertyRef(
|
|
22
|
-
endpoint_public_access: PropertyRef = PropertyRef(
|
|
23
|
-
rolearn: PropertyRef = PropertyRef(
|
|
24
|
-
version: PropertyRef = PropertyRef(
|
|
25
|
-
platform_version: PropertyRef = PropertyRef(
|
|
26
|
-
status: PropertyRef = PropertyRef(
|
|
27
|
-
audit_logging: PropertyRef = PropertyRef(
|
|
15
|
+
id: PropertyRef = PropertyRef("arn")
|
|
16
|
+
arn: PropertyRef = PropertyRef("arn", extra_index=True)
|
|
17
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
18
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
19
|
+
created_at: PropertyRef = PropertyRef("created_at")
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
|
+
endpoint: PropertyRef = PropertyRef("endpoint")
|
|
22
|
+
endpoint_public_access: PropertyRef = PropertyRef("ClusterEndpointPublic")
|
|
23
|
+
rolearn: PropertyRef = PropertyRef("roleArn")
|
|
24
|
+
version: PropertyRef = PropertyRef("version")
|
|
25
|
+
platform_version: PropertyRef = PropertyRef("platformVersion")
|
|
26
|
+
status: PropertyRef = PropertyRef("status")
|
|
27
|
+
audit_logging: PropertyRef = PropertyRef("ClusterLogging")
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
@dataclass(frozen=True)
|
|
31
|
-
class
|
|
32
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
31
|
+
class EKSClusterToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
32
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
@dataclass(frozen=True)
|
|
36
|
-
class
|
|
37
|
-
target_node_label: str =
|
|
36
|
+
class EKSClusterToAWSAccountRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "AWSAccount"
|
|
38
38
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
-
{
|
|
39
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
40
40
|
)
|
|
41
41
|
direction: LinkDirection = LinkDirection.INWARD
|
|
42
42
|
rel_label: str = "RESOURCE"
|
|
43
|
-
properties:
|
|
43
|
+
properties: EKSClusterToAWSAccountRelRelProperties = (
|
|
44
|
+
EKSClusterToAWSAccountRelRelProperties()
|
|
45
|
+
)
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
@dataclass(frozen=True)
|
|
47
49
|
class EKSClusterSchema(CartographyNodeSchema):
|
|
48
|
-
label: str =
|
|
50
|
+
label: str = "EKSCluster"
|
|
49
51
|
properties: EKSClusterNodeProperties = EKSClusterNodeProperties()
|
|
50
|
-
sub_resource_relationship:
|
|
52
|
+
sub_resource_relationship: EKSClusterToAWSAccountRel = EKSClusterToAWSAccountRel()
|
cartography/models/aws/emr.py
CHANGED
|
@@ -12,49 +12,51 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class EMRClusterNodeProperties(CartographyNodeProperties):
|
|
15
|
-
arn: PropertyRef = PropertyRef(
|
|
16
|
-
auto_terminate: PropertyRef = PropertyRef(
|
|
17
|
-
autoscaling_role: PropertyRef = PropertyRef(
|
|
18
|
-
custom_ami_id: PropertyRef = PropertyRef(
|
|
19
|
-
id: PropertyRef = PropertyRef(
|
|
20
|
-
instance_collection_type: PropertyRef = PropertyRef(
|
|
21
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
22
|
-
log_encryption_kms_key_id: PropertyRef = PropertyRef(
|
|
23
|
-
log_uri: PropertyRef = PropertyRef(
|
|
24
|
-
master_public_dns_name: PropertyRef = PropertyRef(
|
|
25
|
-
name: PropertyRef = PropertyRef(
|
|
26
|
-
outpost_arn: PropertyRef = PropertyRef(
|
|
27
|
-
region: PropertyRef = PropertyRef(
|
|
28
|
-
release_label: PropertyRef = PropertyRef(
|
|
29
|
-
repo_upgrade_on_boot: PropertyRef = PropertyRef(
|
|
30
|
-
requested_ami_version: PropertyRef = PropertyRef(
|
|
31
|
-
running_ami_version: PropertyRef = PropertyRef(
|
|
32
|
-
scale_down_behavior: PropertyRef = PropertyRef(
|
|
33
|
-
security_configuration: PropertyRef = PropertyRef(
|
|
34
|
-
servicerole: PropertyRef = PropertyRef(
|
|
35
|
-
termination_protected: PropertyRef = PropertyRef(
|
|
36
|
-
visible_to_all_users: PropertyRef = PropertyRef(
|
|
15
|
+
arn: PropertyRef = PropertyRef("ClusterArn", extra_index=True)
|
|
16
|
+
auto_terminate: PropertyRef = PropertyRef("AutoTerminate")
|
|
17
|
+
autoscaling_role: PropertyRef = PropertyRef("AutoScalingRole")
|
|
18
|
+
custom_ami_id: PropertyRef = PropertyRef("CustomAmiId")
|
|
19
|
+
id: PropertyRef = PropertyRef("Id")
|
|
20
|
+
instance_collection_type: PropertyRef = PropertyRef("InstanceCollectionType")
|
|
21
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
22
|
+
log_encryption_kms_key_id: PropertyRef = PropertyRef("LogEncryptionKmsKeyId")
|
|
23
|
+
log_uri: PropertyRef = PropertyRef("LogUri")
|
|
24
|
+
master_public_dns_name: PropertyRef = PropertyRef("MasterPublicDnsName")
|
|
25
|
+
name: PropertyRef = PropertyRef("Name")
|
|
26
|
+
outpost_arn: PropertyRef = PropertyRef("OutpostArn")
|
|
27
|
+
region: PropertyRef = PropertyRef("Region", set_in_kwargs=True)
|
|
28
|
+
release_label: PropertyRef = PropertyRef("ReleaseLabel")
|
|
29
|
+
repo_upgrade_on_boot: PropertyRef = PropertyRef("RepoUpgradeOnBoot")
|
|
30
|
+
requested_ami_version: PropertyRef = PropertyRef("RequestedAmiVersion")
|
|
31
|
+
running_ami_version: PropertyRef = PropertyRef("RunningAmiVersion")
|
|
32
|
+
scale_down_behavior: PropertyRef = PropertyRef("ScaleDownBehavior")
|
|
33
|
+
security_configuration: PropertyRef = PropertyRef("SecurityConfiguration")
|
|
34
|
+
servicerole: PropertyRef = PropertyRef("ServiceRole")
|
|
35
|
+
termination_protected: PropertyRef = PropertyRef("TerminationProtected")
|
|
36
|
+
visible_to_all_users: PropertyRef = PropertyRef("VisibleToAllUsers")
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
@dataclass(frozen=True)
|
|
40
|
-
class
|
|
41
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
40
|
+
class EMRClusterToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
41
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
@dataclass(frozen=True)
|
|
45
45
|
# (:EMRCluster)<-[:RESOURCE]-(:AWSAccount)
|
|
46
|
-
class
|
|
47
|
-
target_node_label: str =
|
|
46
|
+
class EMRClusterToAWSAccountRel(CartographyRelSchema):
|
|
47
|
+
target_node_label: str = "AWSAccount"
|
|
48
48
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
49
|
-
{
|
|
49
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
50
50
|
)
|
|
51
51
|
direction: LinkDirection = LinkDirection.INWARD
|
|
52
52
|
rel_label: str = "RESOURCE"
|
|
53
|
-
properties:
|
|
53
|
+
properties: EMRClusterToAWSAccountRelRelProperties = (
|
|
54
|
+
EMRClusterToAWSAccountRelRelProperties()
|
|
55
|
+
)
|
|
54
56
|
|
|
55
57
|
|
|
56
58
|
@dataclass(frozen=True)
|
|
57
59
|
class EMRClusterSchema(CartographyNodeSchema):
|
|
58
|
-
label: str =
|
|
60
|
+
label: str = "EMRCluster"
|
|
59
61
|
properties: EMRClusterNodeProperties = EMRClusterNodeProperties()
|
|
60
|
-
sub_resource_relationship:
|
|
62
|
+
sub_resource_relationship: EMRClusterToAWSAccountRel = EMRClusterToAWSAccountRel()
|
|
@@ -16,52 +16,61 @@ class InstanceProfileNodeProperties(CartographyNodeProperties):
|
|
|
16
16
|
"""
|
|
17
17
|
Schema describing a InstanceProfile.
|
|
18
18
|
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
|
|
20
|
+
arn: PropertyRef = PropertyRef("Arn")
|
|
21
|
+
createdate: PropertyRef = PropertyRef("CreateDate")
|
|
22
|
+
id: PropertyRef = PropertyRef("Arn")
|
|
23
|
+
instance_profile_id: PropertyRef = PropertyRef("InstanceProfileId")
|
|
24
|
+
instance_profile_name: PropertyRef = PropertyRef("InstanceProfileName")
|
|
25
|
+
path: PropertyRef = PropertyRef("Path")
|
|
26
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
@dataclass(frozen=True)
|
|
29
|
-
class
|
|
30
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
30
|
+
class InstanceProfileToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
@dataclass(frozen=True)
|
|
34
|
-
class
|
|
35
|
-
target_node_label: str =
|
|
35
|
+
class InstanceProfileToAWSAccountRel(CartographyRelSchema):
|
|
36
|
+
target_node_label: str = "AWSAccount"
|
|
36
37
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
37
|
-
{
|
|
38
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
38
39
|
)
|
|
39
40
|
direction: LinkDirection = LinkDirection.INWARD
|
|
40
41
|
rel_label: str = "RESOURCE"
|
|
41
|
-
properties:
|
|
42
|
+
properties: InstanceProfileToAWSAccountRelRelProperties = (
|
|
43
|
+
InstanceProfileToAWSAccountRelRelProperties()
|
|
44
|
+
)
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
@dataclass(frozen=True)
|
|
45
|
-
class
|
|
46
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
48
|
+
class InstanceProfileToAWSRoleRelRelProperties(CartographyRelProperties):
|
|
49
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
47
50
|
|
|
48
51
|
|
|
49
52
|
@dataclass(frozen=True)
|
|
50
|
-
class
|
|
51
|
-
target_node_label: str =
|
|
53
|
+
class InstanceProfileToAWSRoleRel(CartographyRelSchema):
|
|
54
|
+
target_node_label: str = "AWSRole"
|
|
52
55
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
53
|
-
{
|
|
56
|
+
{"arn": PropertyRef("Roles", one_to_many=True)},
|
|
54
57
|
)
|
|
55
58
|
direction: LinkDirection = LinkDirection.OUTWARD
|
|
56
59
|
rel_label: str = "ASSOCIATED_WITH"
|
|
57
|
-
properties:
|
|
60
|
+
properties: InstanceProfileToAWSRoleRelRelProperties = (
|
|
61
|
+
InstanceProfileToAWSRoleRelRelProperties()
|
|
62
|
+
)
|
|
58
63
|
|
|
59
64
|
|
|
60
65
|
@dataclass(frozen=True)
|
|
61
66
|
class InstanceProfileSchema(CartographyNodeSchema):
|
|
62
|
-
label: str =
|
|
67
|
+
label: str = "AWSInstanceProfile"
|
|
63
68
|
properties: InstanceProfileNodeProperties = InstanceProfileNodeProperties()
|
|
64
|
-
sub_resource_relationship:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
sub_resource_relationship: InstanceProfileToAWSAccountRel = (
|
|
70
|
+
InstanceProfileToAWSAccountRel()
|
|
71
|
+
)
|
|
72
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
73
|
+
[
|
|
74
|
+
InstanceProfileToAWSRoleRel(),
|
|
75
|
+
]
|
|
76
|
+
)
|
|
@@ -12,33 +12,37 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
14
|
class IdentityCenterInstanceProperties(CartographyNodeProperties):
|
|
15
|
-
identity_store_id: PropertyRef = PropertyRef(
|
|
16
|
-
arn: PropertyRef = PropertyRef(
|
|
17
|
-
created_date: PropertyRef = PropertyRef(
|
|
18
|
-
id: PropertyRef = PropertyRef(
|
|
19
|
-
status: PropertyRef = PropertyRef(
|
|
20
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
15
|
+
identity_store_id: PropertyRef = PropertyRef("IdentityStoreId")
|
|
16
|
+
arn: PropertyRef = PropertyRef("InstanceArn")
|
|
17
|
+
created_date: PropertyRef = PropertyRef("CreatedDate")
|
|
18
|
+
id: PropertyRef = PropertyRef("InstanceArn")
|
|
19
|
+
status: PropertyRef = PropertyRef("Status")
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@dataclass(frozen=True)
|
|
24
|
-
class
|
|
25
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
24
|
+
class IdentityCenterToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
25
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
@dataclass(frozen=True)
|
|
29
29
|
# (:IdentityCenter)<-[:RESOURCE]-(:AWSAccount)
|
|
30
|
-
class
|
|
31
|
-
target_node_label: str =
|
|
30
|
+
class IdentityCenterToAWSAccountRel(CartographyRelSchema):
|
|
31
|
+
target_node_label: str = "AWSAccount"
|
|
32
32
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
33
|
-
{
|
|
33
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
34
34
|
)
|
|
35
35
|
direction: LinkDirection = LinkDirection.INWARD
|
|
36
36
|
rel_label: str = "RESOURCE"
|
|
37
|
-
properties:
|
|
37
|
+
properties: IdentityCenterToAWSAccountRelRelProperties = (
|
|
38
|
+
IdentityCenterToAWSAccountRelRelProperties()
|
|
39
|
+
)
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
@dataclass(frozen=True)
|
|
41
43
|
class AWSIdentityCenterInstanceSchema(CartographyNodeSchema):
|
|
42
|
-
label: str =
|
|
44
|
+
label: str = "AWSIdentityCenter"
|
|
43
45
|
properties: IdentityCenterInstanceProperties = IdentityCenterInstanceProperties()
|
|
44
|
-
sub_resource_relationship:
|
|
46
|
+
sub_resource_relationship: IdentityCenterToAWSAccountRel = (
|
|
47
|
+
IdentityCenterToAWSAccountRel()
|
|
48
|
+
)
|
|
@@ -13,72 +13,80 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
13
13
|
|
|
14
14
|
@dataclass(frozen=True)
|
|
15
15
|
class PermissionSetProperties(CartographyNodeProperties):
|
|
16
|
-
id: PropertyRef = PropertyRef(
|
|
17
|
-
name: PropertyRef = PropertyRef(
|
|
18
|
-
arn: PropertyRef = PropertyRef(
|
|
19
|
-
description: PropertyRef = PropertyRef(
|
|
20
|
-
session_duration: PropertyRef = PropertyRef(
|
|
21
|
-
instance_arn: PropertyRef = PropertyRef(
|
|
22
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
16
|
+
id: PropertyRef = PropertyRef("PermissionSetArn")
|
|
17
|
+
name: PropertyRef = PropertyRef("Name")
|
|
18
|
+
arn: PropertyRef = PropertyRef("PermissionSetArn")
|
|
19
|
+
description: PropertyRef = PropertyRef("Description")
|
|
20
|
+
session_duration: PropertyRef = PropertyRef("SessionDuration")
|
|
21
|
+
instance_arn: PropertyRef = PropertyRef("InstanceArn", set_in_kwargs=True)
|
|
22
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
@dataclass(frozen=True)
|
|
26
|
-
class
|
|
27
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
26
|
+
class PermissionSetToInstanceRelRelProperties(CartographyRelProperties):
|
|
27
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
@dataclass(frozen=True)
|
|
31
|
-
class
|
|
32
|
-
target_node_label: str =
|
|
31
|
+
class PermissionSetToInstanceRel(CartographyRelSchema):
|
|
32
|
+
target_node_label: str = "AWSIdentityCenter"
|
|
33
33
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
34
|
-
{
|
|
34
|
+
{"arn": PropertyRef("InstanceArn", set_in_kwargs=True)},
|
|
35
35
|
)
|
|
36
36
|
direction: LinkDirection = LinkDirection.INWARD
|
|
37
37
|
rel_label: str = "HAS_PERMISSION_SET"
|
|
38
|
-
properties:
|
|
38
|
+
properties: PermissionSetToInstanceRelRelProperties = (
|
|
39
|
+
PermissionSetToInstanceRelRelProperties()
|
|
40
|
+
)
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
@dataclass(frozen=True)
|
|
42
|
-
class
|
|
43
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
44
|
+
class PermissionSetToAWSRoleRelRelProperties(CartographyRelProperties):
|
|
45
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
@dataclass(frozen=True)
|
|
47
|
-
class
|
|
48
|
-
target_node_label: str =
|
|
49
|
+
class PermissionSetToAWSRoleRel(CartographyRelSchema):
|
|
50
|
+
target_node_label: str = "AWSRole"
|
|
49
51
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
50
|
-
{
|
|
52
|
+
{"arn": PropertyRef("RoleHint", fuzzy_and_ignore_case=True)},
|
|
51
53
|
)
|
|
52
54
|
direction: LinkDirection = LinkDirection.OUTWARD
|
|
53
55
|
rel_label: str = "ASSIGNED_TO_ROLE"
|
|
54
|
-
properties:
|
|
56
|
+
properties: PermissionSetToAWSRoleRelRelProperties = (
|
|
57
|
+
PermissionSetToAWSRoleRelRelProperties()
|
|
58
|
+
)
|
|
55
59
|
|
|
56
60
|
|
|
57
61
|
@dataclass(frozen=True)
|
|
58
|
-
class
|
|
59
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
62
|
+
class AWSPermissionSetToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
63
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
60
64
|
|
|
61
65
|
|
|
62
66
|
@dataclass(frozen=True)
|
|
63
67
|
# (:IdentityCenter)<-[:RESOURCE]-(:AWSAccount)
|
|
64
|
-
class
|
|
65
|
-
target_node_label: str =
|
|
68
|
+
class AWSPermissionSetToAWSAccountRel(CartographyRelSchema):
|
|
69
|
+
target_node_label: str = "AWSAccount"
|
|
66
70
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
67
|
-
{
|
|
71
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
68
72
|
)
|
|
69
73
|
direction: LinkDirection = LinkDirection.INWARD
|
|
70
74
|
rel_label: str = "RESOURCE"
|
|
71
|
-
properties:
|
|
75
|
+
properties: AWSPermissionSetToAWSAccountRelRelProperties = (
|
|
76
|
+
AWSPermissionSetToAWSAccountRelRelProperties()
|
|
77
|
+
)
|
|
72
78
|
|
|
73
79
|
|
|
74
80
|
@dataclass(frozen=True)
|
|
75
81
|
class AWSPermissionSetSchema(CartographyNodeSchema):
|
|
76
|
-
label: str =
|
|
82
|
+
label: str = "AWSPermissionSet"
|
|
77
83
|
properties: PermissionSetProperties = PermissionSetProperties()
|
|
78
|
-
sub_resource_relationship:
|
|
84
|
+
sub_resource_relationship: AWSPermissionSetToAWSAccountRel = (
|
|
85
|
+
AWSPermissionSetToAWSAccountRel()
|
|
86
|
+
)
|
|
79
87
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
80
88
|
[
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
PermissionSetToInstanceRel(),
|
|
90
|
+
PermissionSetToAWSRoleRel(),
|
|
83
91
|
],
|
|
84
92
|
)
|
|
@@ -14,55 +14,57 @@ from cartography.models.core.relationships import TargetNodeMatcher
|
|
|
14
14
|
|
|
15
15
|
@dataclass(frozen=True)
|
|
16
16
|
class SSOUserProperties(CartographyNodeProperties):
|
|
17
|
-
id: PropertyRef = PropertyRef(
|
|
18
|
-
user_name: PropertyRef = PropertyRef(
|
|
19
|
-
identity_store_id: PropertyRef = PropertyRef(
|
|
20
|
-
external_id: PropertyRef = PropertyRef(
|
|
21
|
-
region: PropertyRef = PropertyRef(
|
|
22
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
17
|
+
id: PropertyRef = PropertyRef("UserId", extra_index=True)
|
|
18
|
+
user_name: PropertyRef = PropertyRef("UserName")
|
|
19
|
+
identity_store_id: PropertyRef = PropertyRef("IdentityStoreId")
|
|
20
|
+
external_id: PropertyRef = PropertyRef("ExternalId", extra_index=True)
|
|
21
|
+
region: PropertyRef = PropertyRef("Region")
|
|
22
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
@dataclass(frozen=True)
|
|
26
|
-
class
|
|
27
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
26
|
+
class SSOUserToOktaUserRelRelProperties(CartographyRelProperties):
|
|
27
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
@dataclass(frozen=True)
|
|
31
|
-
class
|
|
32
|
-
target_node_label: str =
|
|
31
|
+
class SSOUserToOktaUserRel(CartographyRelSchema):
|
|
32
|
+
target_node_label: str = "UserAccount"
|
|
33
33
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
34
|
-
{
|
|
34
|
+
{"id": PropertyRef("ExternalId")},
|
|
35
35
|
)
|
|
36
36
|
direction: LinkDirection = LinkDirection.INWARD
|
|
37
37
|
rel_label: str = "CAN_ASSUME_IDENTITY"
|
|
38
|
-
properties:
|
|
38
|
+
properties: SSOUserToOktaUserRelRelProperties = SSOUserToOktaUserRelRelProperties()
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
@dataclass(frozen=True)
|
|
42
|
-
class
|
|
43
|
-
lastupdated: PropertyRef = PropertyRef(
|
|
42
|
+
class AWSSSOUserToAWSAccountRelRelProperties(CartographyRelProperties):
|
|
43
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
@dataclass(frozen=True)
|
|
47
47
|
# (:IdentityCenter)<-[:RESOURCE]-(:AWSAccount)
|
|
48
|
-
class
|
|
49
|
-
target_node_label: str =
|
|
48
|
+
class AWSSSOUserToAWSAccountRel(CartographyRelSchema):
|
|
49
|
+
target_node_label: str = "AWSAccount"
|
|
50
50
|
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
51
|
-
{
|
|
51
|
+
{"id": PropertyRef("AWS_ID", set_in_kwargs=True)},
|
|
52
52
|
)
|
|
53
53
|
direction: LinkDirection = LinkDirection.INWARD
|
|
54
54
|
rel_label: str = "RESOURCE"
|
|
55
|
-
properties:
|
|
55
|
+
properties: AWSSSOUserToAWSAccountRelRelProperties = (
|
|
56
|
+
AWSSSOUserToAWSAccountRelRelProperties()
|
|
57
|
+
)
|
|
56
58
|
|
|
57
59
|
|
|
58
60
|
@dataclass(frozen=True)
|
|
59
61
|
class AWSSSOUserSchema(CartographyNodeSchema):
|
|
60
|
-
label: str =
|
|
62
|
+
label: str = "AWSSSOUser"
|
|
61
63
|
properties: SSOUserProperties = SSOUserProperties()
|
|
62
64
|
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(["UserAccount"])
|
|
63
|
-
sub_resource_relationship:
|
|
65
|
+
sub_resource_relationship: AWSSSOUserToAWSAccountRel = AWSSSOUserToAWSAccountRel()
|
|
64
66
|
other_relationships: OtherRelationships = OtherRelationships(
|
|
65
67
|
[
|
|
66
|
-
|
|
68
|
+
SSOUserToOktaUserRel(),
|
|
67
69
|
],
|
|
68
70
|
)
|