SV-222941r615938_rule
V-222941
SRG-APP-000097-AS-000060
TCAT-AS-000260
CAT III
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 %s 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 %s, 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-222941
False
TCAT-AS-000260
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 %s, 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