walterddr commented on a change in pull request #7860: [FLINK-9685] Adding 
support hostname-substitution for security.kerberos login.principal
URL: https://github.com/apache/flink/pull/7860#discussion_r263552559
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/security/SecurityConfiguration.java
 ##########
 @@ -80,13 +86,21 @@ public SecurityConfiguration(Configuration flinkConf,
                        List<SecurityModuleFactory> securityModuleFactories) {
                this.isZkSaslDisable = 
flinkConf.getBoolean(SecurityOptions.ZOOKEEPER_SASL_DISABLE);
                this.keytab = 
flinkConf.getString(SecurityOptions.KERBEROS_LOGIN_KEYTAB);
-               this.principal = 
flinkConf.getString(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL);
                this.useTicketCache = 
flinkConf.getBoolean(SecurityOptions.KERBEROS_LOGIN_USETICKETCACHE);
                this.loginContextNames = 
parseList(flinkConf.getString(SecurityOptions.KERBEROS_LOGIN_CONTEXTS));
                this.zkServiceName = 
flinkConf.getString(SecurityOptions.ZOOKEEPER_SASL_SERVICE_NAME);
                this.zkLoginContextName = 
flinkConf.getString(SecurityOptions.ZOOKEEPER_SASL_LOGIN_CONTEXT_NAME);
                this.securityModuleFactories = 
Collections.unmodifiableList(securityModuleFactories);
                this.flinkConfig = checkNotNull(flinkConf);
+               String rawPrincipal = 
flinkConf.getString(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL);
 
 Review comment:
   I am not sure this will work. I think we will have to make this as part of 
the `getPrincipal()` method, because it will be called via 
`SecurityUtils.install` in host, JM and TM?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to