-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tainted nextcloud-logs.yaml parser to crowdsec.service #54
Conversation
As alternative to a custom configuration, can we switch to Nextcloud JSON log and set Podman log tag to "nextcloud"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please choose a different path for the new .yaml file.
imageroot/crowdsec.service
Outdated
@@ -38,6 +38,7 @@ ExecStart=/usr/bin/podman run \ | |||
--volume ./crowdsec_config:/etc/crowdsec:Z \ | |||
--volume %N-data:/var/lib/crowdsec/data:Z \ | |||
--volume ${CROWDSEC_JOURNAL}:/run/log/journal \ | |||
--volume ./tainted/nextcloud-logs.yaml:/etc/crowdsec/hub/parsers/s01-parse/crowdsecurity/nextcloud-logs.yaml:Z \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 10initialize
, the Nextcloud collection (and the included parser) is installed after the tainted parser YAML file is mounted as a Podman volume. Is this safe for both new installs and updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for upgrades yes no issue
for first install I missed it, we need to reload the configuration at the end, it is the easiest way
35736d1
to
9b3d853
Compare
eff36d5
to
7a2d034
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With this pull request I add a tainted configuration to the nextcloud parser of crowdsec
Sadly crowdsec does not offer to overwrite its configuration files like fail2ban, we need to modify the configuration and crowdsec should see them as
tainted
and does not overwrite them.we have to modify it for two things
nextloud-app
and notnextcloud
evidences of the ban
Crowdsec has seen the parsed has been tainted
Sep 13 08:47:39 R1-pve crowdsec4[76868]: time="2024-09-13T06:47:39Z" level=warning msg="⚠️ crowdsecurity/nextcloud-logs is tainted, --force to overwrite
"NethServer/dev#7018