Skip to content

Commit cc1b65a

Browse files
jetty: disable sending version number
Motivation ---------- Security scans flag dCache application as non-compliant because it reports Jetty version number Modification ------------ Disable reporting Jetty version Result ------ Baseline security compliant Target: trunk Request: 10.2, 10.1, 10.0, 9.2 Acked-by: Tigran Patch: https://rb.dcache.org/r/14383/ Signed-off-by: Dmitry Litvintsev <[email protected]>
1 parent b75b1a7 commit cc1b65a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/dcache/src/main/java/org/dcache/util/jetty/ConnectorFactoryBean.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ public ServerConnector getObject() throws Exception {
308308
checkState(protocol == PLAIN || certificateAuthorityPath != null);
309309

310310
HttpConnectionFactory httpConnectionFactory = new HttpConnectionFactory();
311+
/*
312+
* disable reporting of Jetty version
313+
*/
314+
httpConnectionFactory.getHttpConfiguration().setSendServerVersion(false);
311315

312316
switch (protocol) {
313317
case PLAIN:
@@ -362,4 +366,4 @@ public boolean isSingleton() {
362366
public enum Protocol {
363367
PLAIN, TLS, GSI
364368
}
365-
}
369+
}

0 commit comments

Comments
 (0)