Skip to main content

K8s Azure config

Kubernetes Protection Azure tenant config is the tenant-config-list collection — GetAzureTenantConfig and PatchAzureServicePrincipal (PEP 8 update_azure_service_principal). The GET path is GET /kubernetes-protection/entities/config/azure/v1. The PATCH path is PATCH /kubernetes-protection/entities/service-principal/azure/v1. Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet). This is not Kubernetes Azure accounts (/kubernetes-protection/entities/accounts/azure/v1): K8s Azure. This is not Kubernetes Azure install script (/kubernetes-protection/entities/user-script/azure/v1): K8s Azure script. This is not GetAzureTenantIDs (/kubernetes-protection/entities/tenants/azure/v1): K8s Azure tenants. This is not CSPM Azure (/cloud-connect-cspm-azure/entities/account/v1): CSPM Azure. This is not the HelloService template sample (GET /api/hello).

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 tenant config GET uses query params ids, limit, and offset, not FQL. PATCH uses query id (Azure Tenant ID) and client_id (Azure Client ID), not FQL. Extra unused query keys are ignored.

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 (PATCH)

A session cookie bypasses OAuth scopes. Seed client cs-local-hosts (hosts:read only) cannot list tenant configs or patch the service principal (403). kubernetes-protection:read can list configs and cannot PATCH (403). GetAzureTenantConfig stays kubernetes-protection:read. Unit tests use a client named cs-local-k8s with kubernetes-protection:read; that client can GET and cannot PATCH (403). Unit tests use a client named cs-local-k8sw with kubernetes-protection:write; that client can PATCH. 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/config/azure/v1List Azure tenant configs. Query: ids (Azure tenant ids), limit, offset.
PATCH/kubernetes-protection/entities/service-principal/azure/v1Update Azure service principal client id. Query: id (Azure Tenant ID), client_id (Azure Client ID). Empty body. Success 200.

Filters are exact match. Empty GET query params return every tenant config. ids match tenant_id. Unknown ids → 200 with empty resources (not 404). limit and offset must be ≥ 0 else 400. Omitted limit defaults to 100 (capped at 500). Default sort is tenant_id ascending. Repeated ids: OR within the field.

PATCH query id and client_id (empty body). Missing id or missing client_id → 400. Unknown tenant id → 400. Extra unused query keys are ignored. Clone success is 200. A second PATCH of the same client id stays that client id (idempotent). PATCH id=t-lab-1&client_id=az-app-lab-1b returns that config with client_id az-app-lab-1b. GET ids=t-lab-1 after PATCH is az-app-lab-1b. kubernetes-protection:read on PATCH → 403.

JSON is snake_case MSA: tenant_id, client_id, public_certificate.

This is not Kubernetes Azure accounts, Kubernetes Azure install script, GetAzureTenantIDs, or CSPM Azure. Kubernetes Azure accounts uses /kubernetes-protection/entities/accounts/azure/v1: K8s Azure. Kubernetes Azure install script uses /kubernetes-protection/entities/user-script/azure/v1: K8s Azure script. GetAzureTenantIDs uses /kubernetes-protection/entities/tenants/azure/v1: K8s Azure tenants. CSPM Azure uses /cloud-connect-cspm-azure/entities/account/v1: CSPM Azure. Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet).

Seed configs​

tenant_idclient_idpublic_certificate contains
t-lab-1az-app-lab-1t-lab-1
t-lab-2az-app-lab-2t-lab-2

Empty ids return both. ids=t-lab-1 returns that row (client_id az-app-lab-1 before PATCH). ids=t-lab-2 returns that row (client_id az-app-lab-2). PATCH id=t-lab-1&client_id=az-app-lab-1b updates that row.

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 t-lab-1 / az-app-lab-1:

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

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/config/azure/v1?ids=t-lab-1'

Unknown ids is 200 with empty resources (not 404):

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/config/azure/v1?ids=not-a-tenant'

Negative limit 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/config/azure/v1?limit=-1'

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/config/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/config/azure/v1'

PATCH id=t-lab-1&client_id=az-app-lab-1b returns that config with client_id az-app-lab-1b. Empty body. Success is 200. A later GET ids=t-lab-1 on the config path is az-app-lab-1b. A second PATCH of az-app-lab-1b stays az-app-lab-1b:

curl -sS -X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?id=t-lab-1&client_id=az-app-lab-1b'

GET config after PATCH:

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

Missing id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?client_id=az-app-lab-1b'

Missing client_id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?id=t-lab-1'

Unknown tenant id is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?id=not-a-tenant&client_id=az-app-lab-1b'

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

TOKEN='<access_token from cs-local-k8s>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-X PATCH -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?id=t-lab-1&client_id=az-app-lab-1b'

Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet). Kubernetes Azure accounts is a separate collection: K8s Azure. Kubernetes Azure install script is a separate collection: K8s Azure script. GetAzureTenantIDs is a separate collection: K8s Azure tenants. CSPM Azure is a separate collection: CSPM Azure. This is not the HelloService template (GET /api/hello).

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/config/azure/v1'

kubernetes-protection:read → 200 on GET (including unit-test client cs-local-k8s). A token without that scope (including hosts:read only, e.g. cs-local-hosts) → 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. GetAzureTenantConfig stays kubernetes-protection:read.

Update (Bearer)​

TOKEN='<access_token from a client with kubernetes-protection:write>'
curl -sS -X PATCH -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/service-principal/azure/v1?id=t-lab-1&client_id=az-app-lab-1b'

kubernetes-protection:write → 200 on PATCH (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.