cartography 0.104.0rc2__py3-none-any.whl → 0.123.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cartography/_version.py +16 -3
- cartography/cli.py +466 -5
- cartography/client/aws/__init__.py +19 -0
- cartography/client/aws/ecr.py +51 -0
- cartography/client/core/tx.py +357 -8
- cartography/config.py +153 -0
- cartography/data/azure_permission_relationships.yaml +20 -0
- cartography/data/gcp_permission_relationships.yaml +21 -0
- cartography/data/indexes.cypher +0 -186
- cartography/data/jobs/analysis/aws_ec2_keypair_analysis.json +2 -2
- cartography/data/jobs/analysis/keycloak_inheritance.json +30 -0
- cartography/data/jobs/cleanup/gcp_compute_vpc_cleanup.json +0 -12
- cartography/data/jobs/cleanup/github_repos_cleanup.json +2 -0
- cartography/driftdetect/cli.py +3 -2
- cartography/graph/cleanupbuilder.py +198 -41
- cartography/graph/job.py +54 -6
- cartography/graph/querybuilder.py +528 -27
- cartography/graph/statement.py +5 -1
- cartography/intel/airbyte/__init__.py +105 -0
- cartography/intel/airbyte/connections.py +120 -0
- cartography/intel/airbyte/destinations.py +81 -0
- cartography/intel/airbyte/organizations.py +59 -0
- cartography/intel/airbyte/sources.py +78 -0
- cartography/intel/airbyte/tags.py +64 -0
- cartography/intel/airbyte/users.py +106 -0
- cartography/intel/airbyte/util.py +122 -0
- cartography/intel/airbyte/workspaces.py +63 -0
- cartography/intel/aws/__init__.py +24 -9
- cartography/intel/aws/acm.py +124 -0
- cartography/intel/aws/apigateway.py +253 -22
- cartography/intel/aws/apigatewayv2.py +116 -0
- cartography/intel/aws/cloudtrail.py +17 -39
- cartography/intel/aws/cloudtrail_management_events.py +962 -0
- cartography/intel/aws/cloudwatch.py +150 -4
- cartography/intel/aws/codebuild.py +132 -0
- cartography/intel/aws/cognito.py +201 -0
- cartography/intel/aws/config.py +7 -3
- cartography/intel/aws/ec2/elastic_ip_addresses.py +3 -1
- cartography/intel/aws/ec2/instances.py +25 -1
- cartography/intel/aws/ec2/internet_gateways.py +4 -2
- cartography/intel/aws/ec2/load_balancer_v2s.py +11 -5
- cartography/intel/aws/ec2/network_interfaces.py +5 -1
- cartography/intel/aws/ec2/reserved_instances.py +3 -1
- cartography/intel/aws/ec2/security_groups.py +140 -122
- cartography/intel/aws/ec2/snapshots.py +47 -84
- cartography/intel/aws/ec2/subnets.py +37 -63
- cartography/intel/aws/ec2/tgw.py +11 -5
- cartography/intel/aws/ec2/volumes.py +1 -1
- cartography/intel/aws/ec2/vpc.py +140 -124
- cartography/intel/aws/ec2/vpc_peerings.py +262 -125
- cartography/intel/aws/ecr.py +269 -98
- cartography/intel/aws/ecr_image_layers.py +923 -0
- cartography/intel/aws/ecs.py +251 -380
- cartography/intel/aws/efs.py +179 -11
- cartography/intel/aws/elasticache.py +102 -79
- cartography/intel/aws/elasticsearch.py +13 -4
- cartography/intel/aws/eventbridge.py +164 -0
- cartography/intel/aws/glue.py +181 -0
- cartography/intel/aws/guardduty.py +443 -0
- cartography/intel/aws/iam.py +750 -493
- cartography/intel/aws/identitycenter.py +605 -83
- cartography/intel/aws/inspector.py +221 -105
- cartography/intel/aws/kms.py +173 -201
- cartography/intel/aws/lambda_function.py +272 -189
- cartography/intel/aws/organizations.py +10 -9
- cartography/intel/aws/permission_relationships.py +10 -20
- cartography/intel/aws/rds.py +337 -446
- cartography/intel/aws/redshift.py +9 -4
- cartography/intel/aws/resourcegroupstaggingapi.py +78 -19
- cartography/intel/aws/resources.py +18 -0
- cartography/intel/aws/route53.py +386 -332
- cartography/intel/aws/s3.py +322 -14
- cartography/intel/aws/secretsmanager.py +81 -49
- cartography/intel/aws/securityhub.py +3 -1
- cartography/intel/aws/sns.py +62 -2
- cartography/intel/aws/sqs.py +36 -90
- cartography/intel/aws/ssm.py +3 -5
- cartography/intel/azure/__init__.py +202 -48
- cartography/intel/azure/aks.py +175 -0
- cartography/intel/azure/app_service.py +105 -0
- cartography/intel/azure/compute.py +59 -112
- cartography/intel/azure/container_instances.py +95 -0
- cartography/intel/azure/cosmosdb.py +222 -361
- cartography/intel/azure/data_factory.py +85 -0
- cartography/intel/azure/data_factory_dataset.py +128 -0
- cartography/intel/azure/data_factory_linked_service.py +119 -0
- cartography/intel/azure/data_factory_pipeline.py +142 -0
- cartography/intel/azure/data_lake.py +124 -0
- cartography/intel/azure/event_grid.py +94 -0
- cartography/intel/azure/functions.py +124 -0
- cartography/intel/azure/load_balancers.py +263 -0
- cartography/intel/azure/logic_apps.py +101 -0
- cartography/intel/azure/monitor.py +105 -0
- cartography/intel/azure/network.py +467 -0
- cartography/intel/azure/permission_relationships.py +466 -0
- cartography/intel/azure/rbac.py +309 -0
- cartography/intel/azure/resource_groups.py +82 -0
- cartography/intel/azure/security_center.py +106 -0
- cartography/intel/azure/sql.py +145 -292
- cartography/intel/azure/storage.py +185 -262
- cartography/intel/azure/subscription.py +21 -43
- cartography/intel/azure/tenant.py +39 -30
- cartography/intel/azure/util/common.py +13 -0
- cartography/intel/azure/util/credentials.py +49 -174
- cartography/intel/azure/util/tag.py +41 -0
- cartography/intel/create_indexes.py +2 -1
- cartography/intel/crowdstrike/spotlight.py +5 -2
- cartography/intel/dns.py +5 -2
- cartography/intel/entra/__init__.py +100 -1
- cartography/intel/entra/app_role_assignments.py +284 -0
- cartography/intel/entra/applications.py +182 -0
- cartography/intel/entra/federation/__init__.py +0 -0
- cartography/intel/entra/federation/aws_identity_center.py +77 -0
- cartography/intel/entra/groups.py +198 -0
- cartography/intel/entra/ou.py +48 -24
- cartography/intel/entra/service_principals.py +217 -0
- cartography/intel/entra/users.py +105 -57
- cartography/intel/gcp/__init__.py +334 -396
- cartography/intel/gcp/bigtable_app_profile.py +101 -0
- cartography/intel/gcp/bigtable_backup.py +91 -0
- cartography/intel/gcp/bigtable_cluster.py +93 -0
- cartography/intel/gcp/bigtable_instance.py +86 -0
- cartography/intel/gcp/bigtable_table.py +87 -0
- cartography/intel/gcp/cai.py +292 -0
- cartography/intel/gcp/clients.py +112 -0
- cartography/intel/gcp/compute.py +128 -119
- cartography/intel/gcp/crm/__init__.py +0 -0
- cartography/intel/gcp/crm/folders.py +114 -0
- cartography/intel/gcp/crm/orgs.py +70 -0
- cartography/intel/gcp/crm/projects.py +120 -0
- cartography/intel/gcp/dns.py +83 -169
- cartography/intel/gcp/gke.py +72 -113
- cartography/intel/gcp/iam.py +111 -91
- cartography/intel/gcp/permission_relationships.py +394 -0
- cartography/intel/gcp/policy_bindings.py +225 -0
- cartography/intel/gcp/storage.py +75 -159
- cartography/intel/github/__init__.py +62 -25
- cartography/intel/github/commits.py +423 -0
- cartography/intel/github/repos.py +463 -85
- cartography/intel/github/teams.py +3 -3
- cartography/intel/github/users.py +5 -0
- cartography/intel/github/util.py +12 -0
- cartography/intel/googleworkspace/__init__.py +193 -0
- cartography/intel/googleworkspace/devices.py +254 -0
- cartography/intel/googleworkspace/groups.py +568 -0
- cartography/intel/googleworkspace/oauth_apps.py +259 -0
- cartography/intel/googleworkspace/tenant.py +85 -0
- cartography/intel/googleworkspace/users.py +138 -0
- cartography/intel/gsuite/__init__.py +17 -9
- cartography/intel/gsuite/groups.py +291 -0
- cartography/intel/gsuite/users.py +142 -0
- cartography/intel/jamf/computers.py +7 -1
- cartography/intel/keycloak/__init__.py +153 -0
- cartography/intel/keycloak/authenticationexecutions.py +322 -0
- cartography/intel/keycloak/authenticationflows.py +77 -0
- cartography/intel/keycloak/clients.py +187 -0
- cartography/intel/keycloak/groups.py +126 -0
- cartography/intel/keycloak/identityproviders.py +94 -0
- cartography/intel/keycloak/organizations.py +163 -0
- cartography/intel/keycloak/realms.py +61 -0
- cartography/intel/keycloak/roles.py +202 -0
- cartography/intel/keycloak/scopes.py +73 -0
- cartography/intel/keycloak/users.py +70 -0
- cartography/intel/keycloak/util.py +47 -0
- cartography/intel/kubernetes/__init__.py +60 -14
- cartography/intel/kubernetes/clusters.py +86 -0
- cartography/intel/kubernetes/eks.py +402 -0
- cartography/intel/kubernetes/namespaces.py +59 -57
- cartography/intel/kubernetes/pods.py +168 -75
- cartography/intel/kubernetes/rbac.py +597 -0
- cartography/intel/kubernetes/secrets.py +95 -45
- cartography/intel/kubernetes/services.py +131 -67
- cartography/intel/kubernetes/util.py +142 -14
- cartography/intel/oci/iam.py +23 -9
- cartography/intel/oci/organizations.py +3 -1
- cartography/intel/oci/utils.py +28 -5
- cartography/intel/okta/applications.py +15 -5
- cartography/intel/okta/awssaml.py +14 -10
- cartography/intel/okta/factors.py +3 -1
- cartography/intel/okta/groups.py +5 -2
- cartography/intel/okta/organization.py +3 -1
- cartography/intel/okta/origins.py +3 -1
- cartography/intel/okta/roles.py +5 -2
- cartography/intel/okta/users.py +10 -2
- cartography/intel/ontology/__init__.py +44 -0
- cartography/intel/ontology/devices.py +54 -0
- cartography/intel/ontology/users.py +54 -0
- cartography/intel/ontology/utils.py +176 -0
- cartography/intel/pagerduty/escalation_policies.py +13 -6
- cartography/intel/pagerduty/schedules.py +9 -4
- cartography/intel/pagerduty/services.py +7 -3
- cartography/intel/pagerduty/teams.py +5 -2
- cartography/intel/pagerduty/users.py +3 -1
- cartography/intel/pagerduty/vendors.py +3 -1
- cartography/intel/scaleway/__init__.py +127 -0
- cartography/intel/scaleway/iam/__init__.py +0 -0
- cartography/intel/scaleway/iam/apikeys.py +71 -0
- cartography/intel/scaleway/iam/applications.py +71 -0
- cartography/intel/scaleway/iam/groups.py +71 -0
- cartography/intel/scaleway/iam/users.py +71 -0
- cartography/intel/scaleway/instances/__init__.py +0 -0
- cartography/intel/scaleway/instances/flexibleips.py +86 -0
- cartography/intel/scaleway/instances/instances.py +92 -0
- cartography/intel/scaleway/projects.py +79 -0
- cartography/intel/scaleway/storage/__init__.py +0 -0
- cartography/intel/scaleway/storage/snapshots.py +86 -0
- cartography/intel/scaleway/storage/volumes.py +84 -0
- cartography/intel/scaleway/utils.py +37 -0
- cartography/intel/sentinelone/__init__.py +75 -0
- cartography/intel/sentinelone/account.py +140 -0
- cartography/intel/sentinelone/agent.py +139 -0
- cartography/intel/sentinelone/api.py +124 -0
- cartography/intel/sentinelone/application.py +248 -0
- cartography/intel/sentinelone/cve.py +119 -0
- cartography/intel/sentinelone/utils.py +28 -0
- cartography/intel/slack/__init__.py +78 -0
- cartography/intel/slack/channels.py +80 -0
- cartography/intel/slack/groups.py +90 -0
- cartography/intel/slack/teams.py +65 -0
- cartography/intel/slack/users.py +57 -0
- cartography/intel/slack/utils.py +29 -0
- cartography/intel/spacelift/__init__.py +161 -0
- cartography/intel/spacelift/account.py +73 -0
- cartography/intel/spacelift/ec2_ownership.py +280 -0
- cartography/intel/spacelift/runs.py +463 -0
- cartography/intel/spacelift/spaces.py +112 -0
- cartography/intel/spacelift/stacks.py +119 -0
- cartography/intel/spacelift/util.py +122 -0
- cartography/intel/spacelift/workerpools.py +131 -0
- cartography/intel/spacelift/workers.py +128 -0
- cartography/intel/trivy/__init__.py +272 -0
- cartography/intel/trivy/scanner.py +386 -0
- cartography/models/airbyte/__init__.py +0 -0
- cartography/models/airbyte/connection.py +138 -0
- cartography/models/airbyte/destination.py +75 -0
- cartography/models/airbyte/organization.py +19 -0
- cartography/models/airbyte/source.py +75 -0
- cartography/models/airbyte/stream.py +74 -0
- cartography/models/airbyte/tag.py +69 -0
- cartography/models/airbyte/user.py +115 -0
- cartography/models/airbyte/workspace.py +46 -0
- cartography/models/anthropic/apikey.py +4 -0
- cartography/models/anthropic/user.py +4 -0
- cartography/models/aws/acm/__init__.py +0 -0
- cartography/models/aws/acm/certificate.py +75 -0
- cartography/models/aws/apigateway/__init__.py +0 -0
- cartography/models/aws/apigateway/apigatewaydeployment.py +74 -0
- cartography/models/aws/apigateway/apigatewayintegration.py +79 -0
- cartography/models/aws/apigateway/apigatewaymethod.py +74 -0
- cartography/models/aws/apigatewayv2/__init__.py +0 -0
- cartography/models/aws/apigatewayv2/apigatewayv2.py +53 -0
- cartography/models/aws/cloudtrail/management_events.py +153 -0
- cartography/models/aws/cloudtrail/trail.py +45 -0
- cartography/models/aws/cloudwatch/log_metric_filter.py +79 -0
- cartography/models/aws/cloudwatch/metric_alarm.py +53 -0
- cartography/models/aws/codebuild/__init__.py +0 -0
- cartography/models/aws/codebuild/project.py +49 -0
- cartography/models/aws/cognito/__init__.py +0 -0
- cartography/models/aws/cognito/identity_pool.py +70 -0
- cartography/models/aws/cognito/user_pool.py +47 -0
- cartography/models/aws/dynamodb/tables.py +2 -0
- cartography/models/aws/ec2/instances.py +25 -1
- cartography/models/aws/ec2/networkinterfaces.py +4 -0
- cartography/models/aws/ec2/security_group_rules.py +109 -0
- cartography/models/aws/ec2/security_groups.py +90 -0
- cartography/models/aws/ec2/snapshots.py +58 -0
- cartography/models/aws/ec2/subnet_instance.py +2 -0
- cartography/models/aws/ec2/subnet_networkinterface.py +2 -0
- cartography/models/aws/ec2/subnets.py +65 -0
- cartography/models/aws/ec2/volumes.py +20 -0
- cartography/models/aws/ec2/vpc.py +46 -0
- cartography/models/aws/ec2/vpc_cidr.py +102 -0
- cartography/models/aws/ec2/vpc_peering.py +157 -0
- cartography/models/aws/ecr/__init__.py +0 -0
- cartography/models/aws/ecr/image.py +146 -0
- cartography/models/aws/ecr/image_layer.py +107 -0
- cartography/models/aws/ecr/repository.py +72 -0
- cartography/models/aws/ecr/repository_image.py +95 -0
- cartography/models/aws/ecs/__init__.py +0 -0
- cartography/models/aws/ecs/clusters.py +64 -0
- cartography/models/aws/ecs/container_definitions.py +93 -0
- cartography/models/aws/ecs/container_instances.py +84 -0
- cartography/models/aws/ecs/containers.py +101 -0
- cartography/models/aws/ecs/services.py +134 -0
- cartography/models/aws/ecs/task_definitions.py +135 -0
- cartography/models/aws/ecs/tasks.py +134 -0
- cartography/models/aws/efs/access_point.py +77 -0
- cartography/models/aws/efs/file_system.py +60 -0
- cartography/models/aws/efs/mount_target.py +29 -2
- cartography/models/aws/elasticache/__init__.py +0 -0
- cartography/models/aws/elasticache/cluster.py +65 -0
- cartography/models/aws/elasticache/topic.py +67 -0
- cartography/models/aws/eventbridge/__init__.py +0 -0
- cartography/models/aws/eventbridge/rule.py +77 -0
- cartography/models/aws/eventbridge/target.py +71 -0
- cartography/models/aws/glue/__init__.py +0 -0
- cartography/models/aws/glue/connection.py +51 -0
- cartography/models/aws/glue/job.py +69 -0
- cartography/models/aws/guardduty/__init__.py +1 -0
- cartography/models/aws/guardduty/detectors.py +50 -0
- cartography/models/aws/guardduty/findings.py +121 -0
- cartography/models/aws/iam/access_key.py +103 -0
- cartography/models/aws/iam/account_role.py +24 -0
- cartography/models/aws/iam/federated_principal.py +60 -0
- cartography/models/aws/iam/group.py +60 -0
- cartography/models/aws/iam/group_membership.py +27 -0
- cartography/models/aws/iam/inline_policy.py +78 -0
- cartography/models/aws/iam/managed_policy.py +51 -0
- cartography/models/aws/iam/policy_statement.py +57 -0
- cartography/models/aws/iam/role.py +83 -0
- cartography/models/aws/iam/root_principal.py +52 -0
- cartography/models/aws/iam/service_principal.py +30 -0
- cartography/models/aws/iam/sts_assumerole_allow.py +38 -0
- cartography/models/aws/iam/user.py +59 -0
- cartography/models/aws/identitycenter/awsidentitycenter.py +1 -0
- cartography/models/aws/identitycenter/awspermissionset.py +70 -0
- cartography/models/aws/identitycenter/awssogroup.py +70 -0
- cartography/models/aws/identitycenter/awsssouser.py +49 -9
- cartography/models/aws/inspector/findings.py +37 -0
- cartography/models/aws/inspector/packages.py +1 -31
- cartography/models/aws/kms/__init__.py +0 -0
- cartography/models/aws/kms/aliases.py +86 -0
- cartography/models/aws/kms/grants.py +65 -0
- cartography/models/aws/kms/keys.py +88 -0
- cartography/models/aws/lambda_function/__init__.py +0 -0
- cartography/models/aws/lambda_function/alias.py +74 -0
- cartography/models/aws/lambda_function/event_source_mapping.py +88 -0
- cartography/models/aws/lambda_function/lambda_function.py +91 -0
- cartography/models/aws/lambda_function/layer.py +72 -0
- cartography/models/aws/rds/__init__.py +0 -0
- cartography/models/aws/rds/cluster.py +91 -0
- cartography/models/aws/rds/event_subscription.py +146 -0
- cartography/models/aws/rds/instance.py +156 -0
- cartography/models/aws/rds/snapshot.py +108 -0
- cartography/models/aws/rds/subnet_group.py +101 -0
- cartography/models/aws/route53/__init__.py +0 -0
- cartography/models/aws/route53/dnsrecord.py +235 -0
- cartography/models/aws/route53/nameserver.py +63 -0
- cartography/models/aws/route53/subzone.py +40 -0
- cartography/models/aws/route53/zone.py +47 -0
- cartography/models/aws/s3/notification.py +24 -0
- cartography/models/aws/secretsmanager/secret.py +106 -0
- cartography/models/aws/secretsmanager/secret_version.py +0 -2
- cartography/models/aws/sns/topic_subscription.py +74 -0
- cartography/models/aws/sqs/__init__.py +0 -0
- cartography/models/aws/sqs/queue.py +89 -0
- cartography/models/azure/__init__.py +0 -0
- cartography/models/azure/aks_cluster.py +54 -0
- cartography/models/azure/aks_nodepool.py +54 -0
- cartography/models/azure/app_service.py +59 -0
- cartography/models/azure/container_instance.py +57 -0
- cartography/models/azure/cosmosdb/__init__.py +0 -0
- cartography/models/azure/cosmosdb/account.py +77 -0
- cartography/models/azure/cosmosdb/accountfailoverpolicy.py +77 -0
- cartography/models/azure/cosmosdb/cassandrakeyspace.py +82 -0
- cartography/models/azure/cosmosdb/cassandratable.py +81 -0
- cartography/models/azure/cosmosdb/corspolicy.py +74 -0
- cartography/models/azure/cosmosdb/dblocation.py +120 -0
- cartography/models/azure/cosmosdb/mongodbcollection.py +82 -0
- cartography/models/azure/cosmosdb/mongodbdatabase.py +78 -0
- cartography/models/azure/cosmosdb/privateendpointconnection.py +81 -0
- cartography/models/azure/cosmosdb/sqlcontainer.py +88 -0
- cartography/models/azure/cosmosdb/sqldatabase.py +78 -0
- cartography/models/azure/cosmosdb/tableresource.py +76 -0
- cartography/models/azure/cosmosdb/virtualnetworkrule.py +78 -0
- cartography/models/azure/data_factory/__init__.py +0 -0
- cartography/models/azure/data_factory/data_factory.py +51 -0
- cartography/models/azure/data_factory/data_factory_dataset.py +94 -0
- cartography/models/azure/data_factory/data_factory_linked_service.py +78 -0
- cartography/models/azure/data_factory/data_factory_pipeline.py +93 -0
- cartography/models/azure/data_lake_filesystem.py +51 -0
- cartography/models/azure/event_grid_topic.py +57 -0
- cartography/models/azure/function_app.py +59 -0
- cartography/models/azure/load_balancer/__init__.py +0 -0
- cartography/models/azure/load_balancer/load_balancer.py +49 -0
- cartography/models/azure/load_balancer/load_balancer_backend_pool.py +73 -0
- cartography/models/azure/load_balancer/load_balancer_frontend_ip.py +75 -0
- cartography/models/azure/load_balancer/load_balancer_inbound_nat_rule.py +78 -0
- cartography/models/azure/load_balancer/load_balancer_rule.py +108 -0
- cartography/models/azure/logic_apps.py +56 -0
- cartography/models/azure/monitor.py +54 -0
- cartography/models/azure/network_interface.py +112 -0
- cartography/models/azure/network_security_group.py +50 -0
- cartography/models/azure/permission_relationships.py +60 -0
- cartography/models/azure/principal.py +41 -0
- cartography/models/azure/public_ip_address.py +50 -0
- cartography/models/azure/rbac.py +268 -0
- cartography/models/azure/resource_groups.py +52 -0
- cartography/models/azure/security_center.py +50 -0
- cartography/models/azure/sql/__init__.py +0 -0
- cartography/models/azure/sql/databasethreatdetectionpolicy.py +85 -0
- cartography/models/azure/sql/elasticpool.py +77 -0
- cartography/models/azure/sql/failovergroup.py +73 -0
- cartography/models/azure/sql/recoverabledatabase.py +75 -0
- cartography/models/azure/sql/replicationlink.py +81 -0
- cartography/models/azure/sql/restorabledroppeddatabase.py +82 -0
- cartography/models/azure/sql/restorepoint.py +74 -0
- cartography/models/azure/sql/serveradadministrator.py +74 -0
- cartography/models/azure/sql/serverdnsalias.py +71 -0
- cartography/models/azure/sql/sqldatabase.py +85 -0
- cartography/models/azure/sql/sqlserver.py +50 -0
- cartography/models/azure/sql/transparentdataencryption.py +76 -0
- cartography/models/azure/storage/__init__.py +0 -0
- cartography/models/azure/storage/account.py +59 -0
- cartography/models/azure/storage/blobcontainer.py +85 -0
- cartography/models/azure/storage/blobservice.py +71 -0
- cartography/models/azure/storage/fileservice.py +71 -0
- cartography/models/azure/storage/fileshare.py +82 -0
- cartography/models/azure/storage/queue.py +71 -0
- cartography/models/azure/storage/queueservice.py +73 -0
- cartography/models/azure/storage/table.py +72 -0
- cartography/models/azure/storage/tableservice.py +73 -0
- cartography/models/azure/subnet.py +101 -0
- cartography/models/azure/subscription.py +47 -0
- cartography/models/azure/tags/__init__.py +0 -0
- cartography/models/azure/tags/storage_tag.py +40 -0
- cartography/models/azure/tags/tag.py +37 -0
- cartography/models/azure/tenant.py +17 -0
- cartography/models/azure/virtual_network.py +49 -0
- cartography/models/azure/vm/__init__.py +0 -0
- cartography/models/azure/vm/datadisk.py +80 -0
- cartography/models/azure/vm/disk.py +55 -0
- cartography/models/azure/vm/snapshot.py +56 -0
- cartography/models/azure/vm/virtualmachine.py +59 -0
- cartography/models/bigfix/bigfix_computer.py +1 -1
- cartography/models/cloudflare/member.py +4 -0
- cartography/models/core/common.py +1 -0
- cartography/models/core/nodes.py +15 -2
- cartography/models/core/relationships.py +44 -0
- cartography/models/crowdstrike/hosts.py +1 -1
- cartography/models/digitalocean/droplet.py +2 -0
- cartography/models/duo/endpoint.py +1 -1
- cartography/models/duo/phone.py +2 -2
- cartography/models/duo/user.py +4 -0
- cartography/models/entra/app_role_assignment.py +115 -0
- cartography/models/entra/application.py +49 -0
- cartography/models/entra/entra_user_to_aws_sso.py +41 -0
- cartography/models/entra/group.py +117 -0
- cartography/models/entra/service_principal.py +104 -0
- cartography/models/entra/user.py +42 -51
- cartography/models/gcp/__init__.py +0 -0
- cartography/models/gcp/bigtable/__init__.py +0 -0
- cartography/models/gcp/bigtable/app_profile.py +94 -0
- cartography/models/gcp/bigtable/backup.py +91 -0
- cartography/models/gcp/bigtable/cluster.py +73 -0
- cartography/models/gcp/bigtable/instance.py +52 -0
- cartography/models/gcp/bigtable/table.py +69 -0
- cartography/models/gcp/compute/__init__.py +0 -0
- cartography/models/gcp/compute/subnet.py +74 -0
- cartography/models/gcp/compute/vpc.py +50 -0
- cartography/models/gcp/crm/__init__.py +0 -0
- cartography/models/gcp/crm/folders.py +98 -0
- cartography/models/gcp/crm/organizations.py +21 -0
- cartography/models/gcp/crm/projects.py +100 -0
- cartography/models/gcp/dns.py +109 -0
- cartography/models/gcp/gke.py +69 -0
- cartography/models/gcp/iam.py +3 -0
- cartography/models/gcp/permission_relationships.py +61 -0
- cartography/models/gcp/policy_bindings.py +93 -0
- cartography/models/gcp/storage/__init__.py +0 -0
- cartography/models/gcp/storage/bucket.py +119 -0
- cartography/models/github/commits.py +63 -0
- cartography/models/github/dependencies.py +73 -0
- cartography/models/github/manifests.py +49 -0
- cartography/models/github/users.py +10 -0
- cartography/models/googleworkspace/__init__.py +0 -0
- cartography/models/googleworkspace/device.py +132 -0
- cartography/models/googleworkspace/group.py +382 -0
- cartography/models/googleworkspace/oauth_app.py +124 -0
- cartography/models/googleworkspace/tenant.py +30 -0
- cartography/models/googleworkspace/user.py +113 -0
- cartography/models/gsuite/__init__.py +0 -0
- cartography/models/gsuite/group.py +218 -0
- cartography/models/gsuite/tenant.py +29 -0
- cartography/models/gsuite/user.py +107 -0
- cartography/models/kandji/device.py +1 -2
- cartography/models/keycloak/__init__.py +0 -0
- cartography/models/keycloak/authenticationexecution.py +160 -0
- cartography/models/keycloak/authenticationflow.py +54 -0
- cartography/models/keycloak/client.py +179 -0
- cartography/models/keycloak/group.py +101 -0
- cartography/models/keycloak/identityprovider.py +89 -0
- cartography/models/keycloak/organization.py +116 -0
- cartography/models/keycloak/organizationdomain.py +73 -0
- cartography/models/keycloak/realm.py +173 -0
- cartography/models/keycloak/role.py +126 -0
- cartography/models/keycloak/scope.py +73 -0
- cartography/models/keycloak/user.py +55 -0
- cartography/models/kubernetes/__init__.py +0 -0
- cartography/models/kubernetes/clusterrolebindings.py +138 -0
- cartography/models/kubernetes/clusterroles.py +52 -0
- cartography/models/kubernetes/clusters.py +26 -0
- cartography/models/kubernetes/containers.py +133 -0
- cartography/models/kubernetes/groups.py +107 -0
- cartography/models/kubernetes/namespaces.py +51 -0
- cartography/models/kubernetes/oidc.py +51 -0
- cartography/models/kubernetes/pods.py +80 -0
- cartography/models/kubernetes/rolebindings.py +159 -0
- cartography/models/kubernetes/roles.py +76 -0
- cartography/models/kubernetes/secrets.py +79 -0
- cartography/models/kubernetes/serviceaccounts.py +77 -0
- cartography/models/kubernetes/services.py +108 -0
- cartography/models/kubernetes/users.py +105 -0
- cartography/models/lastpass/user.py +4 -0
- cartography/models/ontology/__init__.py +0 -0
- cartography/models/ontology/device.py +137 -0
- cartography/models/ontology/mapping/__init__.py +76 -0
- cartography/models/ontology/mapping/data/__init__.py +0 -0
- cartography/models/ontology/mapping/data/apikeys.py +93 -0
- cartography/models/ontology/mapping/data/computeinstance.py +95 -0
- cartography/models/ontology/mapping/data/containers.py +88 -0
- cartography/models/ontology/mapping/data/databases.py +182 -0
- cartography/models/ontology/mapping/data/devices.py +194 -0
- cartography/models/ontology/mapping/data/thirdpartyapps.py +140 -0
- cartography/models/ontology/mapping/data/useraccounts.py +416 -0
- cartography/models/ontology/mapping/data/users.py +63 -0
- cartography/models/ontology/mapping/specs.py +85 -0
- cartography/models/ontology/user.py +51 -0
- cartography/models/openai/adminapikey.py +4 -0
- cartography/models/openai/apikey.py +4 -0
- cartography/models/openai/user.py +4 -0
- cartography/models/scaleway/__init__.py +0 -0
- cartography/models/scaleway/iam/__init__.py +0 -0
- cartography/models/scaleway/iam/apikey.py +100 -0
- cartography/models/scaleway/iam/application.py +52 -0
- cartography/models/scaleway/iam/group.py +95 -0
- cartography/models/scaleway/iam/user.py +64 -0
- cartography/models/scaleway/instance/__init__.py +0 -0
- cartography/models/scaleway/instance/flexibleip.py +52 -0
- cartography/models/scaleway/instance/instance.py +120 -0
- cartography/models/scaleway/organization.py +19 -0
- cartography/models/scaleway/project.py +48 -0
- cartography/models/scaleway/storage/__init__.py +0 -0
- cartography/models/scaleway/storage/snapshot.py +78 -0
- cartography/models/scaleway/storage/volume.py +51 -0
- cartography/models/sentinelone/__init__.py +1 -0
- cartography/models/sentinelone/account.py +40 -0
- cartography/models/sentinelone/agent.py +50 -0
- cartography/models/sentinelone/application.py +44 -0
- cartography/models/sentinelone/application_version.py +96 -0
- cartography/models/sentinelone/cve.py +73 -0
- cartography/models/slack/__init__.py +0 -0
- cartography/models/slack/channels.py +92 -0
- cartography/models/slack/group.py +129 -0
- cartography/models/slack/team.py +22 -0
- cartography/models/slack/user.py +62 -0
- cartography/models/snipeit/asset.py +2 -0
- cartography/models/snipeit/user.py +4 -0
- cartography/models/spacelift/__init__.py +0 -0
- cartography/models/spacelift/cloudtrailevent.py +120 -0
- cartography/models/spacelift/run.py +162 -0
- cartography/models/spacelift/space.py +131 -0
- cartography/models/spacelift/spaceliftaccount.py +31 -0
- cartography/models/spacelift/spaceliftgitcommit.py +157 -0
- cartography/models/spacelift/stack.py +96 -0
- cartography/models/spacelift/user.py +63 -0
- cartography/models/spacelift/worker.py +97 -0
- cartography/models/spacelift/workerpool.py +90 -0
- cartography/models/tailscale/device.py +2 -1
- cartography/models/tailscale/user.py +6 -1
- cartography/models/trivy/__init__.py +0 -0
- cartography/models/trivy/findings.py +66 -0
- cartography/models/trivy/fix.py +66 -0
- cartography/models/trivy/package.py +71 -0
- cartography/rules/README.md +1 -0
- cartography/rules/__init__.py +0 -0
- cartography/rules/cli.py +261 -0
- cartography/rules/data/__init__.py +0 -0
- cartography/rules/data/rules/__init__.py +46 -0
- cartography/rules/data/rules/cloud_security_product_deactivated.py +49 -0
- cartography/rules/data/rules/compute_instance_exposed.py +51 -0
- cartography/rules/data/rules/database_instance_exposed.py +53 -0
- cartography/rules/data/rules/delegation_boundary_modifiable.py +90 -0
- cartography/rules/data/rules/identity_administration_privileges.py +100 -0
- cartography/rules/data/rules/inactive_user_active_accounts.py +48 -0
- cartography/rules/data/rules/malicious_npm_dependencies_shai_hulud.py +2222 -0
- cartography/rules/data/rules/mfa_missing.py +46 -0
- cartography/rules/data/rules/object_storage_public.py +100 -0
- cartography/rules/data/rules/policy_administration_privileges.py +104 -0
- cartography/rules/data/rules/unmanaged_accounts.py +43 -0
- cartography/rules/data/rules/workload_identity_admin_capabilities.py +193 -0
- cartography/rules/formatters.py +108 -0
- cartography/rules/runners.py +216 -0
- cartography/rules/spec/__init__.py +0 -0
- cartography/rules/spec/model.py +267 -0
- cartography/rules/spec/result.py +38 -0
- cartography/sync.py +25 -5
- cartography/util.py +101 -31
- {cartography-0.104.0rc2.dist-info → cartography-0.123.0.dist-info}/METADATA +61 -22
- cartography-0.123.0.dist-info/RECORD +856 -0
- {cartography-0.104.0rc2.dist-info → cartography-0.123.0.dist-info}/entry_points.txt +1 -0
- cartography/data/jobs/cleanup/aws_dns_cleanup.json +0 -65
- cartography/data/jobs/cleanup/aws_import_account_access_key_cleanup.json +0 -17
- cartography/data/jobs/cleanup/aws_import_ec2_security_groupinfo_cleanup.json +0 -24
- cartography/data/jobs/cleanup/aws_import_groups_cleanup.json +0 -13
- cartography/data/jobs/cleanup/aws_import_identity_center_cleanup.json +0 -16
- cartography/data/jobs/cleanup/aws_import_lambda_cleanup.json +0 -50
- cartography/data/jobs/cleanup/aws_import_principals_cleanup.json +0 -30
- cartography/data/jobs/cleanup/aws_import_rds_clusters_cleanup.json +0 -23
- cartography/data/jobs/cleanup/aws_import_rds_instances_cleanup.json +0 -47
- cartography/data/jobs/cleanup/aws_import_rds_snapshots_cleanup.json +0 -23
- cartography/data/jobs/cleanup/aws_import_roles_cleanup.json +0 -13
- cartography/data/jobs/cleanup/aws_import_secrets_cleanup.json +0 -8
- cartography/data/jobs/cleanup/aws_import_snapshots_cleanup.json +0 -30
- cartography/data/jobs/cleanup/aws_import_users_cleanup.json +0 -8
- cartography/data/jobs/cleanup/aws_import_vpc_cleanup.json +0 -23
- cartography/data/jobs/cleanup/aws_import_vpc_peering_cleanup.json +0 -45
- cartography/data/jobs/cleanup/aws_kms_details.json +0 -10
- cartography/data/jobs/cleanup/azure_cosmosdb_cassandra_keyspace_cleanup.json +0 -25
- cartography/data/jobs/cleanup/azure_cosmosdb_cors_details.json +0 -15
- cartography/data/jobs/cleanup/azure_cosmosdb_mongodb_database_cleanup.json +0 -25
- cartography/data/jobs/cleanup/azure_cosmosdb_sql_database_cleanup.json +0 -25
- cartography/data/jobs/cleanup/azure_cosmosdb_table_resources_cleanup.json +0 -15
- cartography/data/jobs/cleanup/azure_database_account_cleanup.json +0 -85
- cartography/data/jobs/cleanup/azure_import_disks_cleanup.json +0 -15
- cartography/data/jobs/cleanup/azure_import_snapshots_cleanup.json +0 -15
- cartography/data/jobs/cleanup/azure_import_virtual_machines_cleanup.json +0 -25
- cartography/data/jobs/cleanup/azure_sql_server_cleanup.json +0 -125
- cartography/data/jobs/cleanup/azure_storage_account_cleanup.json +0 -95
- cartography/data/jobs/cleanup/azure_subscriptions_cleanup.json +0 -14
- cartography/data/jobs/cleanup/azure_tenant_cleanup.json +0 -9
- cartography/data/jobs/cleanup/gcp_compute_vpc_subnet_cleanup.json +0 -35
- cartography/data/jobs/cleanup/gcp_crm_folder_cleanup.json +0 -23
- cartography/data/jobs/cleanup/gcp_crm_organization_cleanup.json +0 -17
- cartography/data/jobs/cleanup/gcp_crm_project_cleanup.json +0 -23
- cartography/data/jobs/cleanup/gcp_dns_cleanup.json +0 -29
- cartography/data/jobs/cleanup/gcp_gke_cluster_cleanup.json +0 -17
- cartography/data/jobs/cleanup/gcp_storage_bucket_cleanup.json +0 -29
- cartography/data/jobs/cleanup/gsuite_ingest_groups_cleanup.json +0 -23
- cartography/data/jobs/cleanup/gsuite_ingest_users_cleanup.json +0 -11
- cartography/data/jobs/cleanup/kubernetes_import_cleanup.json +0 -70
- cartography/intel/gcp/crm.py +0 -355
- cartography/intel/gsuite/api.py +0 -342
- cartography-0.104.0rc2.dist-info/RECORD +0 -455
- /cartography/data/jobs/{analysis → scoped_analysis}/aws_s3acl_analysis.json +0 -0
- /cartography/models/aws/{apigateway.py → apigateway/apigateway.py} +0 -0
- /cartography/models/aws/{apigatewaycertificate.py → apigateway/apigatewaycertificate.py} +0 -0
- /cartography/models/aws/{apigatewayresource.py → apigateway/apigatewayresource.py} +0 -0
- /cartography/models/aws/{apigatewaystage.py → apigateway/apigatewaystage.py} +0 -0
- {cartography-0.104.0rc2.dist-info → cartography-0.123.0.dist-info}/WHEEL +0 -0
- {cartography-0.104.0rc2.dist-info → cartography-0.123.0.dist-info}/licenses/LICENSE +0 -0
- {cartography-0.104.0rc2.dist-info → cartography-0.123.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
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 KeycloakRealmNodeProperties(CartographyNodeProperties):
|
|
10
|
+
id: PropertyRef = PropertyRef("id")
|
|
11
|
+
# We need to index realm name as Keycloak use this slug instead of ID in all queries
|
|
12
|
+
name: PropertyRef = PropertyRef("realm", extra_index=True)
|
|
13
|
+
display_name: PropertyRef = PropertyRef("displayName")
|
|
14
|
+
enabled: PropertyRef = PropertyRef("enabled")
|
|
15
|
+
not_before: PropertyRef = PropertyRef("notBefore")
|
|
16
|
+
default_signature_algorithm: PropertyRef = PropertyRef("defaultSignatureAlgorithm")
|
|
17
|
+
revoke_refresh_token: PropertyRef = PropertyRef("revokeRefreshToken")
|
|
18
|
+
refresh_token_max_reuse: PropertyRef = PropertyRef("refreshTokenMaxReuse")
|
|
19
|
+
access_token_lifespan: PropertyRef = PropertyRef("accessTokenLifespan")
|
|
20
|
+
access_token_lifespan_for_implicit_flow: PropertyRef = PropertyRef(
|
|
21
|
+
"accessTokenLifespanForImplicitFlow"
|
|
22
|
+
)
|
|
23
|
+
sso_session_idle_timeout: PropertyRef = PropertyRef("ssoSessionIdleTimeout")
|
|
24
|
+
sso_session_max_lifespan: PropertyRef = PropertyRef("ssoSessionMaxLifespan")
|
|
25
|
+
sso_session_idle_timeout_remember_me: PropertyRef = PropertyRef(
|
|
26
|
+
"ssoSessionIdleTimeoutRememberMe"
|
|
27
|
+
)
|
|
28
|
+
sso_session_max_lifespan_remember_me: PropertyRef = PropertyRef(
|
|
29
|
+
"ssoSessionMaxLifespanRememberMe"
|
|
30
|
+
)
|
|
31
|
+
offline_session_idle_timeout: PropertyRef = PropertyRef("offlineSessionIdleTimeout")
|
|
32
|
+
offline_session_max_lifespan_enabled: PropertyRef = PropertyRef(
|
|
33
|
+
"offlineSessionMaxLifespanEnabled"
|
|
34
|
+
)
|
|
35
|
+
offline_session_max_lifespan: PropertyRef = PropertyRef("offlineSessionMaxLifespan")
|
|
36
|
+
client_session_idle_timeout: PropertyRef = PropertyRef("clientSessionIdleTimeout")
|
|
37
|
+
client_session_max_lifespan: PropertyRef = PropertyRef("clientSessionMaxLifespan")
|
|
38
|
+
client_offline_session_idle_timeout: PropertyRef = PropertyRef(
|
|
39
|
+
"clientOfflineSessionIdleTimeout"
|
|
40
|
+
)
|
|
41
|
+
client_offline_session_max_lifespan: PropertyRef = PropertyRef(
|
|
42
|
+
"clientOfflineSessionMaxLifespan"
|
|
43
|
+
)
|
|
44
|
+
access_code_lifespan: PropertyRef = PropertyRef("accessCodeLifespan")
|
|
45
|
+
access_code_lifespan_user_action: PropertyRef = PropertyRef(
|
|
46
|
+
"accessCodeLifespanUserAction"
|
|
47
|
+
)
|
|
48
|
+
access_code_lifespan_login: PropertyRef = PropertyRef("accessCodeLifespanLogin")
|
|
49
|
+
action_token_generated_by_admin_lifespan: PropertyRef = PropertyRef(
|
|
50
|
+
"actionTokenGeneratedByAdminLifespan"
|
|
51
|
+
)
|
|
52
|
+
action_token_generated_by_user_lifespan: PropertyRef = PropertyRef(
|
|
53
|
+
"actionTokenGeneratedByUserLifespan"
|
|
54
|
+
)
|
|
55
|
+
oauth2_device_code_lifespan: PropertyRef = PropertyRef("oauth2DeviceCodeLifespan")
|
|
56
|
+
oauth2_device_polling_interval: PropertyRef = PropertyRef(
|
|
57
|
+
"oauth2DevicePollingInterval"
|
|
58
|
+
)
|
|
59
|
+
ssl_required: PropertyRef = PropertyRef("sslRequired")
|
|
60
|
+
password_credential_grant_allowed: PropertyRef = PropertyRef(
|
|
61
|
+
"passwordCredentialGrantAllowed"
|
|
62
|
+
)
|
|
63
|
+
registration_allowed: PropertyRef = PropertyRef("registrationAllowed")
|
|
64
|
+
registration_email_as_username: PropertyRef = PropertyRef(
|
|
65
|
+
"registrationEmailAsUsername"
|
|
66
|
+
)
|
|
67
|
+
remember_me: PropertyRef = PropertyRef("rememberMe")
|
|
68
|
+
verify_email: PropertyRef = PropertyRef("verifyEmail")
|
|
69
|
+
login_with_email_allowed: PropertyRef = PropertyRef("loginWithEmailAllowed")
|
|
70
|
+
duplicate_emails_allowed: PropertyRef = PropertyRef("duplicateEmailsAllowed")
|
|
71
|
+
reset_password_allowed: PropertyRef = PropertyRef("resetPasswordAllowed")
|
|
72
|
+
edit_username_allowed: PropertyRef = PropertyRef("editUsernameAllowed")
|
|
73
|
+
user_cache_enabled: PropertyRef = PropertyRef("userCacheEnabled")
|
|
74
|
+
realm_cache_enabled: PropertyRef = PropertyRef("realmCacheEnabled")
|
|
75
|
+
brute_force_protected: PropertyRef = PropertyRef("bruteForceProtected")
|
|
76
|
+
permanent_lockout: PropertyRef = PropertyRef("permanentLockout")
|
|
77
|
+
max_temporary_lockouts: PropertyRef = PropertyRef("maxTemporaryLockouts")
|
|
78
|
+
max_failure_wait_seconds: PropertyRef = PropertyRef("maxFailureWaitSeconds")
|
|
79
|
+
minimum_quick_login_wait_seconds: PropertyRef = PropertyRef(
|
|
80
|
+
"minimumQuickLoginWaitSeconds"
|
|
81
|
+
)
|
|
82
|
+
wait_increment_seconds: PropertyRef = PropertyRef("waitIncrementSeconds")
|
|
83
|
+
quick_login_check_milli_seconds: PropertyRef = PropertyRef(
|
|
84
|
+
"quickLoginCheckMilliSeconds"
|
|
85
|
+
)
|
|
86
|
+
max_delta_time_seconds: PropertyRef = PropertyRef("maxDeltaTimeSeconds")
|
|
87
|
+
failure_factor: PropertyRef = PropertyRef("failureFactor")
|
|
88
|
+
events_enabled: PropertyRef = PropertyRef("eventsEnabled")
|
|
89
|
+
events_expiration: PropertyRef = PropertyRef("eventsExpiration")
|
|
90
|
+
admin_events_enabled: PropertyRef = PropertyRef("adminEventsEnabled")
|
|
91
|
+
admin_events_details_enabled: PropertyRef = PropertyRef("adminEventsDetailsEnabled")
|
|
92
|
+
internationalization_enabled: PropertyRef = PropertyRef(
|
|
93
|
+
"internationalizationEnabled"
|
|
94
|
+
)
|
|
95
|
+
default_locale: PropertyRef = PropertyRef("defaultLocale")
|
|
96
|
+
password_policy: PropertyRef = PropertyRef("passwordPolicy")
|
|
97
|
+
otp_policy_type: PropertyRef = PropertyRef("otpPolicyType")
|
|
98
|
+
otp_policy_algorithm: PropertyRef = PropertyRef("otpPolicyAlgorithm")
|
|
99
|
+
otp_policy_initial_counter: PropertyRef = PropertyRef("otpPolicyInitialCounter")
|
|
100
|
+
otp_policy_digits: PropertyRef = PropertyRef("otpPolicyDigits")
|
|
101
|
+
otp_policy_look_ahead_window: PropertyRef = PropertyRef("otpPolicyLookAheadWindow")
|
|
102
|
+
otp_policy_period: PropertyRef = PropertyRef("otpPolicyPeriod")
|
|
103
|
+
otp_policy_code_reusable: PropertyRef = PropertyRef("otpPolicyCodeReusable")
|
|
104
|
+
web_authn_policy_rp_entity_name: PropertyRef = PropertyRef(
|
|
105
|
+
"webAuthnPolicyRpEntityName"
|
|
106
|
+
)
|
|
107
|
+
web_authn_policy_rp_id: PropertyRef = PropertyRef("webAuthnPolicyRpId")
|
|
108
|
+
web_authn_policy_attestation_conveyance_preference: PropertyRef = PropertyRef(
|
|
109
|
+
"webAuthnPolicyAttestationConveyancePreference"
|
|
110
|
+
)
|
|
111
|
+
web_authn_policy_authenticator_attachment: PropertyRef = PropertyRef(
|
|
112
|
+
"webAuthnPolicyAuthenticatorAttachment"
|
|
113
|
+
)
|
|
114
|
+
web_authn_policy_require_resident_key: PropertyRef = PropertyRef(
|
|
115
|
+
"webAuthnPolicyRequireResidentKey"
|
|
116
|
+
)
|
|
117
|
+
web_authn_policy_user_verification_requirement: PropertyRef = PropertyRef(
|
|
118
|
+
"webAuthnPolicyUserVerificationRequirement"
|
|
119
|
+
)
|
|
120
|
+
web_authn_policy_create_timeout: PropertyRef = PropertyRef(
|
|
121
|
+
"webAuthnPolicyCreateTimeout"
|
|
122
|
+
)
|
|
123
|
+
web_authn_policy_avoid_same_authenticator_register: PropertyRef = PropertyRef(
|
|
124
|
+
"webAuthnPolicyAvoidSameAuthenticatorRegister"
|
|
125
|
+
)
|
|
126
|
+
web_authn_policy_passwordless_rp_entity_name: PropertyRef = PropertyRef(
|
|
127
|
+
"webAuthnPolicyPasswordlessRpEntityName"
|
|
128
|
+
)
|
|
129
|
+
web_authn_policy_passwordless_rp_id: PropertyRef = PropertyRef(
|
|
130
|
+
"webAuthnPolicyPasswordlessRpId"
|
|
131
|
+
)
|
|
132
|
+
web_authn_policy_passwordless_attestation_conveyance_preference: PropertyRef = (
|
|
133
|
+
PropertyRef("webAuthnPolicyPasswordlessAttestationConveyancePreference")
|
|
134
|
+
)
|
|
135
|
+
web_authn_policy_passwordless_authenticator_attachment: PropertyRef = PropertyRef(
|
|
136
|
+
"webAuthnPolicyPasswordlessAuthenticatorAttachment"
|
|
137
|
+
)
|
|
138
|
+
web_authn_policy_passwordless_require_resident_key: PropertyRef = PropertyRef(
|
|
139
|
+
"webAuthnPolicyPasswordlessRequireResidentKey"
|
|
140
|
+
)
|
|
141
|
+
web_authn_policy_passwordless_user_verification_requirement: PropertyRef = (
|
|
142
|
+
PropertyRef("webAuthnPolicyPasswordlessUserVerificationRequirement")
|
|
143
|
+
)
|
|
144
|
+
web_authn_policy_passwordless_create_timeout: PropertyRef = PropertyRef(
|
|
145
|
+
"webAuthnPolicyPasswordlessCreateTimeout"
|
|
146
|
+
)
|
|
147
|
+
web_authn_policy_passwordless_avoid_same_authenticator_register: PropertyRef = (
|
|
148
|
+
PropertyRef("webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister")
|
|
149
|
+
)
|
|
150
|
+
keycloak_version: PropertyRef = PropertyRef("keycloakVersion")
|
|
151
|
+
user_managed_access_allowed: PropertyRef = PropertyRef("userManagedAccessAllowed")
|
|
152
|
+
organizations_enabled: PropertyRef = PropertyRef("organizationsEnabled")
|
|
153
|
+
verifiable_credentials_enabled: PropertyRef = PropertyRef(
|
|
154
|
+
"verifiableCredentialsEnabled"
|
|
155
|
+
)
|
|
156
|
+
admin_permissions_enabled: PropertyRef = PropertyRef("adminPermissionsEnabled")
|
|
157
|
+
social: PropertyRef = PropertyRef("social")
|
|
158
|
+
update_profile_on_initial_social_login: PropertyRef = PropertyRef(
|
|
159
|
+
"updateProfileOnInitialSocialLogin"
|
|
160
|
+
)
|
|
161
|
+
o_auth2_device_code_lifespan: PropertyRef = PropertyRef("oAuth2DeviceCodeLifespan")
|
|
162
|
+
o_auth2_device_polling_interval: PropertyRef = PropertyRef(
|
|
163
|
+
"oAuth2DevicePollingInterval"
|
|
164
|
+
)
|
|
165
|
+
bruteForceStrategy: PropertyRef = PropertyRef("bruteForceStrategy")
|
|
166
|
+
default_role_id: PropertyRef = PropertyRef("defaultRole.id")
|
|
167
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
@dataclass(frozen=True)
|
|
171
|
+
class KeycloakRealmSchema(CartographyNodeSchema):
|
|
172
|
+
label: str = "KeycloakRealm"
|
|
173
|
+
properties: KeycloakRealmNodeProperties = KeycloakRealmNodeProperties()
|
|
@@ -0,0 +1,126 @@
|
|
|
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 KeycloakRoleNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
18
|
+
description: PropertyRef = PropertyRef("description")
|
|
19
|
+
scope_param_required: PropertyRef = PropertyRef("scopeParamRequired")
|
|
20
|
+
composite: PropertyRef = PropertyRef("composite")
|
|
21
|
+
client_role: PropertyRef = PropertyRef("clientRole")
|
|
22
|
+
container_id: PropertyRef = PropertyRef("containerId")
|
|
23
|
+
# We need to store the realm name because role are often referenced by name
|
|
24
|
+
# and not by id, so we need to be able to find the role by name (that is not unique across realms)
|
|
25
|
+
realm: PropertyRef = PropertyRef("REALM", set_in_kwargs=True, extra_index=True)
|
|
26
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class KeycloakRoleToRealmRelProperties(CartographyRelProperties):
|
|
31
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass(frozen=True)
|
|
35
|
+
# (:KeycloakRole)<-[:RESOURCE]-(:KeycloakRealm)
|
|
36
|
+
class KeycloakRoleToRealmRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "KeycloakRealm"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"name": PropertyRef("REALM", set_in_kwargs=True)},
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: KeycloakRoleToRealmRelProperties = KeycloakRoleToRealmRelProperties()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@dataclass(frozen=True)
|
|
47
|
+
class KeycloakRoleToClientRelProperties(CartographyRelProperties):
|
|
48
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@dataclass(frozen=True)
|
|
52
|
+
# (:KeycloakRole)<-[:DEFINES]->(:KeycloakClient)
|
|
53
|
+
class KeycloakRoleToClientRel(CartographyRelSchema):
|
|
54
|
+
target_node_label: str = "KeycloakClient"
|
|
55
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
56
|
+
{"id": PropertyRef("containerId")},
|
|
57
|
+
)
|
|
58
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
59
|
+
rel_label: str = "DEFINES"
|
|
60
|
+
properties: KeycloakRoleToClientRelProperties = KeycloakRoleToClientRelProperties()
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass(frozen=True)
|
|
64
|
+
class KeycloakRoleToRoleRelProperties(CartographyRelProperties):
|
|
65
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass(frozen=True)
|
|
69
|
+
# (:KeycloakRole)-[:INCLUDES]->(:KeycloakRole)
|
|
70
|
+
class KeycloakRoleToRoleRel(CartographyRelSchema):
|
|
71
|
+
target_node_label: str = "KeycloakRole"
|
|
72
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
73
|
+
{"id": PropertyRef("_composite_roles", one_to_many=True)},
|
|
74
|
+
)
|
|
75
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
76
|
+
rel_label: str = "INCLUDES"
|
|
77
|
+
properties: KeycloakRoleToRoleRelProperties = KeycloakRoleToRoleRelProperties()
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@dataclass(frozen=True)
|
|
81
|
+
class KeycloakRoleToScopeRelProperties(CartographyRelProperties):
|
|
82
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@dataclass(frozen=True)
|
|
86
|
+
# (:KeycloakRole)-[:GRANTS]->(:KeycloakScope)
|
|
87
|
+
class KeycloakRoleToScopeRel(CartographyRelSchema):
|
|
88
|
+
target_node_label: str = "KeycloakScope"
|
|
89
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
90
|
+
{"id": PropertyRef("_scope_ids", one_to_many=True)},
|
|
91
|
+
)
|
|
92
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
93
|
+
rel_label: str = "GRANTS"
|
|
94
|
+
properties: KeycloakRoleToScopeRelProperties = KeycloakRoleToScopeRelProperties()
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@dataclass(frozen=True)
|
|
98
|
+
class KeycloakRoleToUserRelProperties(CartographyRelProperties):
|
|
99
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@dataclass(frozen=True)
|
|
103
|
+
# (:KeycloakRole)<-[:ASSUME_ROLE]-(:KeycloakUser)
|
|
104
|
+
class KeycloakRoleToUserRel(CartographyRelSchema):
|
|
105
|
+
target_node_label: str = "KeycloakUser"
|
|
106
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
107
|
+
{"id": PropertyRef("_direct_members", one_to_many=True)},
|
|
108
|
+
)
|
|
109
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
110
|
+
rel_label: str = "ASSUME_ROLE"
|
|
111
|
+
properties: KeycloakRoleToUserRelProperties = KeycloakRoleToUserRelProperties()
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@dataclass(frozen=True)
|
|
115
|
+
class KeycloakRoleSchema(CartographyNodeSchema):
|
|
116
|
+
label: str = "KeycloakRole"
|
|
117
|
+
properties: KeycloakRoleNodeProperties = KeycloakRoleNodeProperties()
|
|
118
|
+
sub_resource_relationship: KeycloakRoleToRealmRel = KeycloakRoleToRealmRel()
|
|
119
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
120
|
+
[
|
|
121
|
+
KeycloakRoleToClientRel(),
|
|
122
|
+
KeycloakRoleToRoleRel(),
|
|
123
|
+
KeycloakRoleToScopeRel(),
|
|
124
|
+
KeycloakRoleToUserRel(),
|
|
125
|
+
],
|
|
126
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
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 KeycloakScopeNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
18
|
+
description: PropertyRef = PropertyRef("description")
|
|
19
|
+
protocol: PropertyRef = PropertyRef("protocol")
|
|
20
|
+
include_in_token_scope: PropertyRef = PropertyRef(
|
|
21
|
+
"attributes.include.in.token.scope",
|
|
22
|
+
)
|
|
23
|
+
display_on_consent_screen: PropertyRef = PropertyRef(
|
|
24
|
+
"attributes.display.on.consent.screen",
|
|
25
|
+
)
|
|
26
|
+
# We need to store the realm name because scope are often referenced by name
|
|
27
|
+
# and not by id, so we need to be able to find the scope by name (that is not unique across realms)
|
|
28
|
+
realm: PropertyRef = PropertyRef("REALM", set_in_kwargs=True, extra_index=True)
|
|
29
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass(frozen=True)
|
|
33
|
+
class KeycloakScopeToRealmRelProperties(CartographyRelProperties):
|
|
34
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True)
|
|
38
|
+
# (:KeycloakScope)<-[:RESOURCE]-(:KeycloakRealm)
|
|
39
|
+
class KeycloakScopeToRealmRel(CartographyRelSchema):
|
|
40
|
+
target_node_label: str = "KeycloakRealm"
|
|
41
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
42
|
+
{"name": PropertyRef("REALM", set_in_kwargs=True)},
|
|
43
|
+
)
|
|
44
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
45
|
+
rel_label: str = "RESOURCE"
|
|
46
|
+
properties: KeycloakScopeToRealmRelProperties = KeycloakScopeToRealmRelProperties()
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass(frozen=True)
|
|
50
|
+
class KeycloakScopeToRoleRelProperties(CartographyRelProperties):
|
|
51
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@dataclass(frozen=True)
|
|
55
|
+
# (:KeycloakScope)<-[:GRANTS]-(:KeycloakRole)
|
|
56
|
+
class KeycloakScopeToRoleRel(CartographyRelSchema):
|
|
57
|
+
target_node_label: str = "KeycloakRole"
|
|
58
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
59
|
+
{"id": PropertyRef("_role_ids", one_to_many=True)},
|
|
60
|
+
)
|
|
61
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
62
|
+
rel_label: str = "GRANTS"
|
|
63
|
+
properties: KeycloakScopeToRoleRelProperties = KeycloakScopeToRoleRelProperties()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@dataclass(frozen=True)
|
|
67
|
+
class KeycloakScopeSchema(CartographyNodeSchema):
|
|
68
|
+
label: str = "KeycloakScope"
|
|
69
|
+
properties: KeycloakScopeNodeProperties = KeycloakScopeNodeProperties()
|
|
70
|
+
sub_resource_relationship: KeycloakScopeToRealmRel = KeycloakScopeToRealmRel()
|
|
71
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
72
|
+
[KeycloakScopeToRoleRel()],
|
|
73
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
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.nodes import ExtraNodeLabels
|
|
7
|
+
from cartography.models.core.relationships import CartographyRelProperties
|
|
8
|
+
from cartography.models.core.relationships import CartographyRelSchema
|
|
9
|
+
from cartography.models.core.relationships import LinkDirection
|
|
10
|
+
from cartography.models.core.relationships import make_target_node_matcher
|
|
11
|
+
from cartography.models.core.relationships import TargetNodeMatcher
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class KeycloakUserNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
username: PropertyRef = PropertyRef("username")
|
|
18
|
+
first_name: PropertyRef = PropertyRef("firstName")
|
|
19
|
+
last_name: PropertyRef = PropertyRef("lastName")
|
|
20
|
+
email: PropertyRef = PropertyRef("email")
|
|
21
|
+
email_verified: PropertyRef = PropertyRef("emailVerified")
|
|
22
|
+
origin: PropertyRef = PropertyRef("origin")
|
|
23
|
+
created_timestamp: PropertyRef = PropertyRef("createdTimestamp")
|
|
24
|
+
enabled: PropertyRef = PropertyRef("enabled")
|
|
25
|
+
totp: PropertyRef = PropertyRef("totp")
|
|
26
|
+
service_account_client_id: PropertyRef = PropertyRef("serviceAccountClientId")
|
|
27
|
+
not_before: PropertyRef = PropertyRef("notBefore")
|
|
28
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@dataclass(frozen=True)
|
|
32
|
+
class KeycloakUserToRealmRelProperties(CartographyRelProperties):
|
|
33
|
+
lastupdated: PropertyRef = PropertyRef("LASTUPDATED", set_in_kwargs=True)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@dataclass(frozen=True)
|
|
37
|
+
# (:KeycloakUser)<-[:RESOURCE]-(:KeycloakRealm)
|
|
38
|
+
class KeycloakUserToRealmRel(CartographyRelSchema):
|
|
39
|
+
target_node_label: str = "KeycloakRealm"
|
|
40
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
41
|
+
{"name": PropertyRef("REALM", set_in_kwargs=True)},
|
|
42
|
+
)
|
|
43
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
44
|
+
rel_label: str = "RESOURCE"
|
|
45
|
+
properties: KeycloakUserToRealmRelProperties = KeycloakUserToRealmRelProperties()
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class KeycloakUserSchema(CartographyNodeSchema):
|
|
50
|
+
label: str = "KeycloakUser"
|
|
51
|
+
extra_node_labels: ExtraNodeLabels = ExtraNodeLabels(
|
|
52
|
+
["UserAccount"]
|
|
53
|
+
) # UserAccount label is used for ontology mapping
|
|
54
|
+
properties: KeycloakUserNodeProperties = KeycloakUserNodeProperties()
|
|
55
|
+
sub_resource_relationship: KeycloakUserToRealmRel = KeycloakUserToRealmRel()
|
|
File without changes
|
|
@@ -0,0 +1,138 @@
|
|
|
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 KubernetesClusterRoleBindingNodeProperties(CartographyNodeProperties):
|
|
16
|
+
id: PropertyRef = PropertyRef("id")
|
|
17
|
+
name: PropertyRef = PropertyRef("name")
|
|
18
|
+
uid: PropertyRef = PropertyRef("uid")
|
|
19
|
+
creation_timestamp: PropertyRef = PropertyRef("creation_timestamp")
|
|
20
|
+
resource_version: PropertyRef = PropertyRef("resource_version")
|
|
21
|
+
role_name: PropertyRef = PropertyRef("role_name")
|
|
22
|
+
role_kind: PropertyRef = PropertyRef("role_kind")
|
|
23
|
+
service_account_ids: PropertyRef = PropertyRef("service_account_ids")
|
|
24
|
+
user_ids: PropertyRef = PropertyRef("user_ids")
|
|
25
|
+
group_ids: PropertyRef = PropertyRef("group_ids")
|
|
26
|
+
role_id: PropertyRef = PropertyRef("role_id")
|
|
27
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(frozen=True)
|
|
31
|
+
class KubernetesClusterRoleBindingToClusterRelProperties(CartographyRelProperties):
|
|
32
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True)
|
|
36
|
+
class KubernetesClusterRoleBindingToClusterRel(CartographyRelSchema):
|
|
37
|
+
target_node_label: str = "KubernetesCluster"
|
|
38
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
39
|
+
{"id": PropertyRef("CLUSTER_ID", set_in_kwargs=True)}
|
|
40
|
+
)
|
|
41
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
42
|
+
rel_label: str = "RESOURCE"
|
|
43
|
+
properties: KubernetesClusterRoleBindingToClusterRelProperties = (
|
|
44
|
+
KubernetesClusterRoleBindingToClusterRelProperties()
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass(frozen=True)
|
|
49
|
+
class KubernetesClusterRoleBindingToServiceAccountRelProperties(
|
|
50
|
+
CartographyRelProperties
|
|
51
|
+
):
|
|
52
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@dataclass(frozen=True)
|
|
56
|
+
class KubernetesClusterRoleBindingToServiceAccountRel(CartographyRelSchema):
|
|
57
|
+
target_node_label: str = "KubernetesServiceAccount"
|
|
58
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
59
|
+
{"id": PropertyRef("service_account_ids", one_to_many=True)}
|
|
60
|
+
)
|
|
61
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
62
|
+
rel_label: str = "SUBJECT"
|
|
63
|
+
properties: KubernetesClusterRoleBindingToServiceAccountRelProperties = (
|
|
64
|
+
KubernetesClusterRoleBindingToServiceAccountRelProperties()
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass(frozen=True)
|
|
69
|
+
class KubernetesClusterRoleBindingToClusterRoleRelProperties(CartographyRelProperties):
|
|
70
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@dataclass(frozen=True)
|
|
74
|
+
class KubernetesClusterRoleBindingToClusterRoleRel(CartographyRelSchema):
|
|
75
|
+
target_node_label: str = "KubernetesClusterRole"
|
|
76
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
77
|
+
{"id": PropertyRef("role_id")}
|
|
78
|
+
)
|
|
79
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
80
|
+
rel_label: str = "ROLE_REF"
|
|
81
|
+
properties: KubernetesClusterRoleBindingToClusterRoleRelProperties = (
|
|
82
|
+
KubernetesClusterRoleBindingToClusterRoleRelProperties()
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@dataclass(frozen=True)
|
|
87
|
+
class KubernetesClusterRoleBindingToUserRelProperties(CartographyRelProperties):
|
|
88
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@dataclass(frozen=True)
|
|
92
|
+
class KubernetesClusterRoleBindingToUserRel(CartographyRelSchema):
|
|
93
|
+
target_node_label: str = "KubernetesUser"
|
|
94
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
95
|
+
{"id": PropertyRef("user_ids", one_to_many=True)}
|
|
96
|
+
)
|
|
97
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
98
|
+
rel_label: str = "SUBJECT"
|
|
99
|
+
properties: KubernetesClusterRoleBindingToUserRelProperties = (
|
|
100
|
+
KubernetesClusterRoleBindingToUserRelProperties()
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
@dataclass(frozen=True)
|
|
105
|
+
class KubernetesClusterRoleBindingToGroupRelProperties(CartographyRelProperties):
|
|
106
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@dataclass(frozen=True)
|
|
110
|
+
class KubernetesClusterRoleBindingToGroupRel(CartographyRelSchema):
|
|
111
|
+
target_node_label: str = "KubernetesGroup"
|
|
112
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
113
|
+
{"id": PropertyRef("group_ids", one_to_many=True)}
|
|
114
|
+
)
|
|
115
|
+
direction: LinkDirection = LinkDirection.OUTWARD
|
|
116
|
+
rel_label: str = "SUBJECT"
|
|
117
|
+
properties: KubernetesClusterRoleBindingToGroupRelProperties = (
|
|
118
|
+
KubernetesClusterRoleBindingToGroupRelProperties()
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@dataclass(frozen=True)
|
|
123
|
+
class KubernetesClusterRoleBindingSchema(CartographyNodeSchema):
|
|
124
|
+
label: str = "KubernetesClusterRoleBinding"
|
|
125
|
+
properties: KubernetesClusterRoleBindingNodeProperties = (
|
|
126
|
+
KubernetesClusterRoleBindingNodeProperties()
|
|
127
|
+
)
|
|
128
|
+
sub_resource_relationship: KubernetesClusterRoleBindingToClusterRel = (
|
|
129
|
+
KubernetesClusterRoleBindingToClusterRel()
|
|
130
|
+
)
|
|
131
|
+
other_relationships: OtherRelationships = OtherRelationships(
|
|
132
|
+
[
|
|
133
|
+
KubernetesClusterRoleBindingToServiceAccountRel(),
|
|
134
|
+
KubernetesClusterRoleBindingToUserRel(),
|
|
135
|
+
KubernetesClusterRoleBindingToGroupRel(),
|
|
136
|
+
KubernetesClusterRoleBindingToClusterRoleRel(),
|
|
137
|
+
]
|
|
138
|
+
)
|
|
@@ -0,0 +1,52 @@
|
|
|
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 KubernetesClusterRoleNodeProperties(CartographyNodeProperties):
|
|
15
|
+
id: PropertyRef = PropertyRef("id")
|
|
16
|
+
name: PropertyRef = PropertyRef("name")
|
|
17
|
+
uid: PropertyRef = PropertyRef("uid")
|
|
18
|
+
creation_timestamp: PropertyRef = PropertyRef("creation_timestamp")
|
|
19
|
+
resource_version: PropertyRef = PropertyRef("resource_version")
|
|
20
|
+
api_groups: PropertyRef = PropertyRef("api_groups")
|
|
21
|
+
resources: PropertyRef = PropertyRef("resources")
|
|
22
|
+
verbs: PropertyRef = PropertyRef("verbs")
|
|
23
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass(frozen=True)
|
|
27
|
+
class KubernetesClusterRoleToClusterRelProperties(CartographyRelProperties):
|
|
28
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@dataclass(frozen=True)
|
|
32
|
+
class KubernetesClusterRoleToClusterRel(CartographyRelSchema):
|
|
33
|
+
target_node_label: str = "KubernetesCluster"
|
|
34
|
+
target_node_matcher: TargetNodeMatcher = make_target_node_matcher(
|
|
35
|
+
{"id": PropertyRef("CLUSTER_ID", set_in_kwargs=True)}
|
|
36
|
+
)
|
|
37
|
+
direction: LinkDirection = LinkDirection.INWARD
|
|
38
|
+
rel_label: str = "RESOURCE"
|
|
39
|
+
properties: KubernetesClusterRoleToClusterRelProperties = (
|
|
40
|
+
KubernetesClusterRoleToClusterRelProperties()
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class KubernetesClusterRoleSchema(CartographyNodeSchema):
|
|
46
|
+
label: str = "KubernetesClusterRole"
|
|
47
|
+
properties: KubernetesClusterRoleNodeProperties = (
|
|
48
|
+
KubernetesClusterRoleNodeProperties()
|
|
49
|
+
)
|
|
50
|
+
sub_resource_relationship: KubernetesClusterRoleToClusterRel = (
|
|
51
|
+
KubernetesClusterRoleToClusterRel()
|
|
52
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
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 KubernetesClusterNodeProperties(CartographyNodeProperties):
|
|
10
|
+
id: PropertyRef = PropertyRef("id")
|
|
11
|
+
name: PropertyRef = PropertyRef("name", extra_index=True)
|
|
12
|
+
creation_timestamp: PropertyRef = PropertyRef("creation_timestamp")
|
|
13
|
+
external_id: PropertyRef = PropertyRef("external_id", extra_index=True)
|
|
14
|
+
version: PropertyRef = PropertyRef("git_version")
|
|
15
|
+
version_major: PropertyRef = PropertyRef("version_major")
|
|
16
|
+
version_minor: PropertyRef = PropertyRef("version_minor")
|
|
17
|
+
go_version: PropertyRef = PropertyRef("go_version")
|
|
18
|
+
compiler: PropertyRef = PropertyRef("compiler")
|
|
19
|
+
platform: PropertyRef = PropertyRef("platform")
|
|
20
|
+
lastupdated: PropertyRef = PropertyRef("lastupdated", set_in_kwargs=True)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class KubernetesClusterSchema(CartographyNodeSchema):
|
|
25
|
+
label: str = "KubernetesCluster"
|
|
26
|
+
properties: KubernetesClusterNodeProperties = KubernetesClusterNodeProperties()
|