Open comptonad opened 2 months ago
Hello,
Currently, having FalconAPI configured and set is required for IAR functionality.
I've attempted to add FalconAPI
but I'm seeing 403s in the image analyzer pod logs. What permissions are needed in this case?
time="2024-08-07T20:33:23Z" level=error msg="error getting imageanalyzer config. will try again" mode=watcher error="received 403 from uri https://api.crowdstrike.com/image-assessment/runtime/entities/config/v1 - response = {\n \"meta\": {\n \"query_time\": 1.28e-7,\n \"powered_by\": \"crowdstrike-api-gateway\",\n \"trace_id\": \"17b24113-f416-4eb3-99b8-1018bbc50fa5\"\n },\n \"errors\": [\n {\n \"code\": 403,\n \"message\": \"access denied, authorization failed\"\n }\n ]\n}"
I've followed the readme and like the CRD readmes it says I only need Falcon Images Download: Read
and Sensor Download: Read
, which to my understanding is just for pulling the docker images if an image is not specified. And to note, the credentials I've provided work for the falcon-container-sensor-pull.sh script so I know they are valid.
Minor update with additional context, in the above example I had falcon_api.cloud_region
set to us-1
. When I try the value us-2
I get 401s
time="2024-08-08T14:27:37Z" level=error msg="error getting imageanalyzer config. will try again" mode=watcher error="received 401 from uri https://api.us-2.crowdstrike.com/image-assessment/runtime/entities/config/v1 - response = {\n \"meta\": {\n \"query_time\": 1.61e-7,\n \"powered_by\": \"crowdstrike-api-gateway\",\n \"trace_id\": \"becccaf4-8c36-4890-a20e-cd1b814e3cdc\"\n },\n \"errors\": [\n {\n \"code\": 401,\n \"message\": \"access denied, invalid bearer token\"\n }\n ]\n}"
And just for kicks I tried autodiscover
(noted in some of the other resources) and I got this
time="2024-08-08T14:25:58Z" level=error msg="error getting imageanalyzer config. will try again" error="unable to get JWT: unable to refresh JWT from crowdstrike: unable to complete request to crowdstrike Auth: Post \"/oauth2/token\": unsupported protocol scheme \"\"" mode=watcher
I created the following
FalconImageAnalyzer
resource:And now the falcon-operator is in a
CrashLoopBackOff
with the following error:Looking at the line in the error above, the
FalconImageAnalyzer
controller is expecting theFalconAPI
struct to exist which it does not on the resource I created.There seems to be a gap in the logic around the config map handling here but I'm not confident enough in my understanding of what is supposed to happen here to create a PR with a fix.