hudson.plugins.active_directory
Class ActiveDirectorySecurityRealm
java.lang.Object
hudson.security.SecurityRealm
hudson.plugins.active_directory.ActiveDirectorySecurityRealm
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.security.SecurityRealm>
public class ActiveDirectorySecurityRealm
- extends hudson.security.SecurityRealm
- Author:
- Kohsuke Kawaguchi
| Nested classes/interfaces inherited from class hudson.security.SecurityRealm |
hudson.security.SecurityRealm.SecurityComponents |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
|
Field Summary |
java.lang.String |
bindName
If non-null, use this name and password to bind to LDAP to obtain the DN of the user trying to login. |
hudson.util.Secret |
bindPassword
|
java.lang.String |
domain
Active directory domain name to authenticate against. |
static java.lang.String |
DOMAIN_CONTROLLERS
If non-null, this value specifies the domain controllers and overrides all the lookups. |
java.lang.String |
site
Active directory site (which specifies the physical concentration of the servers),
if any. |
| Fields inherited from class hudson.security.SecurityRealm |
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION |
|
Constructor Summary |
ActiveDirectorySecurityRealm(java.lang.String domain,
java.lang.String site,
java.lang.String bindName,
java.lang.String bindPassword)
|
| Methods inherited from class hudson.security.SecurityRealm |
all, allowsSignup, canLogOut, createCliAuthenticator, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getLoginUrl, getPostLogOutUrl, getSecurityComponents, loadUserByUsername, validateCaptcha |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
domain
public final java.lang.String domain
- Active directory domain name to authenticate against.
When this plugin is used on Windows, this field is null,
and we use ADSI and ADO through com4j to perform authentication.
OTOH, when this plugin runs on non-Windows, this field
must be non-null, and we'll use LDAP for authentication.
site
public final java.lang.String site
- Active directory site (which specifies the physical concentration of the servers),
if any. If the value is non-null, we'll only contact servers in this site.
On Windows, I'm assuming ADSI takes care of everything automatically.
bindName
public final java.lang.String bindName
- If non-null, use this name and password to bind to LDAP to obtain the DN of the user trying to login.
This is unnecessary in a sigle-domain mode, where we can just bind with the user name and password
provided during the login, but in a forest mode, without some known credential, we cannot figure out
which domain in the forest the user belongs to.
bindPassword
public final hudson.util.Secret bindPassword
DOMAIN_CONTROLLERS
public static java.lang.String DOMAIN_CONTROLLERS
- If non-null, this value specifies the domain controllers and overrides all the lookups.
The format is "host:port,host:port,..."
ActiveDirectorySecurityRealm
@DataBoundConstructor
public ActiveDirectorySecurityRealm(java.lang.String domain,
java.lang.String site,
java.lang.String bindName,
java.lang.String bindPassword)
createSecurityComponents
public hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
- Specified by:
createSecurityComponents in class hudson.security.SecurityRealm
getDescriptor
public ActiveDirectorySecurityRealm.DesciprotrImpl getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<hudson.security.SecurityRealm>- Overrides:
getDescriptor in class hudson.security.SecurityRealm
doAuthTest
public void doAuthTest(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
java.lang.String username,
@QueryParameter
java.lang.String password)
throws java.io.IOException,
javax.servlet.ServletException
- Authentication test.
- Throws:
java.io.IOException
javax.servlet.ServletException
loadGroupByGroupname
public hudson.security.GroupDetails loadGroupByGroupname(java.lang.String groupname)
throws org.acegisecurity.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
- Overrides:
loadGroupByGroupname in class hudson.security.SecurityRealm
- Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException
Copyright © 2010. All Rights Reserved.