dombizita commented on code in PR #10165:
URL: https://github.com/apache/ozone/pull/10165#discussion_r3191793473
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java:
##########
@@ -596,18 +596,16 @@ private ServerConnector createHttpsChannelConnector(
private void setEnabledProtocols(SslContextFactory sslContextFactory) {
String enabledProtocols =
conf.get(OzoneConfigKeys.OZONE_SSL_ENABLED_PROTOCOLS,
conf.get(SSLFactory.SSL_ENABLED_PROTOCOLS_KEY,
SSLFactory.SSL_ENABLED_PROTOCOLS_DEFAULT));
- if (!enabledProtocols.equals(SSLFactory.SSL_ENABLED_PROTOCOLS_DEFAULT)) {
- List<String> originalExcludedProtocols =
Arrays.asList(sslContextFactory.getExcludeProtocols());
- String[] enabledProtocolsArray =
StringUtils.getTrimmedStrings(enabledProtocols);
+ List<String> originalExcludedProtocols =
Arrays.asList(sslContextFactory.getExcludeProtocols());
+ String[] enabledProtocolsArray =
StringUtils.getTrimmedStrings(enabledProtocols);
- List<String> finalExcludedProtocols = new
ArrayList<>(originalExcludedProtocols);
- finalExcludedProtocols.removeAll(Arrays.asList(enabledProtocolsArray));
+ List<String> finalExcludedProtocols = new
ArrayList<>(originalExcludedProtocols);
+ finalExcludedProtocols.removeAll(Arrays.asList(enabledProtocolsArray));
Review Comment:
I didn't change this behaviour (it's only modified because of removing the
if condition and needed to adjust them). This behaviour was ported in #10111
from [HADOOP-15169](https://issues.apache.org/jira/browse/HADOOP-15169) and
[HADOOP-19546](https://issues.apache.org/jira/browse/HADOOP-19546) to Ozone's
HttpServer2 fork. There is a comment [in
Hadoop](https://github.com/apache/hadoop/blob/eec2248a5777a5ca2a0437456a4e40f1803729d7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java#L706-L736),
which explains it:
```
// Jetty 9.2.4.v20141103 and above excludes certain protocols by
// default. Remove the user enabled protocols from the exclude list,
// and add them into the include list.
```
SslContextFactory in Jetty applies excludes with higher priority than
includes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]