Github user rmetzger commented on a diff in the pull request: https://github.com/apache/flink/pull/2425#discussion_r77171177 --- Diff: flink-clients/src/main/java/org/apache/flink/client/cli/DefaultCLI.java --- @@ -77,7 +88,26 @@ public StandaloneClusterClient createCluster( CommandLine commandLine, Configuration config) throws UnsupportedOperationException { + // get secure cookie if passed as argument + String secureCookieArg = commandLine.hasOption(CliFrontendParser.SECURE_COOKIE_OPTION.getOpt()) ? + commandLine.getOptionValue(CliFrontendParser.SECURE_COOKIE_OPTION.getOpt()) : null; + + populateSecureCookieConfigurations(config, secureCookieArg); + StandaloneClusterDescriptor descriptor = new StandaloneClusterDescriptor(config); return descriptor.deploy(); } -} + + private void populateSecureCookieConfigurations(Configuration config, String secureCookieArg) { + + boolean securityEnabled = config.getBoolean(ConfigConstants.SECURITY_ENABLED, DEFAULT_SECURITY_ENABLED); + LOG.debug("Security Enabled ? {}", securityEnabled); + + if(securityEnabled && secureCookieArg != null) { + LOG.debug("Secure cookie is provided as CLI argument and will be used"); + config.setBoolean(ConfigConstants.SECURITY_ENABLED, true); --- End diff -- I think this line is not needed. if we enter the branch, `SECURITY_ENABLED` or `DEFAULT_SECURITY_ENABLED` is `true`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---