hudson.plugins.active_directory
Class ActiveDirectoryUnixAuthenticationProvider

java.lang.Object
  extended by org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
      extended by hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider
All Implemented Interfaces:
GroupDetailsService, org.acegisecurity.providers.AuthenticationProvider, org.acegisecurity.userdetails.UserDetailsService, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware

public class ActiveDirectoryUnixAuthenticationProvider
extends org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
implements org.acegisecurity.userdetails.UserDetailsService, GroupDetailsService

AuthenticationProvider with Active Directory, through LDAP.

Author:
Kohsuke Kawaguchi, James Nord

Field Summary
 
Fields inherited from class org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
hideUserNotFoundExceptions, messages
 
Constructor Summary
ActiveDirectoryUnixAuthenticationProvider(ActiveDirectorySecurityRealm realm)
           
 
Method Summary
protected  void additionalAuthenticationChecks(org.acegisecurity.userdetails.UserDetails userDetails, org.acegisecurity.providers.UsernamePasswordAuthenticationToken authentication)
           
 hudson.security.GroupDetails loadGroupByGroupname(java.lang.String groupname)
           
 org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
          We'd like to implement UserDetailsService ideally, but in short of keeping the manager user/password, we can't do so.
 org.acegisecurity.userdetails.UserDetails retrieveUser(java.lang.String username, java.lang.String password, java.lang.String domainName, java.util.List<SocketInfo> ldapServers)
          Retrieves the user by using the given list of available AD LDAP servers.
protected  org.acegisecurity.userdetails.UserDetails retrieveUser(java.lang.String username, org.acegisecurity.providers.UsernamePasswordAuthenticationToken authentication)
           
 
Methods inherited from class org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
afterPropertiesSet, authenticate, createSuccessAuthentication, doAfterPropertiesSet, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setUserCache, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveDirectoryUnixAuthenticationProvider

public ActiveDirectoryUnixAuthenticationProvider(ActiveDirectorySecurityRealm realm)
Method Detail

loadUserByUsername

public org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
                                                             throws org.acegisecurity.userdetails.UsernameNotFoundException,
                                                                    org.springframework.dao.DataAccessException
We'd like to implement UserDetailsService ideally, but in short of keeping the manager user/password, we can't do so. In Active Directory authentication, we should support SPNEGO/Kerberos and that should eliminate the need for the "remember me" service.

Specified by:
loadUserByUsername in interface org.acegisecurity.userdetails.UserDetailsService
Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException

additionalAuthenticationChecks

protected void additionalAuthenticationChecks(org.acegisecurity.userdetails.UserDetails userDetails,
                                              org.acegisecurity.providers.UsernamePasswordAuthenticationToken authentication)
                                       throws org.acegisecurity.AuthenticationException
Specified by:
additionalAuthenticationChecks in class org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
Throws:
org.acegisecurity.AuthenticationException

retrieveUser

protected org.acegisecurity.userdetails.UserDetails retrieveUser(java.lang.String username,
                                                                 org.acegisecurity.providers.UsernamePasswordAuthenticationToken authentication)
                                                          throws org.acegisecurity.AuthenticationException
Specified by:
retrieveUser in class org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider
Throws:
org.acegisecurity.AuthenticationException

retrieveUser

public org.acegisecurity.userdetails.UserDetails retrieveUser(java.lang.String username,
                                                              java.lang.String password,
                                                              java.lang.String domainName,
                                                              java.util.List<SocketInfo> ldapServers)
Retrieves the user by using the given list of available AD LDAP servers.

Parameters:
domainName -

loadGroupByGroupname

public hudson.security.GroupDetails loadGroupByGroupname(java.lang.String groupname)
Specified by:
loadGroupByGroupname in interface GroupDetailsService


Copyright © 2010. All Rights Reserved.