Class KerberosServiceLdapAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
-
- org.opennms.web.springframework.security.KerberosServiceLdapAuthenticationProvider
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,org.springframework.security.authentication.AuthenticationProvider
public class KerberosServiceLdapAuthenticationProvider extends org.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
Authentication provider which validates users via Kerberos Service Tickets or SPNEGO Tokens and then populates the users' authorities using the specified implementation of LdapAuthoritiesPopulator. Created for use cases where no existing UserDetailsService implementation will quite do the job.- Author:
- Jeff Gehlbach
- See Also:
KerberosLdapAuthenticationProvider
,KerberosAuthenticationProvider
,LdapUserSearch
,LdapAuthoritiesPopulator
-
-
Constructor Summary
Constructors Constructor Description KerberosServiceLdapAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
org.springframework.security.core.Authentication
authenticate(org.springframework.security.core.Authentication authentication)
org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator
getLdapAuthoritiesPopulator()
org.springframework.security.ldap.search.LdapUserSearch
getLdapUserSearch()
org.springframework.security.kerberos.authentication.KerberosTicketValidator
getTicketValidator()
boolean
getTrimRealm()
void
setLdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
void
setLdapUserSearch(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch)
void
setTicketValidator(org.springframework.security.kerberos.authentication.KerberosTicketValidator ticketValidator)
void
setTrimRealm(boolean trimRealm)
-
-
-
Method Detail
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
- Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Overrides:
authenticate
in classorg.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
- Throws:
org.springframework.security.core.AuthenticationException
-
setLdapAuthoritiesPopulator
public void setLdapAuthoritiesPopulator(org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
- Parameters:
ldapAuthoritiesPopulator
- The LdapAuthoritiesPopulator to use for retrieving granted authorities from an LDAP directory
-
getLdapAuthoritiesPopulator
public org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator getLdapAuthoritiesPopulator()
-
setLdapUserSearch
public void setLdapUserSearch(org.springframework.security.ldap.search.LdapUserSearch ldapUserSearch)
- Parameters:
ldapUserSearch
- The LdapUserSearch with which to look up users in an LDAP directory
-
getLdapUserSearch
public org.springframework.security.ldap.search.LdapUserSearch getLdapUserSearch()
-
setTrimRealm
public void setTrimRealm(boolean trimRealm)
- Parameters:
trimRealm
- Defaults to true. If set to false, do not trim the realm portion (e.g. @EXAMPLE.ORG) from the authenticated user principal name (e.g. user@EXAMPLE.ORG).
-
getTrimRealm
public boolean getTrimRealm()
-
setTicketValidator
public void setTicketValidator(org.springframework.security.kerberos.authentication.KerberosTicketValidator ticketValidator)
- Overrides:
setTicketValidator
in classorg.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
-
getTicketValidator
public org.springframework.security.kerberos.authentication.KerberosTicketValidator getTicketValidator()
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.security.kerberos.authentication.KerberosServiceAuthenticationProvider
- Throws:
Exception
-
-