Skip to content

feat(apache::vhost): refactor ModSecurity configuration handling#2627

Open
bovy89 wants to merge 1 commit intopuppetlabs:mainfrom
bovy89:main
Open

feat(apache::vhost): refactor ModSecurity configuration handling#2627
bovy89 wants to merge 1 commit intopuppetlabs:mainfrom
bovy89:main

Conversation

@bovy89
Copy link
Copy Markdown
Contributor

@bovy89 bovy89 commented Mar 24, 2026

Summary

  • Add modsec_rule_engine parameter (Enum['On','Off','DetectionOnly'], default 'On') to explicitly control SecRuleEngine directive
  • Deprecate modsec_disable_vhost boolean in favor of modsec_rule_engine (retain backward compatibility via deprecation warning)
  • Security fragment template is now always included (as before)
  • Add EPP signature with explicit type enforcement to _security.epp
  • Guard all non-engine directives in _security.epp behind modsec_rule_engine != 'Off' to prevent inert configuration noise when ModSecurity is disabled

Additional Context

Add any additional context about the problem here.

  • Root cause and the steps to reproduce. (If applicable)
  • Thought process behind the implementation.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@bovy89 bovy89 requested review from a team, bastelfreak, ekohl and smortex as code owners March 24, 2026 10:57
@bovy89 bovy89 force-pushed the main branch 3 times, most recently from 6f8403c to 96668e7 Compare March 24, 2026 12:53
@bovy89 bovy89 force-pushed the main branch 6 times, most recently from c4cd14d to 3fa7900 Compare April 3, 2026 21:53
- Add modsec_rule_engine parameter (Enum['On','Off','DetectionOnly'], default 'On') to explicitly control SecRuleEngine directive
- Deprecate modsec_disable_vhost boolean in favor of modsec_rule_engine (retain backward compatibility via deprecation warning)
- Security fragment template is now always included (as before)
- Add EPP signature with explicit type enforcement to _security.epp
- Guard all non-engine directives in _security.epp behind modsec_rule_engine != 'Off' to prevent inert configuration noise when ModSecurity is disabled
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 this pull request may close these issues.

1 participant