For highly secure sites, tomcat servers are required to have STRICT_SERVLET_COMPLIANCE enabled
Finding ID | Version | Rule ID | IA Controls | Severity |
---|---|---|---|---|
V-223002 | TCAT-AS-001660 | SV-223002r615938_rule | Low |
Rule Title: STRICT_SERVLET_COMPLIANCE must be set to true.
Release : 20.2 and above
Component : Spectrum OneClick
For Spectrum 21.2.6 and below:
1) Edit: $SPECROOT/tomcat/conf/catalina.properties
Add: org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
Example:
2) Edit: $SPECROOT/tomcat/conf/context.xml
Change:
<Context>
To:
<Context xmlValidation="false" webXmlNamespaceAware="false" tldValidation="false">
Example:
3) Restart tomcat
cd $SPECROOT/tomcat/bin/
./stopTomcat.sh
./startTomcat.sh
For Spectrum 21.2.8 and above:
The $SPECROOT/tomcat/conf/context.xml has the entry out of the box.
The $SPECROOT/tomcat/conf/catalina.properties file has the following two entries at the bottom of the file:
org.apache.catalina.STRICT_SERVLET_COMPLIANCE=false
org.apache.catalina.connector.RECYCLE_FACADES=false
Change these entries to the following and restart tomcat.
org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true
org.apache.catalina.connector.RECYCLE_FACADES=true