cartography 0.90.0rc2__tar.gz → 0.92.0rc1__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.90.0rc2/cartography.egg-info → cartography-0.92.0rc1}/PKG-INFO +1 -1
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/cli.py +44 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/config.py +12 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/images.py +9 -9
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/snapshots.py +4 -2
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/github/teams.py +6 -3
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/github/util.py +26 -8
- cartography-0.92.0rc1/cartography/intel/kandji/__init__.py +39 -0
- cartography-0.92.0rc1/cartography/intel/kandji/devices.py +84 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/__init__.py +1 -1
- cartography-0.92.0rc1/cartography/intel/okta/awssaml.py +237 -0
- cartography-0.92.0rc1/cartography/models/kandji/device.py +48 -0
- cartography-0.92.0rc1/cartography/models/kandji/tenant.py +17 -0
- cartography-0.92.0rc1/cartography/py.typed +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/sync.py +2 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1/cartography.egg-info}/PKG-INFO +1 -1
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography.egg-info/SOURCES.txt +5 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/setup.py +1 -1
- cartography-0.90.0rc2/cartography/intel/okta/awssaml.py +0 -129
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/LICENSE +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/NOTICE +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/README.md +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/__main__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/client/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/client/aws/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/client/aws/iam.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/client/core/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/client/core/tx.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/indexes.cypher +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_ec2_asset_exposure.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_ec2_iaminstance.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_ec2_iaminstanceprofile.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_ec2_keypair_analysis.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_eks_asset_exposure.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_foreign_accounts.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_lambda_ecr.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/aws_s3acl_analysis.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/gcp_compute_asset_inet_exposure.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/gcp_gke_asset_exposure.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/gcp_gke_basic_auth.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/analysis/gsuite_human_link.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_account_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_apigateway_details.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_dns_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_account_access_key_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_apigateway_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_config_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_ec2_launch_configurations_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_ec2_launch_templates_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_ecr_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_ecs_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_elastic_ip_addresses_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_elasticache_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_es_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_groups_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_groups_membership_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_groups_policy_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_internet_gateways_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_kms_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_lambda_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_principals_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_rds_clusters_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_rds_instances_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_rds_snapshots_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_redshift_clusters_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_reserved_instances_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_roles_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_roles_policy_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_s3_acl_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_s3_buckets_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_secrets_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_securityhub_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_snapshots_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_sqs_queues_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_tags_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_tgw_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_users_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_vpc_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_import_vpc_peering_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_ingest_ec2_auto_scaling_groups_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_ingest_load_balancers_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_ingest_load_balancers_v2_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_ingest_subnets_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_kms_details.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_post_ingestion_principals_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/aws_s3_details.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_cosmosdb_cassandra_keyspace_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_cosmosdb_cors_details.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_cosmosdb_mongodb_database_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_cosmosdb_sql_database_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_cosmosdb_table_resources_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_database_account_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_import_disks_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_import_snapshots_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_import_virtual_machines_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_sql_server_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_storage_account_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_subscriptions_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/azure_tenant_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/crowdstrike_import_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/crxcavator_import_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/digitalocean_droplet_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/digitalocean_project_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_compute_firewall_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_compute_forwarding_rules_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_compute_instance_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_compute_vpc_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_compute_vpc_subnet_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_crm_folder_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_crm_organization_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_crm_project_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_dns_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_gke_cluster_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gcp_storage_bucket_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/github_repos_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/github_users_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gsuite_ingest_groups_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/gsuite_ingest_users_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/jamf_import_computers_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/kubernetes_import_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_import_compartments_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_import_groups_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_import_groups_membership_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_import_policies_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_import_users_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/oci_tenancy_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/okta_groups_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/okta_import_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/cleanup/pagerduty_import_cleanup.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/scoped_analysis/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/jobs/scoped_analysis/semgrep_sca_risk_analysis.json +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/data/permission_relationships.yaml +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/__main__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/add_shortcut.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/cli.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/config.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/detect_deviations.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/get_states.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/model.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/reporter.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/serializers.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/shortcut.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/storage.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/driftdetect/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/cleanupbuilder.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/context.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/job.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/querybuilder.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/graph/statement.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/analysis.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/apigateway.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/config.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/dynamodb.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/auto_scaling_groups.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/elastic_ip_addresses.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/instances.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/internet_gateways.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/key_pairs.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/launch_templates.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/load_balancer_v2s.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/load_balancers.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/network_interfaces.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/reserved_instances.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/security_groups.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/subnets.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/tgw.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/volumes.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/vpc.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ec2/vpc_peerings.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ecr.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ecs.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/eks.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/elasticache.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/elasticsearch.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/emr.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/iam.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/inspector.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/kms.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/lambda_function.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/organizations.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/permission_relationships.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/rds.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/redshift.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/resourcegroupstaggingapi.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/resources.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/route53.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/s3.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/secretsmanager.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/securityhub.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/sqs.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/ssm.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/util/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/util/arns.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/aws/util/common.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/compute.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/cosmosdb.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/sql.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/storage.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/subscription.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/tenant.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/util/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/azure/util/credentials.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/bigfix/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/bigfix/computers.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/create_indexes.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crowdstrike/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crowdstrike/endpoints.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crowdstrike/spotlight.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crowdstrike/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crxcavator/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/crxcavator/crxcavator.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/cve/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/cve/feed.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/digitalocean/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/digitalocean/compute.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/digitalocean/management.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/digitalocean/platform.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/dns.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/api_host.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/endpoints.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/groups.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/phones.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/tokens.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/users.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/duo/web_authn_credentials.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/compute.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/crm.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/dns.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/gke.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gcp/storage.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/github/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/github/repos.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/github/users.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gsuite/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/gsuite/api.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/jamf/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/jamf/computers.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/jamf/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/namespaces.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/pods.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/secrets.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/services.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/kubernetes/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/lastpass/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/lastpass/users.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/oci/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/oci/iam.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/oci/organizations.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/oci/utils.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/applications.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/factors.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/groups.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/organization.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/origins.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/roles.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/sync_state.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/users.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/okta/utils.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/escalation_policies.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/schedules.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/services.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/teams.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/users.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/pagerduty/vendors.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/semgrep/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/intel/semgrep/findings.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/dynamodb/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/dynamodb/gsi.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/dynamodb/tables.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/images.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/instances.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/keypairs.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/loadbalancerv2.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/networkinterface_instance.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/networkinterfaces.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/privateip_networkinterface.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/reservations.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/securitygroup_instance.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/securitygroup_networkinterface.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/subnet_instance.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/subnet_networkinterface.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ec2/volumes.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/eks/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/eks/clusters.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/emr.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/inspector/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/inspector/findings.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/inspector/packages.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ssm/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ssm/instance_information.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/aws/ssm/instance_patch.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/bigfix/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/bigfix/bigfix_computer.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/bigfix/bigfix_root.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/core/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/core/common.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/core/nodes.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/core/relationships.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/cve/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/cve/cve.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/cve/cve_feed.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/api_host.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/endpoint.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/group.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/phone.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/token.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/user.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/duo/web_authn_credential.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/github/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/github/teams.py +0 -0
- {cartography-0.90.0rc2/cartography/models/lastpass → cartography-0.92.0rc1/cartography/models/kandji}/__init__.py +0 -0
- {cartography-0.90.0rc2/cartography/models/semgrep → cartography-0.92.0rc1/cartography/models/lastpass}/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/lastpass/tenant.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/lastpass/user.py +0 -0
- /cartography-0.90.0rc2/cartography/py.typed → /cartography-0.92.0rc1/cartography/models/semgrep/__init__.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/semgrep/deployment.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/semgrep/findings.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/models/semgrep/locations.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/stats.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography/util.py +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography.egg-info/dependency_links.txt +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography.egg-info/entry_points.txt +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography.egg-info/requires.txt +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/cartography.egg-info/top_level.txt +0 -0
- {cartography-0.90.0rc2 → cartography-0.92.0rc1}/setup.cfg +0 -0
|
@@ -325,6 +325,30 @@ class CLI:
|
|
|
325
325
|
default=None,
|
|
326
326
|
help='The name of an environment variable containing a password with which to authenticate to Jamf.',
|
|
327
327
|
)
|
|
328
|
+
parser.add_argument(
|
|
329
|
+
'--kandji-base-uri',
|
|
330
|
+
type=str,
|
|
331
|
+
default=None,
|
|
332
|
+
help=(
|
|
333
|
+
'Your Kandji base URI, e.g. https://company.api.kandji.io.'
|
|
334
|
+
'Required if you are using the Kandji intel module. Ignored otherwise.'
|
|
335
|
+
),
|
|
336
|
+
)
|
|
337
|
+
parser.add_argument(
|
|
338
|
+
'--kandji-tenant-id',
|
|
339
|
+
type=str,
|
|
340
|
+
default=None,
|
|
341
|
+
help=(
|
|
342
|
+
'Your Kandji tenant id e.g. company.'
|
|
343
|
+
'Required using the Kandji intel module. Ignored otherwise.'
|
|
344
|
+
),
|
|
345
|
+
)
|
|
346
|
+
parser.add_argument(
|
|
347
|
+
'--kandji-token-env-var',
|
|
348
|
+
type=str,
|
|
349
|
+
default=None,
|
|
350
|
+
help='The name of an environment variable containing token with which to authenticate to Kandji.',
|
|
351
|
+
)
|
|
328
352
|
parser.add_argument(
|
|
329
353
|
'--k8s-kubeconfig',
|
|
330
354
|
default=None,
|
|
@@ -620,6 +644,26 @@ class CLI:
|
|
|
620
644
|
config.jamf_user = None
|
|
621
645
|
config.jamf_password = None
|
|
622
646
|
|
|
647
|
+
# Kandji config
|
|
648
|
+
if config.kandji_base_uri:
|
|
649
|
+
if config.kandji_token_env_var:
|
|
650
|
+
logger.debug(
|
|
651
|
+
"Reading Kandji API token from environment variable '%s'.",
|
|
652
|
+
config.kandji_token_env_var,
|
|
653
|
+
)
|
|
654
|
+
config.kandji_token = os.environ.get(config.kandji_token_env_var)
|
|
655
|
+
elif os.environ.get('KANDJI_TOKEN'):
|
|
656
|
+
logger.debug(
|
|
657
|
+
"Reading Kandji API token from environment variable 'KANDJI_TOKEN'.",
|
|
658
|
+
)
|
|
659
|
+
config.kandji_token = os.environ.get('KANDJI_TOKEN')
|
|
660
|
+
else:
|
|
661
|
+
logger.warning("A Kandji base URI was provided but a token was not.")
|
|
662
|
+
config.kandji_token = None
|
|
663
|
+
else:
|
|
664
|
+
logger.warning("A Kandji base URI was not provided.")
|
|
665
|
+
config.kandji_base_uri = None
|
|
666
|
+
|
|
623
667
|
if config.statsd_enabled:
|
|
624
668
|
logger.debug(
|
|
625
669
|
f'statsd enabled. Sending metrics to server {config.statsd_host}:{config.statsd_port}. '
|
|
@@ -69,6 +69,12 @@ class Config:
|
|
|
69
69
|
:param jamf_user: User name used to authenticate to the Jamf data provider. Optional.
|
|
70
70
|
:type jamf_password: string
|
|
71
71
|
:param jamf_password: Password used to authenticate to the Jamf data provider. Optional.
|
|
72
|
+
:type kandji_base_uri: string
|
|
73
|
+
:param kandji_base_uri: Kandji data provider base URI, e.g. https://company.api.kandji.io. Optional.
|
|
74
|
+
:type kandji_tenant_id: string
|
|
75
|
+
:param kandji_tenant_id: Kandji tenant id. e.g. company Optional.
|
|
76
|
+
:type kandji_token: string
|
|
77
|
+
:param kandji_token: Token used to authenticate to the Kandji data provider. Optional.
|
|
72
78
|
:type statsd_enabled: bool
|
|
73
79
|
:param statsd_enabled: Whether to collect statsd metrics such as sync execution times. Optional.
|
|
74
80
|
:type statsd_host: str
|
|
@@ -137,6 +143,9 @@ class Config:
|
|
|
137
143
|
jamf_base_uri=None,
|
|
138
144
|
jamf_user=None,
|
|
139
145
|
jamf_password=None,
|
|
146
|
+
kandji_base_uri=None,
|
|
147
|
+
kandji_tenant_id=None,
|
|
148
|
+
kandji_token=None,
|
|
140
149
|
k8s_kubeconfig=None,
|
|
141
150
|
statsd_enabled=False,
|
|
142
151
|
statsd_prefix=None,
|
|
@@ -190,6 +199,9 @@ class Config:
|
|
|
190
199
|
self.jamf_base_uri = jamf_base_uri
|
|
191
200
|
self.jamf_user = jamf_user
|
|
192
201
|
self.jamf_password = jamf_password
|
|
202
|
+
self.kandji_base_uri = kandji_base_uri
|
|
203
|
+
self.kandji_tenant_id = kandji_tenant_id
|
|
204
|
+
self.kandji_token = kandji_token
|
|
193
205
|
self.k8s_kubeconfig = k8s_kubeconfig
|
|
194
206
|
self.statsd_enabled = statsd_enabled
|
|
195
207
|
self.statsd_prefix = statsd_prefix
|
|
@@ -19,23 +19,23 @@ logger = logging.getLogger(__name__)
|
|
|
19
19
|
|
|
20
20
|
@timeit
|
|
21
21
|
def get_images_in_use(neo4j_session: neo4j.Session, region: str, current_aws_account_id: str) -> List[str]:
|
|
22
|
-
# We use OPTIONAL here to allow query chaining with queries that may not match.
|
|
23
22
|
get_images_query = """
|
|
24
|
-
|
|
23
|
+
MATCH (:AWSAccount{id: $AWS_ACCOUNT_ID})-[:RESOURCE]->(i:EC2Instance)
|
|
25
24
|
WHERE i.region = $Region
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
RETURN DISTINCT(i.imageid) as image
|
|
26
|
+
UNION
|
|
27
|
+
MATCH (:AWSAccount{id: $AWS_ACCOUNT_ID})-[:RESOURCE]->(lc:LaunchConfiguration)
|
|
28
28
|
WHERE lc.region = $Region
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
RETURN DISTINCT(lc.image_id) as image
|
|
30
|
+
UNION
|
|
31
|
+
MATCH (:AWSAccount{id: $AWS_ACCOUNT_ID})-[:RESOURCE]->(ltv:LaunchTemplateVersion)
|
|
31
32
|
WHERE ltv.region = $Region
|
|
32
|
-
|
|
33
|
-
RETURN images
|
|
33
|
+
RETURN DISTINCT(ltv.image_id) as image
|
|
34
34
|
"""
|
|
35
35
|
results = neo4j_session.run(get_images_query, AWS_ACCOUNT_ID=current_aws_account_id, Region=region)
|
|
36
36
|
images = []
|
|
37
37
|
for r in results:
|
|
38
|
-
images.
|
|
38
|
+
images.append(r['image'])
|
|
39
39
|
return images
|
|
40
40
|
|
|
41
41
|
|
|
@@ -42,8 +42,10 @@ def get_snapshots(boto3_session: boto3.session.Session, region: str, in_use_snap
|
|
|
42
42
|
snapshots.extend(page['Snapshots'])
|
|
43
43
|
except ClientError as e:
|
|
44
44
|
if e.response['Error']['Code'] == 'InvalidSnapshot.NotFound':
|
|
45
|
-
logger.warning(
|
|
46
|
-
|
|
45
|
+
logger.warning(
|
|
46
|
+
f"Failed to retrieve page of in-use, \
|
|
47
|
+
not owned snapshots. Continuing anyway. Error - {e}",
|
|
48
|
+
)
|
|
47
49
|
else:
|
|
48
50
|
raise
|
|
49
51
|
|
|
@@ -57,10 +57,13 @@ def _get_team_repos_for_multiple_teams(
|
|
|
57
57
|
|
|
58
58
|
team_repos = _get_team_repos(org, api_url, token, team_name) if repo_count > 0 else None
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
repo_urls = []
|
|
61
|
+
repo_permissions = []
|
|
62
|
+
if team_repos:
|
|
63
|
+
repo_urls = [t['url'] for t in team_repos.nodes] if team_repos.nodes else []
|
|
64
|
+
repo_permissions = [t['permission'] for t in team_repos.edges] if team_repos.edges else []
|
|
63
65
|
|
|
66
|
+
# Shape = [(repo_url, 'WRITE'), ...]]
|
|
64
67
|
result[team_name] = list(zip(repo_urls, repo_permissions))
|
|
65
68
|
return result
|
|
66
69
|
|
|
@@ -81,12 +81,12 @@ def call_github_api(query: str, variables: str, token: str, api_url: str) -> Dic
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
def fetch_page(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
token: str,
|
|
85
|
+
api_url: str,
|
|
86
|
+
organization: str,
|
|
87
|
+
query: str,
|
|
88
|
+
cursor: Optional[str] = None,
|
|
89
|
+
**kwargs: Any,
|
|
90
90
|
) -> Dict[str, Any]:
|
|
91
91
|
"""
|
|
92
92
|
Return a single page of max size 100 elements from the Github api_url using the given `query` and `cursor` params.
|
|
@@ -139,6 +139,7 @@ def fetch_all(
|
|
|
139
139
|
"""
|
|
140
140
|
cursor = None
|
|
141
141
|
has_next_page = True
|
|
142
|
+
org_data: Dict[str, Any] = {}
|
|
142
143
|
data: PaginatedGraphqlData = PaginatedGraphqlData(nodes=[], edges=[])
|
|
143
144
|
retry = 0
|
|
144
145
|
|
|
@@ -170,6 +171,15 @@ def fetch_all(
|
|
|
170
171
|
time.sleep(2 ** retry)
|
|
171
172
|
continue
|
|
172
173
|
|
|
174
|
+
if 'data' not in resp:
|
|
175
|
+
logger.warning(
|
|
176
|
+
f'Got no "data" attribute in response: {resp}. '
|
|
177
|
+
f'Stopping requests for organization: {organization} and '
|
|
178
|
+
f'resource_type: {resource_type}',
|
|
179
|
+
)
|
|
180
|
+
has_next_page = False
|
|
181
|
+
continue
|
|
182
|
+
|
|
173
183
|
resource = resp['data']['organization'][resource_type]
|
|
174
184
|
if resource_inner_type:
|
|
175
185
|
resource = resp['data']['organization'][resource_type][resource_inner_type]
|
|
@@ -180,6 +190,14 @@ def fetch_all(
|
|
|
180
190
|
|
|
181
191
|
cursor = resource['pageInfo']['endCursor']
|
|
182
192
|
has_next_page = resource['pageInfo']['hasNextPage']
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
if not org_data:
|
|
194
|
+
org_data = {
|
|
195
|
+
'url': resp['data']['organization']['url'],
|
|
196
|
+
'login': resp['data']['organization']['login'],
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if not org_data:
|
|
200
|
+
raise ValueError(
|
|
201
|
+
f"Didn't get any organization data for organization: {organization} and resource_type: {resource_type}",
|
|
202
|
+
)
|
|
185
203
|
return data, org_data
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
3
|
+
import neo4j
|
|
4
|
+
|
|
5
|
+
import cartography.intel.kandji.devices
|
|
6
|
+
from cartography.config import Config
|
|
7
|
+
from cartography.util import timeit
|
|
8
|
+
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@timeit
|
|
13
|
+
def start_kandji_ingestion(neo4j_session: neo4j.Session, config: Config) -> None:
|
|
14
|
+
"""
|
|
15
|
+
If this module is configured, perform ingestion of Kandji devices. Otherwise warn and exit
|
|
16
|
+
|
|
17
|
+
:param neo4j_session: Neo4J session for database interface
|
|
18
|
+
:param config: A cartography.config object
|
|
19
|
+
|
|
20
|
+
:return: None
|
|
21
|
+
"""
|
|
22
|
+
if config.kandji_base_uri is None or config.kandji_token is None or config.kandji_tenant_id is None:
|
|
23
|
+
logger.warning(
|
|
24
|
+
'Required parameter(s) missing. Skipping sync.',
|
|
25
|
+
'See docs to configure.',
|
|
26
|
+
)
|
|
27
|
+
return
|
|
28
|
+
|
|
29
|
+
common_job_parameters = {
|
|
30
|
+
"UPDATE_TAG": config.update_tag,
|
|
31
|
+
"TENANT_ID": config.kandji_tenant_id,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
cartography.intel.kandji.devices.sync(
|
|
35
|
+
neo4j_session,
|
|
36
|
+
config.kandji_base_uri,
|
|
37
|
+
config.kandji_token,
|
|
38
|
+
common_job_parameters=common_job_parameters,
|
|
39
|
+
)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from typing import Any
|
|
3
|
+
from typing import Dict
|
|
4
|
+
from typing import List
|
|
5
|
+
|
|
6
|
+
import neo4j
|
|
7
|
+
from requests import Session
|
|
8
|
+
|
|
9
|
+
from cartography.client.core.tx import load
|
|
10
|
+
from cartography.graph.job import GraphJob
|
|
11
|
+
from cartography.models.kandji.device import KandjiDeviceSchema
|
|
12
|
+
from cartography.models.kandji.tenant import KandjiTenantSchema
|
|
13
|
+
from cartography.util import timeit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
_TIMEOUT = (60, 60)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@timeit
|
|
21
|
+
def get(kandji_base_uri: str, kandji_token: str) -> List[Dict[str, Any]]:
|
|
22
|
+
api_endpoint = f"{kandji_base_uri}/api/v1/devices"
|
|
23
|
+
headers = {
|
|
24
|
+
'Accept': 'application/json',
|
|
25
|
+
'Authorization': f'Bearer {kandji_token}',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
session = Session()
|
|
29
|
+
req = session.get(api_endpoint, headers=headers, timeout=_TIMEOUT)
|
|
30
|
+
req.raise_for_status()
|
|
31
|
+
return req.json()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@timeit
|
|
35
|
+
def transform(api_result: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
|
36
|
+
result: List[Dict[str, Any]] = []
|
|
37
|
+
for device in api_result:
|
|
38
|
+
n_device = device
|
|
39
|
+
n_device['id'] = device['device_id']
|
|
40
|
+
result.append(n_device)
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@timeit
|
|
45
|
+
def load_devices(
|
|
46
|
+
neo4j_session: neo4j.Session,
|
|
47
|
+
common_job_parameters: Dict[str, Any],
|
|
48
|
+
data: List[Dict[str, Any]],
|
|
49
|
+
) -> None:
|
|
50
|
+
|
|
51
|
+
tenant_id = common_job_parameters["TENANT_ID"]
|
|
52
|
+
update_tag = common_job_parameters["UPDATE_TAG"]
|
|
53
|
+
|
|
54
|
+
load(
|
|
55
|
+
neo4j_session,
|
|
56
|
+
KandjiTenantSchema(),
|
|
57
|
+
[{'id': tenant_id}],
|
|
58
|
+
lastupdated=update_tag,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
load(
|
|
62
|
+
neo4j_session,
|
|
63
|
+
KandjiDeviceSchema(),
|
|
64
|
+
data,
|
|
65
|
+
lastupdated=update_tag,
|
|
66
|
+
TENANT_ID=tenant_id,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def cleanup(neo4j_session: neo4j.Session, common_job_parameters: Dict[str, Any]) -> None:
|
|
71
|
+
GraphJob.from_node_schema(KandjiDeviceSchema(), common_job_parameters).run(neo4j_session)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@timeit
|
|
75
|
+
def sync(
|
|
76
|
+
neo4j_session: neo4j.Session,
|
|
77
|
+
kandji_base_uri: str,
|
|
78
|
+
kandji_token: str,
|
|
79
|
+
common_job_parameters: Dict[str, Any],
|
|
80
|
+
) -> None:
|
|
81
|
+
devices = get(kandji_base_uri=kandji_base_uri, kandji_token=kandji_token)
|
|
82
|
+
formatted_devices = transform(devices)
|
|
83
|
+
load_devices(neo4j_session, common_job_parameters, formatted_devices)
|
|
84
|
+
cleanup(neo4j_session, common_job_parameters)
|
|
@@ -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,48 @@
|
|
|
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 KandjiDeviceNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef('id')
|
|
16
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
17
|
+
|
|
18
|
+
device_id: PropertyRef = PropertyRef('device_id')
|
|
19
|
+
device_name: PropertyRef = PropertyRef('device_name')
|
|
20
|
+
last_check_in: PropertyRef = PropertyRef('last_check_in')
|
|
21
|
+
model: PropertyRef = PropertyRef('model')
|
|
22
|
+
os_version: PropertyRef = PropertyRef('os_version')
|
|
23
|
+
platform: PropertyRef = PropertyRef('platform')
|
|
24
|
+
serial_number: PropertyRef = PropertyRef('serial_number', extra_index=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@dataclass(frozen=True)
|
|
28
|
+
class KandjiTenantToKandjiDeviceRelProperties(CartographyRelProperties):
|
|
29
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass(frozen=True)
|
|
33
|
+
# (:KandjiDevice)-[:ENROLLED_TO]->(:KandjiTenant)
|
|
34
|
+
class KandjiTenantToKandjiDeviceRel(CartographyRelSchema):
|
|
35
|
+
target_node_label: str = 'KandjiTenant'
|
|
36
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
37
|
+
{'id': PropertyRef('TENANT_ID', set_in_kwargs=True)},
|
|
38
|
+
)
|
|
39
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
40
|
+
rel_label: str = "ENROLLED_TO"
|
|
41
|
+
properties: KandjiTenantToKandjiDeviceRelProperties = KandjiTenantToKandjiDeviceRelProperties()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class KandjiDeviceSchema(CartographyNodeSchema):
|
|
46
|
+
label: str = 'KandjiDevice' # The label of the node
|
|
47
|
+
properties: KandjiDeviceNodeProperties = KandjiDeviceNodeProperties() # An object representing all properties
|
|
48
|
+
sub_resource_relationship: KandjiTenantToKandjiDeviceRel = KandjiTenantToKandjiDeviceRel()
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass(frozen=True)
|
|
9
|
+
class KandjiTenantNodeProperties(CartographyNodeProperties):
|
|
10
|
+
id: PropertyRef = PropertyRef('id')
|
|
11
|
+
lastupdated: PropertyRef = PropertyRef('lastupdated', set_in_kwargs=True)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class KandjiTenantSchema(CartographyNodeSchema):
|
|
16
|
+
label: str = 'KandjiTenant' # The label of the node
|
|
17
|
+
properties: KandjiTenantNodeProperties = KandjiTenantNodeProperties() # An object representing all properties
|
|
File without changes
|