Details
The access logfile format is defined within a Valve that implements the org.apache.catalina.valves.AccessLogValve interface within the /opt/tomcat/server.xml configuration file: The %t pattern code is included in the pattern element and logs the date and time of the event. Including the date pattern in the log configuration provides useful information about the time of the event which is critical for troubleshooting and forensic investigations.
Solution
As a privileged user on the Tomcat server:
Edit the $CATALINA_BASE/conf/server.xml file.
Modify the
Change the AccessLogValve setting to include %t in the pattern= statement.
EXAMPLE:
…
pattern=’%h %l %t %u "%r" %s %b’ />
…
Restart the Tomcat server:
sudo systemctl restart tomcat
sudo systemctl daemon-reload
Supportive Information
The following resource is also helpful.
This security hardening control applies to the following category of controls within NIST 800-53: Audit and Accountability.This control applies to the following type of system Unix.
References
- 800-53|AU-3
- CAT|II
- CCI|CCI-000131
- Rule-ID|SV-222939r615938_rule
- STIG-ID|TCAT-AS-000240
- STIG-Legacy|SV-111407
- STIG-Legacy|V-102461
- Vuln-ID|V-222939