cartography 0.91.0__tar.gz → 0.92.0rc2__tar.gz
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-0.91.0/cartography.egg-info → cartography-0.92.0rc2}/PKG-INFO +1 -1
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/indexes.cypher +0 -6
- cartography-0.92.0rc2/cartography/intel/aws/ec2/launch_templates.py +134 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/__init__.py +1 -1
- cartography-0.92.0rc2/cartography/intel/okta/awssaml.py +237 -0
- cartography-0.92.0rc2/cartography/models/aws/ec2/launch_template_versions.py +81 -0
- cartography-0.92.0rc2/cartography/models/aws/ec2/launch_templates.py +46 -0
- {cartography-0.91.0 → cartography-0.92.0rc2/cartography.egg-info}/PKG-INFO +1 -1
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography.egg-info/SOURCES.txt +2 -1
- {cartography-0.91.0 → cartography-0.92.0rc2}/setup.py +1 -1
- cartography-0.91.0/cartography/data/jobs/cleanup/aws_import_ec2_launch_templates_cleanup.json +0 -13
- cartography-0.91.0/cartography/intel/aws/ec2/launch_templates.py +0 -115
- cartography-0.91.0/cartography/intel/okta/awssaml.py +0 -129
- {cartography-0.91.0 → cartography-0.92.0rc2}/LICENSE +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/NOTICE +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/README.md +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/__main__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/cli.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/client/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/client/aws/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/client/aws/iam.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/client/core/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/client/core/tx.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/config.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_ec2_asset_exposure.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_ec2_iaminstance.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_ec2_iaminstanceprofile.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_ec2_keypair_analysis.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_eks_asset_exposure.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_foreign_accounts.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_lambda_ecr.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/aws_s3acl_analysis.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/gcp_compute_asset_inet_exposure.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/gcp_gke_asset_exposure.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/gcp_gke_basic_auth.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/analysis/gsuite_human_link.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_account_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_apigateway_details.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_dns_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_account_access_key_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_apigateway_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_config_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_ec2_launch_configurations_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_ecr_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_ecs_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_elastic_ip_addresses_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_elasticache_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_es_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_groups_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_groups_membership_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_groups_policy_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_internet_gateways_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_kms_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_lambda_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_principals_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_rds_clusters_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_rds_instances_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_rds_snapshots_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_redshift_clusters_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_reserved_instances_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_roles_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_roles_policy_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_s3_acl_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_s3_buckets_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_secrets_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_securityhub_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_snapshots_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_sqs_queues_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_tags_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_tgw_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_users_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_vpc_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_import_vpc_peering_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_ingest_ec2_auto_scaling_groups_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_ingest_load_balancers_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_ingest_load_balancers_v2_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_ingest_subnets_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_kms_details.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_post_ingestion_principals_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/aws_s3_details.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_cosmosdb_cassandra_keyspace_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_cosmosdb_cors_details.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_cosmosdb_mongodb_database_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_cosmosdb_sql_database_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_cosmosdb_table_resources_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_database_account_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_import_disks_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_import_snapshots_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_import_virtual_machines_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_sql_server_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_storage_account_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_subscriptions_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/azure_tenant_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/crowdstrike_import_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/crxcavator_import_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/digitalocean_droplet_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/digitalocean_project_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_compute_firewall_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_compute_forwarding_rules_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_compute_instance_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_compute_vpc_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_compute_vpc_subnet_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_crm_folder_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_crm_organization_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_crm_project_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_dns_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_gke_cluster_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gcp_storage_bucket_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/github_repos_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/github_users_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gsuite_ingest_groups_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/gsuite_ingest_users_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/jamf_import_computers_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/kubernetes_import_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_import_compartments_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_import_groups_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_import_groups_membership_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_import_policies_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_import_users_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/oci_tenancy_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/okta_groups_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/okta_import_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/cleanup/pagerduty_import_cleanup.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/scoped_analysis/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/jobs/scoped_analysis/semgrep_sca_risk_analysis.json +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/data/permission_relationships.yaml +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/__main__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/add_shortcut.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/cli.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/config.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/detect_deviations.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/get_states.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/model.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/reporter.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/serializers.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/shortcut.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/storage.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/driftdetect/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/cleanupbuilder.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/context.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/job.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/querybuilder.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/graph/statement.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/analysis.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/apigateway.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/config.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/dynamodb.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/auto_scaling_groups.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/elastic_ip_addresses.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/images.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/instances.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/internet_gateways.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/key_pairs.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/load_balancer_v2s.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/load_balancers.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/network_interfaces.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/reserved_instances.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/security_groups.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/snapshots.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/subnets.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/tgw.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/volumes.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/vpc.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ec2/vpc_peerings.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ecr.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ecs.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/eks.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/elasticache.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/elasticsearch.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/emr.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/iam.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/inspector.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/kms.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/lambda_function.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/organizations.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/permission_relationships.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/rds.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/redshift.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/resourcegroupstaggingapi.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/resources.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/route53.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/s3.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/secretsmanager.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/securityhub.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/sqs.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/ssm.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/util/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/util/arns.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/aws/util/common.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/compute.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/cosmosdb.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/sql.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/storage.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/subscription.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/tenant.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/util/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/azure/util/credentials.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/bigfix/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/bigfix/computers.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/create_indexes.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crowdstrike/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crowdstrike/endpoints.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crowdstrike/spotlight.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crowdstrike/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crxcavator/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/crxcavator/crxcavator.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/cve/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/cve/feed.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/digitalocean/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/digitalocean/compute.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/digitalocean/management.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/digitalocean/platform.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/dns.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/api_host.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/endpoints.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/groups.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/phones.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/tokens.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/users.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/duo/web_authn_credentials.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/compute.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/crm.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/dns.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/gke.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gcp/storage.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/github/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/github/repos.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/github/teams.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/github/users.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/github/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gsuite/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/gsuite/api.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/jamf/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/jamf/computers.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/jamf/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kandji/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kandji/devices.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/namespaces.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/pods.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/secrets.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/services.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/kubernetes/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/lastpass/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/lastpass/users.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/oci/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/oci/iam.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/oci/organizations.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/oci/utils.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/applications.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/factors.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/groups.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/organization.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/origins.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/roles.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/sync_state.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/users.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/okta/utils.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/escalation_policies.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/schedules.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/services.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/teams.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/users.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/pagerduty/vendors.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/semgrep/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/intel/semgrep/findings.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/dynamodb/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/dynamodb/gsi.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/dynamodb/tables.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/images.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/instances.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/keypairs.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/loadbalancerv2.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/networkinterface_instance.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/networkinterfaces.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/privateip_networkinterface.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/reservations.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/securitygroup_instance.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/securitygroup_networkinterface.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/subnet_instance.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/subnet_networkinterface.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ec2/volumes.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/eks/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/eks/clusters.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/emr.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/inspector/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/inspector/findings.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/inspector/packages.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ssm/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ssm/instance_information.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/aws/ssm/instance_patch.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/bigfix/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/bigfix/bigfix_computer.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/bigfix/bigfix_root.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/core/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/core/common.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/core/nodes.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/core/relationships.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/cve/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/cve/cve.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/cve/cve_feed.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/api_host.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/endpoint.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/group.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/phone.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/token.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/user.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/duo/web_authn_credential.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/github/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/github/teams.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/kandji/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/kandji/device.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/kandji/tenant.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/lastpass/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/lastpass/tenant.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/lastpass/user.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/semgrep/__init__.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/semgrep/deployment.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/semgrep/findings.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/models/semgrep/locations.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/py.typed +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/stats.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/sync.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography/util.py +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography.egg-info/dependency_links.txt +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography.egg-info/entry_points.txt +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography.egg-info/requires.txt +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/cartography.egg-info/top_level.txt +0 -0
- {cartography-0.91.0 → cartography-0.92.0rc2}/setup.cfg +0 -0
|
@@ -200,12 +200,6 @@ CREATE INDEX IF NOT EXISTS FOR (n:KMSGrant) ON (n.lastupdated);
|
|
|
200
200
|
CREATE INDEX IF NOT EXISTS FOR (n:LaunchConfiguration) ON (n.id);
|
|
201
201
|
CREATE INDEX IF NOT EXISTS FOR (n:LaunchConfiguration) ON (n.name);
|
|
202
202
|
CREATE INDEX IF NOT EXISTS FOR (n:LaunchConfiguration) ON (n.lastupdated);
|
|
203
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplate) ON (n.id);
|
|
204
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplate) ON (n.name);
|
|
205
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplate) ON (n.lastupdated);
|
|
206
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplateVersion) ON (n.id);
|
|
207
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplateVersion) ON (n.name);
|
|
208
|
-
CREATE INDEX IF NOT EXISTS FOR (n:LaunchTemplateVersion) ON (n.lastupdated);
|
|
209
203
|
CREATE INDEX IF NOT EXISTS FOR (n:LoadBalancer) ON (n.dnsname);
|
|
210
204
|
CREATE INDEX IF NOT EXISTS FOR (n:LoadBalancer) ON (n.id);
|
|
211
205
|
CREATE INDEX IF NOT EXISTS FOR (n:LoadBalancer) ON (n.lastupdated);
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import boto3
|
|
5
|
+
import neo4j
|
|
6
|
+
|
|
7
|
+
from .util import get_botocore_config
|
|
8
|
+
from cartography.client.core.tx import load
|
|
9
|
+
from cartography.models.aws.ec2.launch_template_versions import LaunchTemplateVersionSchema
|
|
10
|
+
from cartography.models.aws.ec2.launch_templates import LaunchTemplateSchema
|
|
11
|
+
from cartography.util import aws_handle_regions
|
|
12
|
+
from cartography.util import timeit
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@timeit
|
|
18
|
+
@aws_handle_regions
|
|
19
|
+
def get_launch_templates(boto3_session: boto3.session.Session, region: str) -> list[dict[str, Any]]:
|
|
20
|
+
client = boto3_session.client('ec2', region_name=region, config=get_botocore_config())
|
|
21
|
+
paginator = client.get_paginator('describe_launch_templates')
|
|
22
|
+
templates: list[dict[str, Any]] = []
|
|
23
|
+
for page in paginator.paginate():
|
|
24
|
+
templates.extend(page['LaunchTemplates'])
|
|
25
|
+
return templates
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def transform_launch_templates(templates: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
29
|
+
result: list[dict[str, Any]] = []
|
|
30
|
+
for template in templates:
|
|
31
|
+
current = template.copy()
|
|
32
|
+
current['CreateTime'] = str(int(current['CreateTime'].timestamp()))
|
|
33
|
+
result.append(current)
|
|
34
|
+
return result
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@timeit
|
|
38
|
+
def load_launch_templates(
|
|
39
|
+
neo4j_session: neo4j.Session,
|
|
40
|
+
data: list[dict[str, Any]],
|
|
41
|
+
region: str,
|
|
42
|
+
current_aws_account_id: str,
|
|
43
|
+
update_tag: int,
|
|
44
|
+
) -> None:
|
|
45
|
+
load(
|
|
46
|
+
neo4j_session,
|
|
47
|
+
LaunchTemplateSchema(),
|
|
48
|
+
data,
|
|
49
|
+
Region=region,
|
|
50
|
+
AWS_ID=current_aws_account_id,
|
|
51
|
+
lastupdated=update_tag,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@timeit
|
|
56
|
+
@aws_handle_regions
|
|
57
|
+
def get_launch_template_versions(
|
|
58
|
+
boto3_session: boto3.session.Session,
|
|
59
|
+
templates: list[dict[str, Any]],
|
|
60
|
+
region: str,
|
|
61
|
+
) -> list[dict[str, Any]]:
|
|
62
|
+
client = boto3_session.client('ec2', region_name=region, config=get_botocore_config())
|
|
63
|
+
v_paginator = client.get_paginator('describe_launch_template_versions')
|
|
64
|
+
template_versions = []
|
|
65
|
+
for template in templates:
|
|
66
|
+
for versions in v_paginator.paginate(LaunchTemplateId=template['LaunchTemplateId']):
|
|
67
|
+
template_versions.extend(versions['LaunchTemplateVersions'])
|
|
68
|
+
return template_versions
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def transform_launch_template_versions(versions: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
|
72
|
+
result: list[dict[str, Any]] = []
|
|
73
|
+
for version in versions:
|
|
74
|
+
current = version.copy()
|
|
75
|
+
|
|
76
|
+
# Reformat some fields
|
|
77
|
+
current['Id'] = f"{version['LaunchTemplateId']}-{version['VersionNumber']}"
|
|
78
|
+
current['CreateTime'] = str(int(version['CreateTime'].timestamp()))
|
|
79
|
+
|
|
80
|
+
# Handle the nested object returned from boto
|
|
81
|
+
ltd = version['LaunchTemplateData']
|
|
82
|
+
current['KernelId'] = ltd.get('KernelId')
|
|
83
|
+
current['EbsOptimized'] = ltd.get('EbsOptimized')
|
|
84
|
+
current['IamInstanceProfileArn'] = ltd.get('IamInstanceProfileArn')
|
|
85
|
+
current['IamInstanceProfileName'] = ltd.get('IamInstanceProfileName')
|
|
86
|
+
current['ImageId'] = ltd.get('ImageId')
|
|
87
|
+
current['InstanceType'] = ltd.get('InstanceType')
|
|
88
|
+
current['KeyName'] = ltd.get('KeyName')
|
|
89
|
+
current['MonitoringEnabled'] = ltd.get('MonitoringEnabled')
|
|
90
|
+
current['RamdiskId'] = ltd.get('RamdiskId')
|
|
91
|
+
current['DisableApiTermination'] = ltd.get('DisableApiTermination')
|
|
92
|
+
current['InstanceInitiatedShutDownBehavior'] = ltd.get('InstanceInitiatedShutDownBehavior')
|
|
93
|
+
current['SecurityGroupIds'] = ltd.get('SecurityGroupIds')
|
|
94
|
+
current['SecurityGroups'] = ltd.get('SecurityGroups')
|
|
95
|
+
result.append(current)
|
|
96
|
+
return result
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@timeit
|
|
100
|
+
def load_launch_template_versions(
|
|
101
|
+
neo4j_session: neo4j.Session,
|
|
102
|
+
data: list[dict[str, Any]],
|
|
103
|
+
region: str,
|
|
104
|
+
current_aws_account_id: str,
|
|
105
|
+
update_tag: int,
|
|
106
|
+
) -> None:
|
|
107
|
+
load(
|
|
108
|
+
neo4j_session,
|
|
109
|
+
LaunchTemplateVersionSchema(),
|
|
110
|
+
data,
|
|
111
|
+
Region=region,
|
|
112
|
+
AWS_ID=current_aws_account_id,
|
|
113
|
+
lastupdated=update_tag,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@timeit
|
|
118
|
+
def sync_ec2_launch_templates(
|
|
119
|
+
neo4j_session: neo4j.Session,
|
|
120
|
+
boto3_session: boto3.session.Session,
|
|
121
|
+
regions: list[str],
|
|
122
|
+
current_aws_account_id: str,
|
|
123
|
+
update_tag: int,
|
|
124
|
+
common_job_parameters: dict[str, Any],
|
|
125
|
+
) -> None:
|
|
126
|
+
for region in regions:
|
|
127
|
+
logger.info(f"Syncing launch templates for region '{region}' in account '{current_aws_account_id}'.")
|
|
128
|
+
templates = get_launch_templates(boto3_session, region)
|
|
129
|
+
templates = transform_launch_templates(templates)
|
|
130
|
+
load_launch_templates(neo4j_session, templates, region, current_aws_account_id, update_tag)
|
|
131
|
+
|
|
132
|
+
versions = get_launch_template_versions(boto3_session, templates, region)
|
|
133
|
+
versions = transform_launch_template_versions(versions)
|
|
134
|
+
load_launch_template_versions(neo4j_session, versions, region, current_aws_account_id, update_tag)
|
|
@@ -68,7 +68,7 @@ def start_okta_ingestion(neo4j_session: neo4j.Session, config: Config) -> None:
|
|
|
68
68
|
applications.sync_okta_applications(neo4j_session, config.okta_org_id, config.update_tag, config.okta_api_key)
|
|
69
69
|
factors.sync_users_factors(neo4j_session, config.okta_org_id, config.update_tag, config.okta_api_key, state)
|
|
70
70
|
origins.sync_trusted_origins(neo4j_session, config.okta_org_id, config.update_tag, config.okta_api_key)
|
|
71
|
-
awssaml.sync_okta_aws_saml(neo4j_session, config.okta_saml_role_regex, config.update_tag)
|
|
71
|
+
awssaml.sync_okta_aws_saml(neo4j_session, config.okta_saml_role_regex, config.update_tag, config.okta_org_id)
|
|
72
72
|
|
|
73
73
|
# need creds with permission
|
|
74
74
|
# soft fail as some won't be able to get such high priv token
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Okta intel module - AWS SAML
|
|
2
|
+
import logging
|
|
3
|
+
import re
|
|
4
|
+
from collections import namedtuple
|
|
5
|
+
from typing import Dict
|
|
6
|
+
from typing import List
|
|
7
|
+
from typing import Optional
|
|
8
|
+
|
|
9
|
+
import neo4j
|
|
10
|
+
|
|
11
|
+
from cartography.client.core.tx import read_list_of_dicts_tx
|
|
12
|
+
from cartography.client.core.tx import read_single_value_tx
|
|
13
|
+
from cartography.util import timeit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
AccountRole = namedtuple('AccountRole', ['account_id', 'role_name'])
|
|
17
|
+
OktaGroup = namedtuple('OktaGroup', ['group_id', 'group_name'])
|
|
18
|
+
GroupRole = namedtuple('GroupRole', ['okta_group_id', 'aws_role_arn'])
|
|
19
|
+
|
|
20
|
+
logger = logging.getLogger(__name__)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_regex(regex_string: str) -> str:
|
|
24
|
+
return regex_string.replace("{{accountid}}", "P<accountid>").replace("{{role}}", "P<role>").strip()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _parse_okta_group_name(okta_group_name: str, mapping_regex: str) -> AccountRole | None:
|
|
28
|
+
"""
|
|
29
|
+
Extract AWS account id and AWS role name from the given Okta group name using the given mapping regex.
|
|
30
|
+
"""
|
|
31
|
+
regex = _parse_regex(mapping_regex)
|
|
32
|
+
matches = re.search(regex, okta_group_name)
|
|
33
|
+
if matches:
|
|
34
|
+
account_id = matches.group("accountid")
|
|
35
|
+
role_name = matches.group("role")
|
|
36
|
+
return AccountRole(account_id, role_name)
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def transform_okta_group_to_aws_role(group_id: str, group_name: str, mapping_regex: str) -> Optional[Dict]:
|
|
41
|
+
account_role = _parse_okta_group_name(group_name, mapping_regex)
|
|
42
|
+
if account_role:
|
|
43
|
+
role_arn = f"arn:aws:iam::{account_role.account_id}:role/{account_role.role_name}"
|
|
44
|
+
return {"groupid": group_id, "role": role_arn}
|
|
45
|
+
return None
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@timeit
|
|
49
|
+
def query_for_okta_to_aws_role_mapping(neo4j_session: neo4j.Session, mapping_regex: str) -> List[Dict]:
|
|
50
|
+
"""
|
|
51
|
+
Query the graph for all groups associated with the amazon_aws application and map them to AWSRoles
|
|
52
|
+
:param neo4j_session: session from the Neo4j server
|
|
53
|
+
:param mapping_regex: the regex used by the organization to map groups to aws roles
|
|
54
|
+
"""
|
|
55
|
+
query = "MATCH (app:OktaApplication{name:'amazon_aws'})--(group:OktaGroup) return group.id, group.name"
|
|
56
|
+
|
|
57
|
+
group_to_role_mapping: List[Dict] = []
|
|
58
|
+
has_results = False
|
|
59
|
+
results = neo4j_session.run(query)
|
|
60
|
+
|
|
61
|
+
for res in results:
|
|
62
|
+
has_results = True
|
|
63
|
+
# input: okta group id, okta group name. output: aws role arn.
|
|
64
|
+
mapping = transform_okta_group_to_aws_role(res["group.id"], res["group.name"], mapping_regex)
|
|
65
|
+
if mapping:
|
|
66
|
+
group_to_role_mapping.append(mapping)
|
|
67
|
+
|
|
68
|
+
if has_results and not group_to_role_mapping:
|
|
69
|
+
logger.warn(
|
|
70
|
+
"AWS Okta Application present, but no mappings were found. "
|
|
71
|
+
"Please verify the mapping regex is correct",
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return group_to_role_mapping
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@timeit
|
|
78
|
+
def _load_okta_group_to_aws_roles(
|
|
79
|
+
neo4j_session: neo4j.Session, group_to_role: List[Dict],
|
|
80
|
+
okta_update_tag: int,
|
|
81
|
+
) -> None:
|
|
82
|
+
"""
|
|
83
|
+
Add the ALLOWED_BY relationship between OktaGroups and the AWSRoles they enable
|
|
84
|
+
:param neo4j_session: session with the Neo4j server
|
|
85
|
+
:param group_to_role: the mapping between OktaGroups and the AWSRoles they allow access to
|
|
86
|
+
:param okta_update_tag: The timestamp value to set our new Neo4j resources with
|
|
87
|
+
:return: Nothing
|
|
88
|
+
"""
|
|
89
|
+
ingest_statement = """
|
|
90
|
+
|
|
91
|
+
UNWIND $GROUP_TO_ROLE as app_data
|
|
92
|
+
MATCH (role:AWSRole{arn: app_data.role})
|
|
93
|
+
MATCH (group:OktaGroup{id: app_data.groupid})
|
|
94
|
+
MERGE (role)<-[r:ALLOWED_BY]-(group)
|
|
95
|
+
ON CREATE SET r.firstseen = timestamp()
|
|
96
|
+
SET r.lastupdated = $okta_update_tag
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
neo4j_session.run(
|
|
100
|
+
ingest_statement,
|
|
101
|
+
GROUP_TO_ROLE=group_to_role,
|
|
102
|
+
okta_update_tag=okta_update_tag,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@timeit
|
|
107
|
+
def _load_human_can_assume_role(neo4j_session: neo4j.Session, okta_update_tag: int) -> None:
|
|
108
|
+
"""
|
|
109
|
+
Add the CAN_ASSUME_ROLE relationship between Humans and the AWSRoles they can assume
|
|
110
|
+
:param neo4j_session: session with the Neo4j server
|
|
111
|
+
:param okta_update_tag: The timestamp value to set our new Neo4j resources with
|
|
112
|
+
:return: Nothing
|
|
113
|
+
"""
|
|
114
|
+
ingest_statement = """
|
|
115
|
+
MATCH (role:AWSRole)<-[:ALLOWED_BY]-(:OktaGroup)<-[:MEMBER_OF_OKTA_GROUP]-(:OktaUser)-[:IDENTITY_OKTA]-(human:Human)
|
|
116
|
+
MERGE (human)-[r:CAN_ASSUME_ROLE]->(role)
|
|
117
|
+
SET r.lastupdated = $okta_update_tag
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
neo4j_session.run(
|
|
121
|
+
ingest_statement,
|
|
122
|
+
okta_update_tag=okta_update_tag,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def get_awssso_okta_groups(neo4j_session: neo4j.Session, okta_org_id: str) -> list[OktaGroup]:
|
|
127
|
+
"""
|
|
128
|
+
Return list of all Okta group ids in the current Okta organization tied to Okta Applications with name
|
|
129
|
+
"amazon_aws_sso".
|
|
130
|
+
"""
|
|
131
|
+
query = """
|
|
132
|
+
MATCH (g:OktaGroup)-[:APPLICATION]->(a:OktaApplication{name:"amazon_aws_sso"})
|
|
133
|
+
<-[:RESOURCE]-(:OktaOrganization{id: $okta_org_id})
|
|
134
|
+
RETURN g.id as group_id, g.name as group_name
|
|
135
|
+
"""
|
|
136
|
+
result = neo4j_session.read_transaction(read_list_of_dicts_tx, query, okta_org_id=okta_org_id)
|
|
137
|
+
return [OktaGroup(group_name=og['group_name'], group_id=og['group_id']) for og in result]
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def get_awssso_role_arn(account_id: str, role_hint: str, neo4j_session: neo4j.Session) -> str | None:
|
|
141
|
+
"""
|
|
142
|
+
Attempt to return the AWS role ARN for the given AWS account ID and role hint string.
|
|
143
|
+
This function exists to handle that AWS SSO roles have a 'AWSReservedSSO' prefix and a hashed suffix
|
|
144
|
+
Input:
|
|
145
|
+
- account_id: AWS account ID
|
|
146
|
+
- role_hint (str): The `AccountRole.role_name` returned by _parse_okta_group_name(). This is the part of the Okta
|
|
147
|
+
group name that refers to the AWS role name.
|
|
148
|
+
Output:
|
|
149
|
+
- If we are able to find it, returns the matching AWS role ARN.
|
|
150
|
+
"""
|
|
151
|
+
query = """
|
|
152
|
+
MATCH (:AWSAccount{id:$account_id})-[:RESOURCE]->(role:AWSRole{path:"/aws-reserved/sso.amazonaws.com/"})
|
|
153
|
+
WHERE SPLIT(role.name, '_')[1..-1][0] = $role_hint
|
|
154
|
+
RETURN role.arn AS role_arn
|
|
155
|
+
"""
|
|
156
|
+
return neo4j_session.read_transaction(read_single_value_tx, query, account_id=account_id, role_hint=role_hint)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def query_for_okta_to_awssso_role_mapping(
|
|
160
|
+
neo4j_session: neo4j.Session,
|
|
161
|
+
awssso_okta_groups: list[OktaGroup],
|
|
162
|
+
mapping_regex: str,
|
|
163
|
+
) -> list[GroupRole]:
|
|
164
|
+
"""
|
|
165
|
+
Input:
|
|
166
|
+
- neo4j session
|
|
167
|
+
- str list of Okta group names
|
|
168
|
+
- str regex that tells us how to find the AWS role name and account when given an Okta group name
|
|
169
|
+
Output:
|
|
170
|
+
- list of OktaGroup id to AWSRole arn pairs.
|
|
171
|
+
"""
|
|
172
|
+
result = []
|
|
173
|
+
for group in awssso_okta_groups:
|
|
174
|
+
account_role = _parse_okta_group_name(group.group_name, mapping_regex)
|
|
175
|
+
if not account_role:
|
|
176
|
+
logger.info(f"Okta group {group.group_name} has no associated AWS SSO role")
|
|
177
|
+
continue
|
|
178
|
+
|
|
179
|
+
role_arn = get_awssso_role_arn(account_role.account_id, account_role.role_name, neo4j_session)
|
|
180
|
+
if role_arn:
|
|
181
|
+
result.append(GroupRole(group.group_id, role_arn))
|
|
182
|
+
return result
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def _load_awssso_tx(tx: neo4j.Transaction, group_to_role: list[GroupRole], okta_update_tag: int) -> None:
|
|
186
|
+
ingest_statement = """
|
|
187
|
+
UNWIND $GROUP_TO_ROLE as app_data
|
|
188
|
+
MATCH (role:AWSRole{arn: app_data.aws_role_arn})
|
|
189
|
+
MATCH (group:OktaGroup{id: app_data.okta_group_id})
|
|
190
|
+
MERGE (role)<-[r:ALLOWED_BY]-(group)
|
|
191
|
+
ON CREATE SET r.firstseen = timestamp()
|
|
192
|
+
SET r.lastupdated = $okta_update_tag
|
|
193
|
+
"""
|
|
194
|
+
tx.run(
|
|
195
|
+
ingest_statement,
|
|
196
|
+
GROUP_TO_ROLE=[g._asdict() for g in group_to_role],
|
|
197
|
+
okta_update_tag=okta_update_tag,
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def _load_okta_group_to_awssso_roles(
|
|
202
|
+
neo4j_session: neo4j.Session,
|
|
203
|
+
group_to_role: list[GroupRole],
|
|
204
|
+
okta_update_tag: int,
|
|
205
|
+
) -> None:
|
|
206
|
+
neo4j_session.write_transaction(_load_awssso_tx, group_to_role, okta_update_tag)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
@timeit
|
|
210
|
+
def sync_okta_aws_saml(
|
|
211
|
+
neo4j_session: neo4j.Session,
|
|
212
|
+
mapping_regex: str,
|
|
213
|
+
okta_update_tag: int,
|
|
214
|
+
okta_org_id: str,
|
|
215
|
+
) -> None:
|
|
216
|
+
"""
|
|
217
|
+
Sync okta integration with saml. This will link OktaGroups to the AWSRoles they enable.
|
|
218
|
+
This is for people who use the okta saml provider for AWS
|
|
219
|
+
https://saml-doc.okta.com/SAML_Docs/How-to-Configure-SAML-2.0-for-Amazon-Web-Service#scenarioC
|
|
220
|
+
If an organization does not use okta as a SAML provider for AWS the query will not return any results
|
|
221
|
+
and nothing will be added to the graph
|
|
222
|
+
:param mapping_regex: session from the Neo4j server
|
|
223
|
+
:param okta_org_id: okta organization id
|
|
224
|
+
:param okta_update_tag: The timestamp value to set our new Neo4j resources with
|
|
225
|
+
:param okta_api_key: Okta api key
|
|
226
|
+
:return: Nothing
|
|
227
|
+
"""
|
|
228
|
+
logger.info("Syncing Okta SAML Integration")
|
|
229
|
+
|
|
230
|
+
# Query for the aws application and its associated groups
|
|
231
|
+
group_to_role_mapping = query_for_okta_to_aws_role_mapping(neo4j_session, mapping_regex)
|
|
232
|
+
_load_okta_group_to_aws_roles(neo4j_session, group_to_role_mapping, okta_update_tag)
|
|
233
|
+
_load_human_can_assume_role(neo4j_session, okta_update_tag)
|
|
234
|
+
|
|
235
|
+
sso_okta_groups = get_awssso_okta_groups(neo4j_session, okta_org_id)
|
|
236
|
+
group_to_ssorole_mapping = query_for_okta_to_awssso_role_mapping(neo4j_session, sso_okta_groups, mapping_regex)
|
|
237
|
+
_load_okta_group_to_awssso_roles(neo4j_session, group_to_ssorole_mapping, okta_update_tag)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import OtherRelationships
|
|
11
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class LaunchTemplateVersionNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef('Id')
|
|
17
|
+
name: PropertyRef = PropertyRef('LaunchTemplateName')
|
|
18
|
+
create_time: PropertyRef = PropertyRef('CreateTime')
|
|
19
|
+
created_by: PropertyRef = PropertyRef('CreatedBy')
|
|
20
|
+
default_version: PropertyRef = PropertyRef('DefaultVersion')
|
|
21
|
+
version_number: PropertyRef = PropertyRef('VersionNumber')
|
|
22
|
+
version_description: PropertyRef = PropertyRef('VersionDescription')
|
|
23
|
+
kernel_id: PropertyRef = PropertyRef('KernelId')
|
|
24
|
+
ebs_optimized: PropertyRef = PropertyRef('EbsOptimized')
|
|
25
|
+
iam_instance_profile_arn: PropertyRef = PropertyRef('IamInstanceProfileArn')
|
|
26
|
+
iam_instance_profile_name: PropertyRef = PropertyRef('IamInstanceProfileName')
|
|
27
|
+
image_id: PropertyRef = PropertyRef('ImageId')
|
|
28
|
+
instance_type: PropertyRef = PropertyRef('InstanceType')
|
|
29
|
+
key_name: PropertyRef = PropertyRef('KeyName')
|
|
30
|
+
monitoring_enabled: PropertyRef = PropertyRef('MonitoringEnabled')
|
|
31
|
+
ramdisk_id: PropertyRef = PropertyRef('RamdiskId')
|
|
32
|
+
disable_api_termination: PropertyRef = PropertyRef('DisableApiTermination')
|
|
33
|
+
instance_initiated_shutdown_behavior: PropertyRef = PropertyRef('InstanceInitiatedShutdownBehavior')
|
|
34
|
+
security_group_ids: PropertyRef = PropertyRef('SecurityGroupIds')
|
|
35
|
+
security_groups: PropertyRef = PropertyRef('SecurityGroups')
|
|
36
|
+
region: PropertyRef = PropertyRef('Region', set_in_kwargs=True)
|
|
37
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass(frozen=True)
|
|
41
|
+
class LaunchTemplateVersionToAwsAccountRelProperties(CartographyRelProperties):
|
|
42
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass(frozen=True)
|
|
46
|
+
class LaunchTemplateVersionToAWSAccount(CartographyRelSchema):
|
|
47
|
+
target_node_label: str = 'AWSAccount'
|
|
48
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
49
|
+
{'id': PropertyRef('AWS_ID', set_in_kwargs=True)},
|
|
50
|
+
)
|
|
51
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
52
|
+
rel_label: str = "RESOURCE"
|
|
53
|
+
properties: LaunchTemplateVersionToAwsAccountRelProperties = LaunchTemplateVersionToAwsAccountRelProperties()
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@dataclass(frozen=True)
|
|
57
|
+
class LaunchTemplateVersionToLTRelProperties(CartographyRelProperties):
|
|
58
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@dataclass(frozen=True)
|
|
62
|
+
class LaunchTemplateVersionToLT(CartographyRelSchema):
|
|
63
|
+
target_node_label: str = 'LaunchTemplate'
|
|
64
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
65
|
+
{'id': PropertyRef('LaunchTemplateId')},
|
|
66
|
+
)
|
|
67
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
68
|
+
rel_label: str = "VERSION"
|
|
69
|
+
properties: LaunchTemplateVersionToLTRelProperties = LaunchTemplateVersionToLTRelProperties()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@dataclass(frozen=True)
|
|
73
|
+
class LaunchTemplateVersionSchema(CartographyNodeSchema):
|
|
74
|
+
label: str = 'LaunchTemplateVersion'
|
|
75
|
+
properties: LaunchTemplateVersionNodeProperties = LaunchTemplateVersionNodeProperties()
|
|
76
|
+
sub_resource_relationship: LaunchTemplateVersionToAWSAccount = LaunchTemplateVersionToAWSAccount()
|
|
77
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
78
|
+
[
|
|
79
|
+
LaunchTemplateVersionToLT(),
|
|
80
|
+
],
|
|
81
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
|
|
3
|
+
from cartography.models.core.common import PropertyRef
|
|
4
|
+
from cartography.models.core.nodes import CartographyNodeProperties
|
|
5
|
+
from cartography.models.core.nodes import CartographyNodeSchema
|
|
6
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
8
|
+
from cartography.models.core.relationships import LinkDirection
|
|
9
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
10
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class LaunchTemplateNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef('LaunchTemplateId')
|
|
16
|
+
launch_template_id: PropertyRef = PropertyRef('LaunchTemplateId')
|
|
17
|
+
name: PropertyRef = PropertyRef('LaunchTemplateName')
|
|
18
|
+
create_time: PropertyRef = PropertyRef('CreateTime')
|
|
19
|
+
created_by: PropertyRef = PropertyRef('CreatedBy')
|
|
20
|
+
default_version_number: PropertyRef = PropertyRef('DefaultVersionNumber')
|
|
21
|
+
latest_version_number: PropertyRef = PropertyRef('LatestVersionNumber')
|
|
22
|
+
region: PropertyRef = PropertyRef('Region', set_in_kwargs=True)
|
|
23
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
class LaunchTemplateToAwsAccountRelProperties(CartographyRelProperties):
|
|
28
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@dataclass(frozen=True)
|
|
32
|
+
class LaunchTemplateToAWSAccount(CartographyRelSchema):
|
|
33
|
+
target_node_label: str = 'AWSAccount'
|
|
34
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
35
|
+
{'id': PropertyRef('AWS_ID', set_in_kwargs=True)},
|
|
36
|
+
)
|
|
37
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
38
|
+
rel_label: str = "RESOURCE"
|
|
39
|
+
properties: LaunchTemplateToAwsAccountRelProperties = LaunchTemplateToAwsAccountRelProperties()
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclass(frozen=True)
|
|
43
|
+
class LaunchTemplateSchema(CartographyNodeSchema):
|
|
44
|
+
label: str = 'LaunchTemplate'
|
|
45
|
+
properties: LaunchTemplateNodeProperties = LaunchTemplateNodeProperties()
|
|
46
|
+
sub_resource_relationship: LaunchTemplateToAWSAccount = LaunchTemplateToAWSAccount()
|
|
@@ -47,7 +47,6 @@ cartography/data/jobs/cleanup/aws_import_account_access_key_cleanup.json
|
|
|
47
47
|
cartography/data/jobs/cleanup/aws_import_apigateway_cleanup.json
|
|
48
48
|
cartography/data/jobs/cleanup/aws_import_config_cleanup.json
|
|
49
49
|
cartography/data/jobs/cleanup/aws_import_ec2_launch_configurations_cleanup.json
|
|
50
|
-
cartography/data/jobs/cleanup/aws_import_ec2_launch_templates_cleanup.json
|
|
51
50
|
cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json
|
|
52
51
|
cartography/data/jobs/cleanup/aws_import_ecr_cleanup.json
|
|
53
52
|
cartography/data/jobs/cleanup/aws_import_ecs_cleanup.json
|
|
@@ -294,6 +293,8 @@ cartography/models/aws/ec2/__init__.py
|
|
|
294
293
|
cartography/models/aws/ec2/images.py
|
|
295
294
|
cartography/models/aws/ec2/instances.py
|
|
296
295
|
cartography/models/aws/ec2/keypairs.py
|
|
296
|
+
cartography/models/aws/ec2/launch_template_versions.py
|
|
297
|
+
cartography/models/aws/ec2/launch_templates.py
|
|
297
298
|
cartography/models/aws/ec2/loadbalancerv2.py
|
|
298
299
|
cartography/models/aws/ec2/networkinterface_instance.py
|
|
299
300
|
cartography/models/aws/ec2/networkinterfaces.py
|
cartography-0.91.0/cartography/data/jobs/cleanup/aws_import_ec2_launch_templates_cleanup.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"statements": [{
|
|
3
|
-
"query": "MATCH (n:LaunchTemplateVersion)<-[:VERSION]-(:LaunchTemplate)<-[:RESOURCE]-(:AWSAccount{id: $AWS_ID}) WHERE n.lastupdated <> $UPDATE_TAG WITH n LIMIT $LIMIT_SIZE DETACH DELETE (n)",
|
|
4
|
-
"iterative": true,
|
|
5
|
-
"iterationsize": 100
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"query": "MATCH (n:LaunchTemplate)<-[:RESOURCE]-(:AWSAccount{id: $AWS_ID}) WHERE n.lastupdated <> $UPDATE_TAG WITH n LIMIT $LIMIT_SIZE DETACH DELETE (n)",
|
|
9
|
-
"iterative": true,
|
|
10
|
-
"iterationsize": 100
|
|
11
|
-
}],
|
|
12
|
-
"name": "cleanup LaunchTemplate"
|
|
13
|
-
}
|