K8s AWS
Kubernetes Protection AWS accounts is the AWS-account-list collection
for this CID — GetAwsAccounts (SOURCE GetAWSAccountsMixin0),
UpdateAWSAccount (PEP 8 update_aws_account),
CreateAWSAccount (PEP 8 create_aws_account), and
DeleteAWSAccounts (SOURCE DeleteAWSAccountsMixin0, PEP 8
delete_aws_accounts).
The path is GET /kubernetes-protection/entities/accounts/aws/v1 (and
PATCH, 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 AWS (/cloud-connect-cspm-aws/entities/account/v1):
CSPM AWS. This is not Kubernetes clusters
(/kubernetes-protection/entities/kubernetes/clusters/v1), not
K8s locations (/kubernetes-protection/entities/cloud-locations/v1),
and not K8s Azure
(/kubernetes-protection/entities/accounts/azure/v1).
Kubernetes clusters is a separate collection:
Kubernetes. K8s locations is a separate
collection: K8s locations. K8s Azure is a
separate collection: K8s Azure.
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 AWS accounts use query
params ids, status, is_horizon_acct, and region, 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_consolefromCreateSession(POST /identity/entities/sessions/v1) Authorization: Bearerwithkubernetes-protection:read(GET) orkubernetes-protection:write(PATCH, POST, and DELETE)
A session cookie bypasses OAuth scopes. Seed client cs-local-hosts
(hosts:read only) cannot list, update, create, or delete accounts (403).
kubernetes-protection:read can list accounts and cannot PATCH,
POST, or DELETE (403). Unit tests use a client named cs-local-k8s with
kubernetes-protection:read; that client can GET and cannot
PATCH, POST, or DELETE (403). Unit tests use a client named cs-local-k8sw
with kubernetes-protection:write; that client can PATCH, 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
| Method | Path | Use |
|---|---|---|
GET | /kubernetes-protection/entities/accounts/aws/v1 | List AWS accounts. Query: ids, status (provisioned | operational), is_horizon_acct (true | false), limit, offset. |
PATCH | /kubernetes-protection/entities/accounts/aws/v1 | Update default region. Query: ids, region. Empty body. Success 200. |
POST | /kubernetes-protection/entities/accounts/aws/v1 | Create AWS account. JSON body resources with account_id and region. Success 200. |
DELETE | /kubernetes-protection/entities/accounts/aws/v1 | Delete AWS accounts. Query: ids. Empty body. Success 200 empty resources. |
Filters are exact match. Empty query params return every account in this
CID. 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 account_id ascending. Repeated
ids / status: OR within a field, AND
across fields.
PATCH query ids and region (empty body). Missing ids or missing
region → 400. Unknown account id → 400. Extra unused query
keys are ignored. Clone success is 200 (not SOURCE 207). A
second PATCH of the same region stays that region (idempotent). PATCH
ids=111111111111®ion=us-west-2 returns that account with
region us-west-2. GET ids=111111111111 after PATCH is
us-west-2. kubernetes-protection:read on PATCH → 403.
POST JSON body
{ "resources": [ { "account_id": "333333333333", "region": "eu-central-1" } ] }.
Clone success is 200 (not SOURCE 201 / 207) with that
account. GET ids=333333333333 after POST is that row. A second POST of
the same account_id → 400. Missing resources, empty resources,
missing account_id, or missing region → 400. Extra unused query
keys and extra unused body keys are ignored.
kubernetes-protection:read on POST → 403. Do not seed
333333333333. Created row: status provisioned, from_cspm
false, is_master false, cid cid-local-1, organization_id
o-laborg1, iam_role_arn
arn:aws:iam::<account_id>:role/CrowdStrikeFalcon. Store-only
is_horizon_acct is false (not emitted).
DELETE query ids (empty body). Missing ids → 400. Unknown
account id → 400. Extra unused query keys are ignored. Clone
success is 200 (empty resources, not SOURCE MetaInfo-only).
GET ids=333333333333 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
333333333333.
JSON is snake_case: account_id, organization_id, iam_role_arn,
status, region, from_cspm, is_master, cid. Do not emit
is_horizon_acct on the resource.
This is not CSPM AWS, Kubernetes clusters, K8s locations, or K8s Azure.
CSPM AWS uses /cloud-connect-cspm-aws/entities/account/v1:
CSPM AWS. Kubernetes clusters uses
/kubernetes-protection/entities/kubernetes/clusters/v1:
Kubernetes. K8s locations uses
/kubernetes-protection/entities/cloud-locations/v1:
K8s locations. K8s Azure uses
/kubernetes-protection/entities/accounts/azure/v1:
K8s Azure. Remaining mutations, combined, and Image assessment policies / remaining cloud collections are not implemented
(not yet).
Seed accounts
| account_id | status | region | from_cspm | is_master |
|---|---|---|---|---|
| 111111111111 | operational | us-east-1 | true | true |
| 222222222222 | provisioned | eu-west-1 | true | false |
organization_id / iam_role_arn match CSPM AWS seeds (o-laborg1 /
arn:aws:iam::111111111111:role/CrowdStrikeFalcon and lab-2
equivalents). cid is cid-local-1. Empty filters return both.
status=operational returns 111111111111. ids=111111111111
returns that row (region us-east-1 before PATCH).
is_horizon_acct is a query filter only
(111111111111 stores false; 222222222222 stores true).
PATCH ids=111111111111®ion=us-west-2 updates that row.
POST resources 333333333333 / eu-central-1 creates that row
(status provisioned). It is not a seed. DELETE
ids=333333333333 removes that row. GET after DELETE is empty.
Session cookie
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
List accounts (cookie)
Empty filters return at least the two seed ids, including
111111111111:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1'
status=operational returns 111111111111:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1?status=operational'
ids=111111111111 returns that row:
curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1?ids=111111111111'
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/aws/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/aws/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/aws/v1'
Update AWS account (cookie)
PATCH ids=111111111111®ion=us-west-2 returns that account with
region us-west-2. Empty body. Success is 200. A later GET
ids=111111111111 is us-west-2. A second PATCH of us-west-2
stays us-west-2:
curl -sS -X PATCH -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1?ids=111111111111®ion=us-west-2'
Missing ids 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/accounts/aws/v1?region=us-west-2'
Missing region 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/accounts/aws/v1?ids=111111111111'
Unknown account 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/accounts/aws/v1?ids=999999999999®ion=us-west-2'
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/accounts/aws/v1?ids=111111111111®ion=us-west-2'
Create AWS account (cookie)
POST resources 333333333333 / eu-central-1 returns that account
with region eu-central-1 and status provisioned. Success is
200. A later GET ids=333333333333 is that row. A second POST of
the same account_id is 400:
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
-H 'Content-Type: application/json' \
-d '{"resources":[{"account_id":"333333333333","region":"eu-central-1"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/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/aws/v1'
Missing account_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":[{"region":"eu-central-1"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1'
Missing region 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":[{"account_id":"333333333333"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/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":[{"account_id":"333333333333","region":"eu-central-1"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/v1'
Delete AWS account (cookie)
DELETE ids=333333333333 returns empty resources. Success is
200. A later GET ids=333333333333 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/aws/v1?ids=333333333333'
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/aws/v1'
Unknown account 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/aws/v1?ids=999999999999'
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/aws/v1?ids=333333333333'
Remaining mutations, combined, and Image assessment policies / remaining cloud collections are not implemented (not yet). Kubernetes clusters is a separate collection: Kubernetes. K8s locations is a separate collection: K8s locations. K8s Azure is a separate collection: K8s Azure. CSPM AWS is a separate collection: CSPM AWS.
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/aws/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.
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/accounts/aws/v1?ids=111111111111®ion=us-west-2'
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.
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":[{"account_id":"333333333333","region":"eu-central-1"}]}' \
'http://127.0.0.1:8088/kubernetes-protection/entities/accounts/aws/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/aws/v1?ids=333333333333'
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.