Skip to main content

K8s Azure

Kubernetes Protection Azure accounts is the Azure-account-list collection — ListAzureAccounts, CreateAzureSubscription (PEP 8 create_azure_subscription), and DeleteAzureSubscription (PEP 8 delete_azure_subscription). The path is GET /kubernetes-protection/entities/accounts/azure/v1 (and POST and DELETE on the same path). Remaining mutations, combined, and Image assessment policies / remaining cloud collections are not implemented (not yet). This is not CSPM Azure (/cloud-connect-cspm-azure/entities/account/v1): CSPM Azure. This is not Kubernetes AWS (/kubernetes-protection/entities/accounts/aws/v1), not Kubernetes clusters (/kubernetes-protection/entities/kubernetes/clusters/v1), and not K8s locations (/kubernetes-protection/entities/cloud-locations/v1). Kubernetes AWS is a separate collection: K8s AWS. Kubernetes clusters is a separate collection: Kubernetes. K8s locations is a separate collection: K8s locations. K8s helm is a separate collection: K8s helm. K8s Azure script is a separate collection: K8s Azure script. K8s Azure config is a separate collection: K8s Azure config. K8s Azure tenants is a separate collection: K8s Azure tenants.

This collection is not CrowdStrike production. It does not call Falcon cloud. It is not CrowdStrike Kubernetes Protection cloud.

RPC field notes: KubernetesProtectionService. REST schemas: API reference. Kubernetes Azure accounts use query params ids, subscription_id, status, and is_horizon_acct, not FQL.

These curls use Host: crowdstrike-api.localhost against Compose Traefik on :8088. If the hostname already resolves to Traefik, you can omit the Host header and call http://crowdstrike-api.localhost instead.

Auth​

Every call needs a console session or a Bearer token:

  • Cookie cs_console from CreateSession (POST /identity/entities/sessions/v1)
  • Authorization: Bearer with kubernetes-protection:read (GET) or kubernetes-protection:write (POST and DELETE)

A session cookie bypasses OAuth scopes. Seed client cs-local-hosts (hosts:read only) cannot list, create, or delete accounts (403). kubernetes-protection:read can list accounts and cannot POST or DELETE (403). Unit tests use a client named cs-local-k8s with kubernetes-protection:read; that client can GET and cannot POST or DELETE (403). Unit tests use a client named cs-local-k8sw with kubernetes-protection:write; that client can POST and DELETE. It is not in the production seed. There is no seeded production client with kubernetes-protection:read or kubernetes-protection:write — use the console cookie, or a client you created with that scope. Missing or revoked token → 401.

HTTP paths​

MethodPathUse
GET/kubernetes-protection/entities/accounts/azure/v1List Azure accounts. Query: ids, subscription_id, status (provisioned | operational), is_horizon_acct (true | false), limit, offset.
POST/kubernetes-protection/entities/accounts/azure/v1Create Azure subscription. JSON body resources with subscription_id and tenant_id. Success 200.
DELETE/kubernetes-protection/entities/accounts/azure/v1Delete Azure subscriptions. Query: ids (subscription IDs, not tenant IDs). Empty body. Success 200 empty resources.

Filters are exact match. Empty query params return every account. status other than provisioned or operational → 400. is_horizon_acct other than true or false → 400. limit and offset must be ≥ 0 else 400. Omitted limit defaults to 100 (capped at 500). Default sort is subscription_id ascending. Repeated ids / subscription_id / status: OR within a field, AND across fields. List GET ids match tenant_id. Extra unused query keys are ignored.

POST JSON body { "resources": [ { "subscription_id": "sub-lab-3", "tenant_id": "t-lab-3" } ] }. Clone success is 200 (not SOURCE 201 / 207) with that account. GET subscription_id=sub-lab-3 after POST is that row. A second POST of the same subscription_id → 400. Missing resources, empty resources, missing subscription_id, or missing tenant_id → 400. Extra unused query keys and extra unused body keys are ignored. kubernetes-protection:read on POST → 403. Do not seed sub-lab-3. Created row: status provisioned, from_cspm false. Store-only is_horizon_acct is false (not emitted).

DELETE query ids (empty body). DELETE ids are subscription IDs, not List GET ids (those are tenant IDs). Missing ids → 400. Unknown subscription id → 400. Extra unused query keys are ignored. Clone success is 200 (empty resources, not SOURCE MetaInfo-only). GET subscription_id=sub-lab-3 after DELETE is empty. A second DELETE of the same id → 400. If several ids are sent and any is unknown or empty, 400 and no row is deleted. kubernetes-protection:read on DELETE → 403. Do not seed sub-lab-3.

JSON is snake_case: subscription_id, tenant_id, status, from_cspm. Do not emit is_horizon_acct or cid on the resource.

