SV-222942r615938_rule
V-222942
SRG-APP-000097-AS-000060
TCAT-AS-000270
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 "%r" 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 "%r", 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-222942
False
TCAT-AS-000270
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 "%r", 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