public class ActiveDirectorySecurityRealm
extends hudson.security.AbstractPasswordBasedSecurityRealm
SecurityRealm that talks to Active Directory.| Modifier and Type | Class and Description |
|---|---|
static class |
ActiveDirectorySecurityRealm.DescriptorImpl |
static class |
ActiveDirectorySecurityRealm.EnvironmentProperty
Store all the extra environment variable to be used on the LDAP Context
|
| Modifier and Type | Field and Description |
|---|---|
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 |
protected CacheConfiguration |
cache
Cache of the Active Directory plugin
|
String |
domain
Active directory domain name to authenticate against.
|
static String |
DOMAIN_CONTROLLERS
Deprecated.
as of 1.28
Use the UI field.
|
protected List<ActiveDirectorySecurityRealm.EnvironmentProperty> |
environmentProperties
Ldap extra properties
|
static boolean |
FORCE_LDAPS
Instead of LDAP+TLS upgrade, start right away with LDAPS.
|
boolean |
removeIrrelevantGroups
If true, Jenkins ignores Active Directory groups that are not being used by the active Authorization Strategy.
|
String |
server
If non-null, Jenkins will try to connect at this server at the first priority, before falling back to
discovered DNS servers.
|
String |
site
Active directory site (which specifies the physical concentration of the
servers), if any.
|
| Constructor and Description |
|---|
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
Boolean customDomain,
CacheConfiguration cache) |
| Modifier and Type | Method and Description |
|---|---|
protected org.acegisecurity.userdetails.UserDetails |
authenticate(String username,
String password) |
hudson.security.SecurityRealm.SecurityComponents |
createSecurityComponents() |
void |
doAuthTest(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String username,
String password)
Authentication test.
|
AbstractActiveDirectoryAuthenticationProvider |
getAuthenticationProvider()
Interface that actually talks to Active Directory.
|
CacheConfiguration |
getCache() |
ActiveDirectorySecurityRealm.DescriptorImpl |
getDescriptor() |
List<ActiveDirectorySecurityRealm.EnvironmentProperty> |
getEnvironmentProperties() |
hudson.plugins.active_directory.GroupLookupStrategy |
getGroupLookupStrategy() |
Integer |
getSize() |
Integer |
getTtl() |
hudson.security.GroupDetails |
loadGroupByGroupname(String groupname) |
org.acegisecurity.userdetails.UserDetails |
loadUserByUsername(String username) |
void |
setEnvironmentProperties(List<ActiveDirectorySecurityRealm.EnvironmentProperty> environmentProperties) |
createCliAuthenticatorall, allowsSignup, canLogOut, commenceSignup, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getLoginUrl, getPostLogOutUrl, getSecurityComponents, loadGroupByGroupname, setCaptchaSupport, validateCaptchapublic final String domain
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.
public final String site
On Windows, I'm assuming ADSI takes care of everything automatically.
public final String bindName
public final hudson.util.Secret bindPassword
public final String server
public final boolean removeIrrelevantGroups
AuthorizationStrategy.getGroups().protected CacheConfiguration cache
protected List<ActiveDirectorySecurityRealm.EnvironmentProperty> environmentProperties
public static String DOMAIN_CONTROLLERS
public static boolean FORCE_LDAPS
public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server)
public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server, hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy)
public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server, hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups)
@DataBoundConstructor public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server, hudson.plugins.active_directory.GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache)
@DataBoundSetter public void setEnvironmentProperties(List<ActiveDirectorySecurityRealm.EnvironmentProperty> environmentProperties)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public CacheConfiguration getCache()
public Integer getSize()
public Integer getTtl()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<ActiveDirectorySecurityRealm.EnvironmentProperty> getEnvironmentProperties()
public hudson.plugins.active_directory.GroupLookupStrategy getGroupLookupStrategy()
public hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
createSecurityComponents in class hudson.security.AbstractPasswordBasedSecurityRealmpublic ActiveDirectorySecurityRealm.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.security.SecurityRealm>getDescriptor in class hudson.security.SecurityRealmpublic void doAuthTest(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
@QueryParameter
String username,
@QueryParameter
String password)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic hudson.security.GroupDetails loadGroupByGroupname(String groupname) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadGroupByGroupname in class hudson.security.AbstractPasswordBasedSecurityRealmorg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionpublic AbstractActiveDirectoryAuthenticationProvider getAuthenticationProvider()
public org.acegisecurity.userdetails.UserDetails loadUserByUsername(String username) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername in interface org.acegisecurity.userdetails.UserDetailsServiceloadUserByUsername in class hudson.security.AbstractPasswordBasedSecurityRealmorg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionCopyright © 2016. All rights reserved.