SV-222940r615938_rule
V-222940
SRG-APP-000097-AS-000060
TCAT-AS-000250
CAT II
10
As a privileged user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Modify the <Valve> element(s) nested within the <Host> element(s).
Change the AccessLogValve setting to include %h in the pattern= statement.
EXAMPLE:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false">
...
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %t %u "%r" %s %b" />
...
</Host>
Restart the Tomcat server:
sudo systemctl restart tomcat
sudo systemctl daemon-reload
As an elevated user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Review all "Valve" elements.
If the pattern= statement does not include %h, this is a finding.
EXAMPLE:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false">
...
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %t %u "%r" %s %b" />
...
</Host>
V-222940
False
TCAT-AS-000250
As an elevated user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Review all "Valve" elements.
If the pattern= statement does not include %h, this is a finding.
EXAMPLE:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false">
...
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %t %u "%r" %s %b" />
...
</Host>
M
4094