elastic / cloudbeat

Analyzing Cloud Security Posture
Other
37 stars 43 forks source link

Supporting integration namespaces suffix #2289

Closed oren-zohar closed 4 days ago

oren-zohar commented 1 week ago

Motivation Following:

Cloudbeat currently hard-code the data stream namespace. We need to get the namespace config and update the data stream accordingly

Definition of done What needs to be completed at the end of this task

Out of scope Any UI/Kibana related changes

Related tasks/epics

kfirpeled commented 1 week ago

Hi @kubasobon thanks for handling this one

Will it work for both vulnerabilities and findings?

kubasobon commented 1 week ago

@kfirpeled I think so. Currently testing to confirm it works for CNVM as well.

kubasobon commented 1 week ago

@kfirpeled I checked, and it needed some extra code changes, but I have achieved the same result for CNVM. Tested, screenshots in the PR.

kubasobon commented 4 days ago

@oren-zohar Here are the results of me testing various namespace settings

agent_policy.namespace package_policies[].namespace data_stream.namespace result
default default default
default "" default
default test test
test default default
test "" test
test test test

Conclusions:

  1. Package Policy namespace overrides Agent Policy namespace setting
  2. If Package Policy namespace is left empty, it uses Agent Policy namespace's value