fix(roles/apache_httpd)!: stop enabling mod_info by default - #316
Merged
Conversation
mod_info serves the complete Apache configuration on /server-info, including the credentials other modules carry in their directives. Nothing consumes the endpoint: the Monitoring Plugins read mod_status (/server-status?auto), and no role or Telegraf input queries /server-info. The module config stays in mods-available, only the mods-enabled symlink is removed, so hosts that need the endpoint re-enable it with a single inventory entry. Verified on Rocky 9 (httpd 2.4.62) in the Debian-style layout this role deploys: httpd.conf includes mods-enabled only, so the LoadModule line the httpd package ships in conf.modules.d stays unread. Without the module the vHost's /server-info block still passes `httpd -t` and answers with an empty 200; linking info.conf back into mods-enabled restores the full page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mod_infois no longer enabled by default, on both RedHat and Debian.Why
mod_infoserves the complete Apache configuration on/server-info, including the credentials other modules carry in their directives. Nothing consumes the endpoint:mod_status(/server-status?auto);apache-httpd-versionqueries endoflife.date; the Apache security and disclosure checks read the local configuration and the HTTP response headers./server-info.The upcoming
apache-httpd-securitycheck warns about a loadedinfo_modulefor exactly this reason, so every LFOps-managed httpd would report a warning for a module we switch on ourselves.How
enabled: falsewithstate: 'present'unchanged:mods-available/info.confkeeps being deployed and only themods-enabledsymlink is removed on every run. The disable is idempotent, and a host that needs the endpoint re-enables it with one inventory entry:The
/server-infoblock stays in the localhost vHost, so re-enabling the module is all it takes.Verified
Rocky 9, httpd 2.4.62-13.el9_8.5, podman, in the Debian-style layout this role deploys on RedHat (
httpd.confincludesmods-enabled/*.confonly, so theLoadModule info_moduleline the httpd package ships inconf.modules.d/00-base.confis never read):info_modulehttpd -tcurl /server-infoenabled: trueAn unresolved
SetHandler server-infois not a configuration error, so the vHost block is inert while the module is off.