hudson.plugins.active_directory
Class ActiveDirectorySecurityRealm.DesciprotrImpl

java.lang.Object
  extended by hudson.model.Descriptor<hudson.security.SecurityRealm>
      extended by hudson.plugins.active_directory.ActiveDirectorySecurityRealm.DesciprotrImpl
All Implemented Interfaces:
hudson.model.Saveable
Enclosing class:
ActiveDirectorySecurityRealm

@Extension
public static final class ActiveDirectorySecurityRealm.DesciprotrImpl
extends hudson.model.Descriptor<hudson.security.SecurityRealm>


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.Descriptor
hudson.model.Descriptor.FormException, hudson.model.Descriptor.PropertyType
 
Field Summary
 
Fields inherited from class hudson.model.Descriptor
clazz
 
Fields inherited from interface hudson.model.Saveable
NOOP
 
Constructor Summary
ActiveDirectorySecurityRealm.DesciprotrImpl()
           
 
Method Summary
 DirContext bind(String principalName, String password, List<SocketInfo> ldapServers, SocketInfo preferredServer)
          Binds to the server using the specified username/password.
 boolean canDoNativeAuth()
          If true, we can do ADSI/COM based look up that's far more reliable.
 DirContext createDNSLookupContext()
          Creates DirContext for accesssing DNS.
 hudson.util.FormValidation doValidate(String domain, String site, String bindName, String bindPassword, String server)
           
 String getDisplayName()
           
 String getHelpFile()
           
 List<SocketInfo> obtainLDAPServer(DirContext ictx, String domainName, String site, String preferredServer)
          Use DNS and obtains the LDAP servers that we should try.
 List<SocketInfo> obtainLDAPServer(String domainName, String site, String preferredServer)
           
 
Methods inherited from class hudson.model.Descriptor
calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getId, getJsonSafeClassName, getPropertyType, getPropertyType, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, toArray, toList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveDirectorySecurityRealm.DesciprotrImpl

public ActiveDirectorySecurityRealm.DesciprotrImpl()
Method Detail

getDisplayName

public String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.security.SecurityRealm>

getHelpFile

public String getHelpFile()
Overrides:
getHelpFile in class hudson.model.Descriptor<hudson.security.SecurityRealm>

canDoNativeAuth

public boolean canDoNativeAuth()
If true, we can do ADSI/COM based look up that's far more reliable. False if we need to do the authentication in pure Java via ActiveDirectoryUnixAuthenticationProvider


doValidate

public hudson.util.FormValidation doValidate(@QueryParameter(fixEmpty=true)
                                             String domain,
                                             @QueryParameter(fixEmpty=true)
                                             String site,
                                             @QueryParameter(fixEmpty=true)
                                             String bindName,
                                             @QueryParameter(fixEmpty=true)
                                             String bindPassword,
                                             @QueryParameter(fixEmpty=true)
                                             String server)
                                      throws IOException,
                                             javax.servlet.ServletException,
                                             NamingException
Throws:
IOException
javax.servlet.ServletException
NamingException

bind

public DirContext bind(String principalName,
                       String password,
                       List<SocketInfo> ldapServers,
                       SocketInfo preferredServer)
Binds to the server using the specified username/password.

In a real deployment, often there are servers that don't respond or otherwise broken, so try all the servers.


createDNSLookupContext

public DirContext createDNSLookupContext()
                                  throws NamingException
Creates DirContext for accesssing DNS.

Throws:
NamingException

obtainLDAPServer

public List<SocketInfo> obtainLDAPServer(String domainName,
                                         String site,
                                         String preferredServer)
                                  throws NamingException
Throws:
NamingException

obtainLDAPServer

public List<SocketInfo> obtainLDAPServer(DirContext ictx,
                                         String domainName,
                                         String site,
                                         String preferredServer)
                                  throws NamingException
Use DNS and obtains the LDAP servers that we should try.

Returns:
A list with at least one item.
Throws:
NamingException


Copyright © 2004-2011. All Rights Reserved.