Skip to content
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 http_referer to the http_base.yaml context #984

Open
mendozal opened this issue Feb 22, 2024 · 3 comments
Open

Add http_referer to the http_base.yaml context #984

mendozal opened this issue Feb 22, 2024 · 3 comments

Comments

@mendozal
Copy link

In a mass hosting environment it would be interesting to know what customer/domain has been affected by the alert/decision.

Please add the http_referer information (evt.Parsed.http_referer) to the http_base.yaml in order to get a hint of the domain in the context data. The target_uri tag doesn't include the domain part.

@LaurenceJJones
Copy link
Contributor

In a mass hosting environment it would be interesting to know what customer/domain has been affected by the alert/decision.

Please add the http_referer information (evt.Parsed.http_referer) to the http_base.yaml in order to get a hint of the domain in the context data. The target_uri tag doesn't include the domain part.

Hey 👋🏻

I had a similar idea #957 , however, some of the CrowdSec team are wary of adding this by default due to privacy concerns. So I purpose we create a http_extended.yaml context that will have the additional context fields and the user can opt in to send this will alert context by installing this.

@blotus
Copy link
Member

blotus commented Feb 22, 2024

You can also add this yourself to the context by creating a file /etc/crowdsec/contexts/custom_http_context.yaml and adding:

context:
 http_referer:
  - evt.Parsed.http_referer

@mendozal
Copy link
Author

@LaurenceJJones I like that idea. Honestly, it's kind of confusing for me to have to remember all the custom stuff I have to set up with each install.

@blotus I did. I'm waiting for some events to happen to check if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants