SV-222997r615938_rule
V-222997
SRG-APP-000495-AS-000220
TCAT-AS-001560
CAT II
10
As a privileged user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Create a <Valve> element that is nested beneath the <Host> element containing an AccessLogValve.
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 the <Engine> element. Ensure one AccessLog <Valve> element is nested within the Engine element.
If a <Valve className="org.apache.catalina.valves.AccessLogValve" .../> element is not defined, this is a finding.
EXAMPLE:
<Engine name="Standalone" ...>
...
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="catalina_access_log" suffix=".txt"
pattern="common"/>
...
</Engine>
V-222997
False
TCAT-AS-001560
As an elevated user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Review the <Engine> element. Ensure one AccessLog <Valve> element is nested within the Engine element.
If a <Valve className="org.apache.catalina.valves.AccessLogValve" .../> element is not defined, this is a finding.
EXAMPLE:
<Engine name="Standalone" ...>
...
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="catalina_access_log" suffix=".txt"
pattern="common"/>
...
</Engine>
M
4094