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

Allow environment variables in parser and postoverflow config #3011

Open
ToshY opened this issue May 14, 2024 · 2 comments
Open

Allow environment variables in parser and postoverflow config #3011

ToshY opened this issue May 14, 2024 · 2 comments
Labels
kind/enhancement New feature or request needs/triage

Comments

@ToshY
Copy link

ToshY commented May 14, 2024

What would you like to be added?

/kind enhancement

Why is this needed?

I've already mentioned this in a Discord thread, and after some reconsidering, I thought I would still like to have an enhancement where environment variables could be used in other config files as well.


Currently, the section regarding Notification plugins show that you can use environment variables in the config files (https://docs.crowdsec.net/docs/notification_plugins/intro#environment-variables).

It would be nice to have this for other configs as well, like for parsers/postoverflows. An example would be using a parser to whilelist certain user IPs.

/etc/crowdsec/parsers/s02-enrich/user-whitelist.yaml

name: crowdsecurity/user-whitelist
description: "Whitelist events from my ipv4 addresses"
filter: "1 == 1"
whitelist:
  reason: "My ipv4 ranges"
  ip: [${USER_IPV4_WHITELIST}]
  cidr:
    - "10.0.0.0/8"
    - "172.16.0.0/12"
    - "192.168.0.0/16"

And where ${USER_IPV4_WHITELIST} contains the following:

.env

USER_IPV4_WHITELIST="'12.34.56.78','10.11.12.13'"
Copy link

@ToshY: Thanks for opening an issue, it is currently awaiting triage.

In the meantime, you can:

  1. Check Crowdsec Documentation to see if your issue can be self resolved.
  2. You can also join our Discord.
  3. Check Releases to make sure your agent is on the latest version.
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Copy link

@ToshY: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind bug
  • /kind packaging
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@github-actions github-actions bot added needs/kind kind/enhancement New feature or request and removed needs/kind labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request needs/triage
Projects
None yet
Development

No branches or pull requests

1 participant