cuspymd commented on a change in pull request #16057:
URL: https://github.com/apache/flink/pull/16057#discussion_r644474450



##########
File path: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServer.java
##########
@@ -174,6 +178,18 @@ public HistoryServer(
             this.serverSSLFactory = null;
         }
 
+        this.serverBasicAuthHandlerFactory =
+                
config.getBoolean(HistoryServerOptions.HISTORY_SERVER_WEB_BASIC_AUTH_ENABLED)
+                        ? new ServerBasicAuthHandlerFactory(
+                                
config.getOptional(SecurityOptions.BASIC_AUTH_PWD_FILE)
+                                        .orElseThrow(
+                                                () ->
+                                                        new 
ConfigurationException(
+                                                                
SecurityOptions.BASIC_AUTH_PWD_FILE
+                                                                               
 .key()
+                                                                        + " 
must be configured if basic auth is enabled.")))
+                        : null;

Review comment:
       It seems the code is hard to read because of indentation. For 
readability, it would be nice to separate them appropriately (by separating 
functions or introducing variables).




-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to