use of org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider in project nifi by apache.
the class KerberosServiceFactoryBean method createKerberosServiceAuthenticationProvider.
private KerberosServiceAuthenticationProvider createKerberosServiceAuthenticationProvider() throws Exception {
KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider = new KerberosServiceAuthenticationProvider();
kerberosServiceAuthenticationProvider.setTicketValidator(createTicketValidator());
kerberosServiceAuthenticationProvider.setUserDetailsService(createAlternateKerberosUserDetailsService());
kerberosServiceAuthenticationProvider.afterPropertiesSet();
return kerberosServiceAuthenticationProvider;
}
use of org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider in project kylo by Teradata.
the class KerberosSpnegoConfiguration method kerberosServiceAuthenticationProvider.
@Bean
public KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() throws IOException {
KerberosServiceAuthenticationProvider provider = new KerberosServiceAuthenticationProvider();
provider.setTicketValidator(sunJaasKerberosTicketValidator());
// Since this provider requires a UserDetailsService even though we do not use UserDetals
// set one here that only returns the a new UserDetails with the given username each time.
provider.setUserDetailsService(username -> new User(username, "", Collections.emptySet()));
return provider;
}
use of org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider in project nifi-registry by apache.
the class KerberosSpnegoFactory method kerberosServiceAuthenticationProvider.
private KerberosServiceAuthenticationProvider kerberosServiceAuthenticationProvider() throws Exception {
if (kerberosServiceAuthenticationProvider == null && properties.isKerberosSpnegoSupportEnabled()) {
KerberosServiceAuthenticationProvider ksap = new KerberosServiceAuthenticationProvider();
ksap.setTicketValidator(kerberosTicketValidator);
ksap.setUserDetailsService(new KerberosUserDetailsService());
ksap.afterPropertiesSet();
kerberosServiceAuthenticationProvider = ksap;
}
return kerberosServiceAuthenticationProvider;
}
Aggregations