Search in sources :

Example 1 with DefaultKyloJaasAuthenticationProvider

use of com.thinkbiganalytics.auth.jaas.DefaultKyloJaasAuthenticationProvider in project kylo by Teradata.

the class JaasAuthConfig method servicesAuthenticationProvider.

@Bean(name = SERVICES_AUTH_PROVIDER)
public AbstractJaasAuthenticationProvider servicesAuthenticationProvider(@Named("jaasConfiguration") javax.security.auth.login.Configuration config, List<AuthorityGranter> authorityGranters) {
    DefaultJaasAuthenticationProvider provider = new DefaultKyloJaasAuthenticationProvider();
    provider.setCallbackHandlers(CALLBACK_HANDLERS);
    provider.setConfiguration(config);
    provider.setAuthorityGranters(authorityGranters.toArray(new AuthorityGranter[authorityGranters.size()]));
    provider.setLoginContextName(JAAS_SERVICES);
    return provider;
}
Also used : AuthorityGranter(org.springframework.security.authentication.jaas.AuthorityGranter) UserPrincipalAuthorityGranter(com.thinkbiganalytics.auth.UserPrincipalAuthorityGranter) DefaultPrincipalAuthorityGranter(com.thinkbiganalytics.auth.DefaultPrincipalAuthorityGranter) GroupPrincipalAuthorityGranter(com.thinkbiganalytics.auth.GroupPrincipalAuthorityGranter) DefaultJaasAuthenticationProvider(org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider) DefaultKyloJaasAuthenticationProvider(com.thinkbiganalytics.auth.jaas.DefaultKyloJaasAuthenticationProvider) Bean(org.springframework.context.annotation.Bean)

Example 2 with DefaultKyloJaasAuthenticationProvider

use of com.thinkbiganalytics.auth.jaas.DefaultKyloJaasAuthenticationProvider in project kylo by Teradata.

the class JaasAuthConfig method uiAuthenticationProvider.

@Bean(name = UI_AUTH_PROVIDER)
public AbstractJaasAuthenticationProvider uiAuthenticationProvider(@Named("jaasConfiguration") javax.security.auth.login.Configuration config, List<AuthorityGranter> authorityGranters) {
    DefaultJaasAuthenticationProvider provider = new DefaultKyloJaasAuthenticationProvider();
    provider.setCallbackHandlers(CALLBACK_HANDLERS);
    provider.setConfiguration(config);
    provider.setAuthorityGranters(authorityGranters.toArray(new AuthorityGranter[authorityGranters.size()]));
    provider.setLoginContextName(JAAS_UI);
    return provider;
}
Also used : AuthorityGranter(org.springframework.security.authentication.jaas.AuthorityGranter) UserPrincipalAuthorityGranter(com.thinkbiganalytics.auth.UserPrincipalAuthorityGranter) DefaultPrincipalAuthorityGranter(com.thinkbiganalytics.auth.DefaultPrincipalAuthorityGranter) GroupPrincipalAuthorityGranter(com.thinkbiganalytics.auth.GroupPrincipalAuthorityGranter) DefaultJaasAuthenticationProvider(org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider) DefaultKyloJaasAuthenticationProvider(com.thinkbiganalytics.auth.jaas.DefaultKyloJaasAuthenticationProvider) Bean(org.springframework.context.annotation.Bean)

Aggregations

DefaultPrincipalAuthorityGranter (com.thinkbiganalytics.auth.DefaultPrincipalAuthorityGranter)2 GroupPrincipalAuthorityGranter (com.thinkbiganalytics.auth.GroupPrincipalAuthorityGranter)2 UserPrincipalAuthorityGranter (com.thinkbiganalytics.auth.UserPrincipalAuthorityGranter)2 DefaultKyloJaasAuthenticationProvider (com.thinkbiganalytics.auth.jaas.DefaultKyloJaasAuthenticationProvider)2 Bean (org.springframework.context.annotation.Bean)2 AuthorityGranter (org.springframework.security.authentication.jaas.AuthorityGranter)2 DefaultJaasAuthenticationProvider (org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider)2