use of org.apereo.cas.configuration.model.support.spnego.SpnegoProperties in project cas by apereo.
the class SpnegoConfiguration method spnegoHandler.
@Bean
@RefreshScope
public AuthenticationHandler spnegoHandler() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final JcifsSpnegoAuthenticationHandler h = new JcifsSpnegoAuthenticationHandler(spnegoProperties.getName(), servicesManager, spnegoPrincipalFactory(), spnegoAuthentication(), spnegoProperties.isPrincipalWithDomainName(), spnegoProperties.isNtlmAllowed());
h.setAuthentication(spnegoAuthentication());
h.setPrincipalWithDomainName(spnegoProperties.isPrincipalWithDomainName());
h.setNTLMallowed(spnegoProperties.isNtlmAllowed());
return h;
}
use of org.apereo.cas.configuration.model.support.spnego.SpnegoProperties in project cas by apereo.
the class SpnegoWebflowActionsConfiguration method negociateSpnego.
@Bean
@RefreshScope
public Action negociateSpnego() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final List<String> supportedBrowsers = Stream.of(spnegoProperties.getSupportedBrowsers().split(",")).collect(Collectors.toList());
return new SpnegoNegociateCredentialsAction(supportedBrowsers, spnegoProperties.isNtlm(), spnegoProperties.isMixedModeAuthentication());
}
use of org.apereo.cas.configuration.model.support.spnego.SpnegoProperties in project cas by apereo.
the class SpnegoWebflowActionsConfiguration method ldapSpnegoClientAction.
@Lazy
@Bean
@RefreshScope
public Action ldapSpnegoClientAction() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final ConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(spnegoProperties.getLdap());
final SearchFilter filter = Beans.newLdaptiveSearchFilter(spnegoProperties.getLdap().getSearchFilter(), "host", Collections.emptyList());
final SearchRequest searchRequest = Beans.newLdaptiveSearchRequest(spnegoProperties.getLdap().getBaseDn(), filter);
return new LdapSpnegoKnownClientSystemsFilterAction(spnegoProperties.getIpsToCheckPattern(), spnegoProperties.getAlternativeRemoteHostAttribute(), spnegoProperties.getDnsTimeout(), connectionFactory, searchRequest, spnegoProperties.getSpnegoAttributeName());
}
use of org.apereo.cas.configuration.model.support.spnego.SpnegoProperties in project cas by apereo.
the class SpnegoConfiguration method jcifsConfig.
@Bean
@RefreshScope
public JcifsConfig jcifsConfig() {
final JcifsConfig c = new JcifsConfig();
final SpnegoProperties spnego = casProperties.getAuthn().getSpnego();
c.setJcifsDomain(spnego.getJcifsDomain());
c.setJcifsDomainController(spnego.getJcifsDomainController());
c.setJcifsNetbiosCachePolicy(spnego.getCachePolicy());
c.setJcifsNetbiosWins(spnego.getJcifsNetbiosWins());
c.setJcifsPassword(spnego.getJcifsPassword());
c.setJcifsServicePassword(spnego.getJcifsServicePassword());
c.setJcifsServicePrincipal(spnego.getJcifsServicePrincipal());
c.setJcifsSocketTimeout(spnego.getTimeout());
c.setJcifsUsername(spnego.getJcifsUsername());
c.setKerberosConf(spnego.getKerberosConf());
c.setKerberosDebug(spnego.getKerberosDebug());
c.setKerberosKdc(spnego.getKerberosKdc());
c.setKerberosRealm(spnego.getKerberosRealm());
c.setLoginConf(spnego.getLoginConf());
c.setUseSubjectCredsOnly(spnego.isUseSubjectCredsOnly());
return c;
}
use of org.apereo.cas.configuration.model.support.spnego.SpnegoProperties in project cas by apereo.
the class SpnegoConfiguration method spnegoPrincipalResolver.
@Bean
@RefreshScope
public PrincipalResolver spnegoPrincipalResolver() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final SpnegoPrincipalResolver r = new SpnegoPrincipalResolver();
r.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(spnegoProperties.getPrincipalTransformation()));
r.setAttributeRepository(attributeRepository);
r.setPrincipalAttributeName(spnegoProperties.getPrincipal().getPrincipalAttribute());
r.setReturnNullIfNoAttributes(spnegoProperties.getPrincipal().isReturnNull());
r.setPrincipalFactory(spnegoPrincipalFactory());
return r;
}
Aggregations