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

ModSecurity module is always loaded, even when not active #3842

Closed
tammert opened this issue Mar 4, 2019 · 2 comments · Fixed by #4119
Closed

ModSecurity module is always loaded, even when not active #3842

tammert opened this issue Mar 4, 2019 · 2 comments · Fixed by #4119

Comments

@tammert
Copy link
Contributor

tammert commented Mar 4, 2019

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

NGINX Ingress controller version:
Since 08-10-2017.

What happened:

load_module /etc/nginx/modules/ngx_http_modsecurity_module.so;

The ModSecurity module is always loaded, even if ModSecurity it not enabled. Other parts of the template are dependent on the actual configuration:
{{ if (or $location.ModSecurity.Enable $all.Cfg.EnableModsecurity) }}

What you expected to happen:
ModSecurity module is only loaded when it is activated by configuration.

Anything else we need to know:
If you agree it would be better only to load this module when ModSec is enabled, I can submit a PR for this :).

@ElvinEfendi
Copy link
Member

@tammert it would indeed be better to not load the module if it won't be used as long as achieving it does not require complex logic or add performance penalty to new config rendering.

@tammert
Copy link
Contributor Author

tammert commented May 25, 2019

@ElvinEfendi @aledbf I'll pick this up, so please assign it to me.

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

Successfully merging a pull request may close this issue.

2 participants