gaborgsomogyi commented on a change in pull request #16057: URL: https://github.com/apache/flink/pull/16057#discussion_r644651787
########## 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: This pattern scatters all around the code so as I see it's more like a custom in Flink. An example construct can be found [here](https://github.com/apache/flink/blob/5de3ef9bd2fe498efe4decdf998cedb68a1fc7c7/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java#L777-L788). I would wait other peoples opinion because I'm not convinced we need to touch this. -- 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