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
 javax.naming.directory.DirContext bind(java.lang.String principalName, java.lang.String password, java.util.List<SocketInfo> ldapServers)
          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.
 javax.naming.directory.DirContext createDNSLookupContext()
          Creates DirContext for accesssing DNS.
 hudson.util.FormValidation doValidate(java.lang.String domain, java.lang.String site, java.lang.String bindName, java.lang.String bindPassword)
           
 java.lang.String getDisplayName()
           
 java.lang.String getHelpFile()
           
 java.util.List<SocketInfo> obtainLDAPServer(javax.naming.directory.DirContext ictx, java.lang.String domainName, java.lang.String site)
          Use DNS and obtains the LDAP servers that we should try.
 java.util.List<SocketInfo> obtainLDAPServer(java.lang.String domainName, java.lang.String site)
           
 
Methods inherited from class hudson.model.Descriptor
calcFillSettings, configure, configure, doHelp, find, find, getCheckUrl, getConfigPage, getDescriptorUrl, getGlobalConfigPage, getHelpFile, getJsonSafeClassName, getPropertyType, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, 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 java.lang.String getDisplayName()
Specified by:
getDisplayName in class hudson.model.Descriptor<hudson.security.SecurityRealm>

getHelpFile

public java.lang.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)
                                             java.lang.String domain,
                                             @QueryParameter(fixEmpty=true)
                                             java.lang.String site,
                                             @QueryParameter(fixEmpty=true)
                                             java.lang.String bindName,
                                             @QueryParameter(fixEmpty=true)
                                             java.lang.String bindPassword)
                                      throws java.io.IOException,
                                             javax.servlet.ServletException,
                                             javax.naming.NamingException
Throws:
java.io.IOException
javax.servlet.ServletException
javax.naming.NamingException

bind

public javax.naming.directory.DirContext bind(java.lang.String principalName,
                                              java.lang.String password,
                                              java.util.List<SocketInfo> ldapServers)
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 javax.naming.directory.DirContext createDNSLookupContext()
                                                         throws javax.naming.NamingException
Creates DirContext for accesssing DNS.

Throws:
javax.naming.NamingException

obtainLDAPServer

public java.util.List<SocketInfo> obtainLDAPServer(java.lang.String domainName,
                                                   java.lang.String site)
                                            throws javax.naming.NamingException
Throws:
javax.naming.NamingException

obtainLDAPServer

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

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


Copyright © 2010. All Rights Reserved.