-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We should integrate Wazuh (or another OSS SIEM) with the cluster. The old cluster had an issue regarding duplicate agent names since people would often re-create containers with the same hostname, which we need to avoid. I also want to avoid hard-coding the Wazuh manager's hostname/IP address into the container image/provisioning script. Finally, support for a properly configured, external Wazuh server would be nice for future use where we would want a central SIEM for multiple sites.
I picture this being implemented as follows:
- Two new
images/, one for the "compute" layer and one for the "storage" layer. I'm not an expert on Wazuh architecture, so if those layers can't be cleanly separated 1 is fine. (The logic for 2 is to deal with upgrades, I can go into more detail if you want). - These image(s) should be built on top of
baseand be able to fully configure a Wazuh system via only environment variables (the motto is "no SSH-ing in"). SSSD should potentially be restricted to thesysadminsgroup. Ideally the Wazuh manager is configured to allow login via the ldap servers but an admin password set via env var is acceptable for an MVP. - Wazuh should be configured to remove inactive agents (in the config if possible, but API based cron would be fine). This is to avoid needing the create-a-container needing to delete agents along with the actual container, so if we can't do automatic agent cleanup we'll need to do that instead. Maybe via https://documentation.wazuh.com/current/user-manual/agent/agent-management/remove-agents/restful-api-remove.html#removing-disconnected-agents
- A "Wazuh API URL" setting in the create-a-container database (using the
Settingsmodel). This creates a one-to-one mapping where each cluster manager works with exactly one Wazuh manager. - A link on the sidebar that opens the Wazuh URL (preferably in a new tab) that should only appear if set in the settings.
- The
create-container.jsjob should be updated to pass the Wazuh URL to the containers via environment. - A systemd service should be added to run on first-boot (see
container-creator-init.servicefrom create-a-container for reference) which registers the agent with the configured URL. I'd like to use /etc/machine-id as a stable, randomly generated identifier rather than hostname to avoid the conflicting agent name problem from the older cluster. We can use agent_name in the configuration. - Since the manager will likely be publicly accessible, password authentication for agent enrollment may be required. The password can be set via environment variable in
create-container.jsand stored in the Settings model along with the URL. Not sure how we can prevent leaking this password when users have sudo on their own containers. https://documentation.wazuh.com/current/user-manual/agent/agent-enrollment/security-options/using-password-authentication.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels