SV-239406r675021_rule
V-239406
SRG-APP-000016-WSR-000005
VCPF-67-000005
CAT II
10
Navigate to and open /usr/lib/vmware-perfcharts/tc-instance/conf/server.xml.
Add the following line at the very top of the <Host> node.
<Valve className="org.apache.catalina.valves.RemoteIpValve" httpServerPort="80" httpsServerPort="443" protocolHeader="x-forwarded-proto" proxiesHeader="x-forwarded-by" remoteIpHeader="x-forwarded-for" requestAttributesEnabled="true" internalProxies="127\.0\.0\.1"/>
Inside the <Host> node, remove the existing "AccessLogValve" <Valve> node entirely and replace it with the following line:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${vim.logdir}" pattern="%h %{X-Forwarded-For}i %l %u %t "%r" %s %b "%{User-Agent}i"" resolveHosts="false" prefix="localhost_access_log" suffix=".txt"/>
At the command prompt, execute the following command:
# xmllint --format /usr/lib/vmware-perfcharts/tc-instance/conf/server.xml | sed '2 s/xmlns=".*"//g' | xmllint --xpath '/Server/Service/Engine/Host/Valve[@className="org.apache.catalina.valves.AccessLogValve"]'/@pattern -
Expected result:
pattern="%h %{X-Forwarded-For}i %l %u %t "%r" %s %b "%{User-Agent}i"" resolveHosts="false" prefix="localhost_access_log" suffix=".txt" />
If the output does not match the expected result, this is a finding.
V-239406
False
VCPF-67-000005
At the command prompt, execute the following command:
# xmllint --format /usr/lib/vmware-perfcharts/tc-instance/conf/server.xml | sed '2 s/xmlns=".*"//g' | xmllint --xpath '/Server/Service/Engine/Host/Valve[@className="org.apache.catalina.valves.AccessLogValve"]'/@pattern -
Expected result:
pattern="%h %{X-Forwarded-For}i %l %u %t "%r" %s %b "%{User-Agent}i"" resolveHosts="false" prefix="localhost_access_log" suffix=".txt" />
If the output does not match the expected result, this is a finding.
M
5329