6.3 Ensure scheme is set accurately

Information

The scheme attribute is used to indicate to callers of request.getScheme() which scheme is in use by the Connector. Ensure the scheme attribute is set to http for Connectors operating over HTTP. Ensure the scheme attribute is set to https for Connectors operating over HTTPS.

Rationale:

Maintaining parity between the scheme in use by the Connector and advertised by request.getScheme() will ensure applications built on Tomcat have an accurate depiction of the context and security guarantees provided to them.

Solution

In server.xml, set the Connector's scheme attribute to http for Connectors operating over HTTP. Set the Connector's scheme attribute to https for Connectors operating over HTTPS.

<Connector
...
scheme='https'
...
/>

Default Value:

The scheme attribute is set to http.

References:

https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html

https://tomcat.apache.org/tomcat-8.0-doc/config/http.html

See Also

https://workbench.cisecurity.org/files/2506

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-13, CSCv6|6.3

Plugin: Unix

Control ID: 45178b3ba581d4ccdcdc3f3a263623dd7a69cb14a942e6bd3e7b01e51881bdb2