This is not CSPM Azure, Kubernetes AWS, Kubernetes clusters, or K8s locations. CSPM Azure uses /cloud-connect-cspm-azure/entities/account/v1: CSPM Azure. Kubernetes AWS uses /kubernetes-protection/entities/accounts/aws/v1: K8s AWS. Kubernetes clusters uses /kubernetes-protection/entities/kubernetes/clusters/v1: Kubernetes. K8s locations uses /kubernetes-protection/entities/cloud-locations/v1: K8s locations. K8s helm uses /kubernetes-protection/entities/integration/agent/v1: K8s helm. Kubernetes Azure install script uses /kubernetes-protection/entities/user-script/azure/v1: K8s Azure script. Kubernetes Azure tenant config uses /kubernetes-protection/entities/config/azure/v1: K8s Azure config. GetAzureTenantIDs uses /kubernetes-protection/entities/tenants/azure/v1: K8s Azure tenants. Remaining mutations, combined, and Image assessment policies / remaining cloud collections are not implemented (not yet).

Seed accounts​

subscription_idtenant_idstatusfrom_cspm
sub-lab-1t-lab-1operationaltrue
sub-lab-2t-lab-2provisionedtrue

Empty filters return both. status=operational returns sub-lab-1. subscription_id=sub-lab-1 returns that row. List GET ids=t-lab-1 returns that row (ids are tenant IDs). is_horizon_acct is a query filter only (sub-lab-1 stores false; sub-lab-2 stores true). POST resources sub-lab-3 / t-lab-3 creates that row (status provisioned). It is not a seed. DELETE ids=sub-lab-3 removes that row. GET after DELETE is empty.

curl -sS -c cookies.txt -H 'Host: crowdstrike-api.localhost' \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"FalconLocal!1","cloud":"us-1"}' \
http://127.0.0.1:8088/identity/entities/sessions/v1

Empty filters return at least the two seed ids, including sub-lab-1:

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

status=operational returns sub-lab-1:

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?status=operational'

subscription_id=sub-lab-1 returns that row:

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?subscription_id=sub-lab-1'

ids=t-lab-1 returns that row:

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?ids=t-lab-1'

Unknown status is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?status=bogus'

No cookie and no Bearer is 401:

curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

cs-local-hosts (hosts:read only) is 403:

TOKEN='<access_token from cs-local-hosts>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

POST resources sub-lab-3 / t-lab-3 returns that account with tenant_id t-lab-3 and status provisioned. Success is 200. A later GET subscription_id=sub-lab-3 is that row. A second POST of the same subscription_id is 400:

curl -sS -X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"resources":[{"subscription_id":"sub-lab-3","tenant_id":"t-lab-3"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

Missing resources is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

Missing subscription_id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"resources":[{"tenant_id":"t-lab-3"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

Missing tenant_id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"resources":[{"subscription_id":"sub-lab-3"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

cs-local-k8s (kubernetes-protection:read) is 403 on POST:

TOKEN='<access_token from cs-local-k8s>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"resources":[{"subscription_id":"sub-lab-3","tenant_id":"t-lab-3"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

DELETE ids=sub-lab-3 returns empty resources. Success is 200. ids are subscription IDs, not tenant IDs. A later GET subscription_id=sub-lab-3 is empty. A second DELETE of the same id is 400:

curl -sS -X DELETE -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?ids=sub-lab-3'

Missing ids is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X DELETE -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

Unknown subscription id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X DELETE -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?ids=sub-unknown'

cs-local-k8s (kubernetes-protection:read) is 403 on DELETE:

TOKEN='<access_token from cs-local-k8s>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-X DELETE -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?ids=sub-lab-3'

Remaining mutations, combined, and remaining cloud collections are not implemented (not yet). Kubernetes AWS is a separate collection: K8s AWS. Kubernetes clusters is a separate collection: Kubernetes. K8s locations is a separate collection: K8s locations. K8s helm is a separate collection: K8s helm. K8s Azure script is a separate collection: K8s Azure script. K8s Azure config is a separate collection: K8s Azure config. K8s Azure tenants is a separate collection: K8s Azure tenants. CSPM Azure is a separate collection: CSPM Azure.

List (Bearer)​

TOKEN='<access_token from a client with kubernetes-protection:read>'
curl -sS -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

kubernetes-protection:read → 200 on GET. A token without that scope (including hosts:read only) → 403. Missing or revoked token → 401. There is no seeded production client with kubernetes-protection:read — use the console cookie, or a client you created with that scope.

Create (Bearer)​

TOKEN='<access_token from a client with kubernetes-protection:write>'
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d '{"resources":[{"subscription_id":"sub-lab-3","tenant_id":"t-lab-3"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1'

kubernetes-protection:write → 200 on POST (including unit-test client cs-local-k8sw). A token without that scope (including hosts:read only, e.g. cs-local-hosts, or kubernetes-protection:read, e.g. cs-local-k8s) → 403. Missing or revoked token → 401. There is no seeded production client with kubernetes-protection:write — use the console cookie, or a client you created with that scope.

Delete (Bearer)​

TOKEN='<access_token from a client with kubernetes-protection:write>'
curl -sS -X DELETE -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/azure/v1?ids=sub-lab-3'

kubernetes-protection:write → 200 on DELETE (including unit-test client cs-local-k8sw). A token without that scope (including hosts:read only, e.g. cs-local-hosts, or kubernetes-protection:read, e.g. cs-local-k8s) → 403. Missing or revoked token → 401. There is no seeded production client with kubernetes-protection:write — use the console cookie, or a client you created with that scope.

OAuth2 mint/revoke: OAuth2. Accessible scopes: API clients.