Java Code Examples for org.apache.flink.runtime.security.SecurityConfiguration#getSecurityModuleFactories()
The following examples show how to use
org.apache.flink.runtime.security.SecurityConfiguration#getSecurityModuleFactories() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestingSecurityContext.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
public static void install(SecurityConfiguration config, Map<String, ClientSecurityConfiguration> clientSecurityConfigurationMap) throws Exception { SecurityUtils.install(config); // install dynamic JAAS entries for (SecurityModuleFactory factory : config.getSecurityModuleFactories()) { if (factory instanceof JaasModuleFactory) { DynamicConfiguration jaasConf = (DynamicConfiguration) javax.security.auth.login.Configuration.getConfiguration(); for (Map.Entry<String, ClientSecurityConfiguration> e : clientSecurityConfigurationMap.entrySet()) { AppConfigurationEntry entry = KerberosUtils.keytabEntry( e.getValue().getKeytab(), e.getValue().getPrincipal()); jaasConf.addAppConfigurationEntry(e.getKey(), entry); } break; } } }
Example 2
Source File: TestingSecurityContext.java From flink with Apache License 2.0 | 6 votes |
public static void install(SecurityConfiguration config, Map<String, ClientSecurityConfiguration> clientSecurityConfigurationMap) throws Exception { SecurityUtils.install(config); // install dynamic JAAS entries for (SecurityModuleFactory factory : config.getSecurityModuleFactories()) { if (factory instanceof JaasModuleFactory) { DynamicConfiguration jaasConf = (DynamicConfiguration) javax.security.auth.login.Configuration.getConfiguration(); for (Map.Entry<String, ClientSecurityConfiguration> e : clientSecurityConfigurationMap.entrySet()) { AppConfigurationEntry entry = KerberosUtils.keytabEntry( e.getValue().getKeytab(), e.getValue().getPrincipal()); jaasConf.addAppConfigurationEntry(e.getKey(), entry); } break; } } }
Example 3
Source File: TestingSecurityContext.java From flink with Apache License 2.0 | 6 votes |
public static void install(SecurityConfiguration config, Map<String, ClientSecurityConfiguration> clientSecurityConfigurationMap) throws Exception { SecurityUtils.install(config); // install dynamic JAAS entries for (String factoryClassName : config.getSecurityModuleFactories()) { SecurityModuleFactory factory = SecurityFactoryServiceLoader.findModuleFactory(factoryClassName); if (factory instanceof JaasModuleFactory) { DynamicConfiguration jaasConf = (DynamicConfiguration) javax.security.auth.login.Configuration.getConfiguration(); for (Map.Entry<String, ClientSecurityConfiguration> e : clientSecurityConfigurationMap.entrySet()) { AppConfigurationEntry entry = KerberosUtils.keytabEntry( e.getValue().getKeytab(), e.getValue().getPrincipal()); jaasConf.addAppConfigurationEntry(e.getKey(), entry); } break; } } }