public class ActiveDirectorySecurityRealm extends 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
|
SecurityRealm.SecurityComponentsExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
String |
bindName
Represent the old bindName
|
Secret |
bindPassword
Represent the old bindPassword
|
protected CacheConfiguration |
cache
Cache of the Active Directory plugin
|
String |
domain
Represent the old Active Directory Domain
|
static String |
DOMAIN_CONTROLLERS
Deprecated.
as of 1.28
Use the UI field.
|
List<ActiveDirectoryDomain> |
domains
List of
ActiveDirectoryDomain |
protected List<ActiveDirectorySecurityRealm.EnvironmentProperty> |
environmentProperties
Ldap extra properties
|
static boolean |
FORCE_LDAPS
Instead of LDAP+TLS upgrade, start right away with LDAPS.
|
protected ActiveDirectoryInternalUsersDatabase |
internalUsersDatabase
The Jenkins internal user to fall back in case f
NamingException |
boolean |
removeIrrelevantGroups
If true, Jenkins ignores Active Directory groups that are not being used by the active Authorization Strategy.
|
String |
server
Represent the old Active Directory Domain Controllers
|
String |
site
Active directory site (which specifies the physical concentration of the
servers), if any.
|
Boolean |
startTls
If true enable startTls in case plain communication is used.
|
protected ExecutorService |
threadPoolExecutor
The threadPool to update the cache on background
|
protected hudson.plugins.active_directory.TlsConfiguration |
tlsConfiguration
Deprecated.
|
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION| Constructor and Description |
|---|
ActiveDirectorySecurityRealm(String domain,
List<ActiveDirectoryDomain> domains,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
Boolean customDomain,
CacheConfiguration cache,
Boolean startTls) |
ActiveDirectorySecurityRealm(String domain,
List<ActiveDirectoryDomain> domains,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
Boolean customDomain,
CacheConfiguration cache,
Boolean startTls,
ActiveDirectoryInternalUsersDatabase internalUsersDatabase) |
ActiveDirectorySecurityRealm(String domain,
List<ActiveDirectoryDomain> domains,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
Boolean customDomain,
CacheConfiguration cache,
Boolean startTls,
hudson.plugins.active_directory.TlsConfiguration tlsConfiguration) |
ActiveDirectorySecurityRealm(String domain,
List<ActiveDirectoryDomain> domains,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
Boolean customDomain,
CacheConfiguration cache,
Boolean startTls,
hudson.plugins.active_directory.TlsConfiguration tlsConfiguration,
ActiveDirectoryInternalUsersDatabase internalUsersDatabase)
Deprecated.
|
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups) |
ActiveDirectorySecurityRealm(String domain,
String site,
String bindName,
String bindPassword,
String server,
GroupLookupStrategy groupLookupStrategy,
boolean removeIrrelevantGroups,
CacheConfiguration cache) |
createSecurityComponentsall, allowsSignup, canLogOut, commenceSignup, createCliAuthenticator, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getFrom, getGroupIdStrategy, getLoginUrl, getPostLogOutUrl, getSecurityComponents, getUserIdStrategy, loadGroupByGroupname, setCaptchaSupport, validateCaptchapublic transient String domain
We need to keep this as transient in order to be able to use readResolve to migrate the old descriptor to the newone.
This has been deprecated since ActiveDirectoryDomain
public transient String server
We need to keep this as transient in order to be able to use readResolve to migrate the old descriptor to the newone.
This has been deprecated since ActiveDirectoryDomain
public List<ActiveDirectoryDomain> domains
ActiveDirectoryDomainpublic final transient String site
On Windows, I'm assuming ADSI takes care of everything automatically.
We need to keep this as transient in order to be able to use readResolve to migrate the old descriptor to the newone.
public transient String bindName
We need to keep this as transient in order to be able to use readResolve to migrate the old descriptor to the new one.
This has been deprecated @since Jenkins 2.1
public transient Secret bindPassword
We need to keep this as transient in order to be able to use readResolve to migrate the old descriptor to the new one.
This has been deprecated @since Jenkins 2.1
public Boolean startTls
public final boolean removeIrrelevantGroups
AuthorizationStrategy.getGroups().protected CacheConfiguration cache
protected List<ActiveDirectorySecurityRealm.EnvironmentProperty> environmentProperties
@Deprecated protected transient hudson.plugins.active_directory.TlsConfiguration tlsConfiguration
Even if we are not using any of the TLS ports (3269/636) the plugin will try to establish a TLS channel using startTLS. Because of this, we need to be able to specify the SSL strategy on the plugin
For the moment there are two possible values: trustAllCertificates and trustStore.
protected ActiveDirectoryInternalUsersDatabase internalUsersDatabase
NamingExceptionprotected transient ExecutorService threadPoolExecutor
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, GroupLookupStrategy groupLookupStrategy)
public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups)
public ActiveDirectorySecurityRealm(String domain, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, CacheConfiguration cache)
public ActiveDirectorySecurityRealm(String domain, List<ActiveDirectoryDomain> domains, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls)
public ActiveDirectorySecurityRealm(String domain, List<ActiveDirectoryDomain> domains, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, hudson.plugins.active_directory.TlsConfiguration tlsConfiguration)
@Deprecated public ActiveDirectorySecurityRealm(String domain, List<ActiveDirectoryDomain> domains, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, hudson.plugins.active_directory.TlsConfiguration tlsConfiguration, ActiveDirectoryInternalUsersDatabase internalUsersDatabase)
@DataBoundConstructor public ActiveDirectorySecurityRealm(String domain, List<ActiveDirectoryDomain> domains, String site, String bindName, String bindPassword, String server, GroupLookupStrategy groupLookupStrategy, boolean removeIrrelevantGroups, Boolean customDomain, CacheConfiguration cache, Boolean startTls, ActiveDirectoryInternalUsersDatabase internalUsersDatabase)
@DataBoundSetter public void setEnvironmentProperties(List<ActiveDirectorySecurityRealm.EnvironmentProperty> environmentProperties)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public CacheConfiguration getCache()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getJenkinsInternalUser()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public ActiveDirectoryInternalUsersDatabase getInternalUsersDatabase()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public Boolean isStartTls()
public Integer getSize()
public Integer getTtl()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<ActiveDirectorySecurityRealm.EnvironmentProperty> getEnvironmentProperties()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean getCustomDomain()
public GroupLookupStrategy getGroupLookupStrategy()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public hudson.plugins.active_directory.TlsConfiguration getTlsConfiguration()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<ActiveDirectoryDomain> getDomains()
public ActiveDirectoryDomain getDomain(String domain)
domain - The name of the Active Directory domainpublic Object readResolve() throws ObjectStreamException
ObjectStreamExceptionpublic ActiveDirectorySecurityRealm.DescriptorImpl getDescriptor()
getDescriptor in interface Describable<SecurityRealm>getDescriptor in class 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.ServletException@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public void shutDownthreadPoolExecutors()
public GroupDetails loadGroupByGroupname(String groupname) throws org.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadGroupByGroupname in class 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 AbstractPasswordBasedSecurityRealmorg.acegisecurity.userdetails.UsernameNotFoundExceptionorg.springframework.dao.DataAccessExceptionprotected org.acegisecurity.userdetails.UserDetails authenticate(String username, String password) throws org.acegisecurity.AuthenticationException
authenticate in class AbstractPasswordBasedSecurityRealmorg.acegisecurity.AuthenticationExceptionCopyright © 2016–2020. All rights reserved.