public class LDAPSecurityRealm
extends hudson.security.AbstractPasswordBasedSecurityRealm
SecurityRealm implementation that uses LDAP for authentication.
Two object classes seem to be relevant. These are in RFC 2256 and core.schema. These use DN for membership, so it can create a group of anything. I don't know what the difference between these two are.
attributetype ( 2.5.4.31 NAME 'member'
DESC 'RFC2256: member of a group'
SUP distinguishedName )
attributetype ( 2.5.4.50 NAME 'uniqueMember'
DESC 'RFC2256: unique member of a group'
EQUALITY uniqueMemberMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.34 )
objectclass ( 2.5.6.9 NAME 'groupOfNames'
DESC 'RFC2256: a group of names (DNs)'
SUP top STRUCTURAL
MUST ( member $ cn )
MAY ( businessCategory $ seeAlso $ owner $ ou $ o $ description ) )
objectclass ( 2.5.6.17 NAME 'groupOfUniqueNames'
DESC 'RFC2256: a group of unique names (DN and Unique Identifier)'
SUP top STRUCTURAL
MUST ( uniqueMember $ cn )
MAY ( businessCategory $ seeAlso $ owner $ ou $ o $ description ) )
This one is from nis.schema, and appears to model POSIX group/user thing more closely.
objectclass ( 1.3.6.1.1.1.2.2 NAME 'posixGroup'
DESC 'Abstraction of a group of accounts'
SUP top STRUCTURAL
MUST ( cn $ gidNumber )
MAY ( userPassword $ memberUid $ description ) )
attributetype ( 1.3.6.1.1.1.1.12 NAME 'memberUid'
EQUALITY caseExactIA5Match
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
objectclass ( 1.3.6.1.1.1.2.0 NAME 'posixAccount'
DESC 'Abstraction of an account with POSIX attributes'
SUP top AUXILIARY
MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
MAY ( userPassword $ loginShell $ gecos $ description ) )
attributetype ( 1.3.6.1.1.1.1.0 NAME 'uidNumber'
DESC 'An integer uniquely identifying a user in an administrative domain'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.1.1.1.1 NAME 'gidNumber'
DESC 'An integer uniquely identifying a group in an administrative domain'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
Active Directory specific schemas (from here).
objectclass ( 1.2.840.113556.1.5.8
NAME 'group'
SUP top
STRUCTURAL
MUST (groupType )
MAY (member $ nTGroupMembers $ operatorCount $ adminCount $
groupAttributes $ groupMembershipSAM $ controlAccessRights $
desktopProfile $ nonSecurityMember $ managedBy $
primaryGroupToken $ mail ) )
objectclass ( 1.2.840.113556.1.5.9
NAME 'user'
SUP organizationalPerson
STRUCTURAL
MAY (userCertificate $ networkAddress $ userAccountControl $
badPwdCount $ codePage $ homeDirectory $ homeDrive $
badPasswordTime $ lastLogoff $ lastLogon $ dBCSPwd $
localeID $ scriptPath $ logonHours $ logonWorkstation $
maxStorage $ userWorkstations $ unicodePwd $
otherLoginWorkstations $ ntPwdHistory $ pwdLastSet $
preferredOU $ primaryGroupID $ userParameters $
profilePath $ operatorCount $ adminCount $ accountExpires $
lmPwdHistory $ groupMembershipSAM $ logonCount $
controlAccessRights $ defaultClassStore $ groupsToIgnore $
groupPriority $ desktopProfile $ dynamicLDAPServer $
userPrincipalName $ lockoutTime $ userSharedFolder $
userSharedFolderOther $ servicePrincipalName $
aCSPolicyName $ terminalServer $ mSMQSignCertificates $
mSMQDigests $ mSMQDigestsMig $ mSMQSignCertificatesMig $
msNPAllowDialin $ msNPCallingStationID $
msNPSavedCallingStationID $ msRADIUSCallbackNumber $
msRADIUSFramedIPAddress $ msRADIUSFramedRoute $
msRADIUSServiceType $ msRASSavedCallbackNumber $
msRASSavedFramedIPAddress $ msRASSavedFramedRoute $
mS-DS-CreatorSID ) )
| Modifier and Type | Class and Description |
|---|---|
static class |
LDAPSecurityRealm.AuthoritiesPopulatorImpl
LdapAuthoritiesPopulator that adds the automatic 'authenticated' role. |
static class |
LDAPSecurityRealm.CacheConfiguration |
static class |
LDAPSecurityRealm.DescriptorImpl |
static class |
LDAPSecurityRealm.EnvironmentProperty |
static class |
LDAPSecurityRealm.LdapAuthenticationProviderImpl |
static class |
LDAPSecurityRealm.LDAPUserDetailsService |
static class |
LDAPSecurityRealm.MailAdressResolverImpl
If the security realm is LDAP, try to pick up e-mail address from LDAP.
|
| Modifier and Type | Field and Description |
|---|---|
boolean |
disableMailAddressResolver |
static String |
GROUP_SEARCH
LDAP filter to look for groups by their names.
|
String |
groupMembershipFilter
Deprecated.
|
LDAPGroupMembershipStrategy |
groupMembershipStrategy
Deprecated.
|
String |
groupSearchBase
Deprecated.
|
String |
groupSearchFilter
Deprecated.
|
boolean |
inhibitInferRootDN
Deprecated.
|
static Logger |
LOGGER |
String |
managerDN
Deprecated.
|
String |
rootDN
Deprecated.
|
String |
server
Deprecated.
|
String |
userSearch
Deprecated.
|
String |
userSearchBase
Deprecated.
|
| Constructor and Description |
|---|
LDAPSecurityRealm(List<LDAPConfiguration> configurations,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
jenkins.model.IdStrategy userIdStrategy,
jenkins.model.IdStrategy groupIdStrategy) |
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
LDAPGroupMembershipStrategy groupMembershipStrategy,
String managerDN,
hudson.util.Secret managerPasswordSecret,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
LDAPSecurityRealm.EnvironmentProperty[] environmentProperties,
String displayNameAttributeName,
String mailAddressAttributeName)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
LDAPGroupMembershipStrategy groupMembershipStrategy,
String managerDN,
hudson.util.Secret managerPasswordSecret,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
LDAPSecurityRealm.EnvironmentProperty[] environmentProperties,
String displayNameAttributeName,
String mailAddressAttributeName,
jenkins.model.IdStrategy userIdStrategy,
jenkins.model.IdStrategy groupIdStrategy)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
String groupMembershipFilter,
String managerDN,
hudson.util.Secret managerPasswordSecret,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
LDAPSecurityRealm.EnvironmentProperty[] environmentProperties,
String displayNameAttributeName,
String mailAddressAttributeName)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
String groupMembershipFilter,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
String groupMembershipFilter,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
LDAPSecurityRealm.EnvironmentProperty[] environmentProperties)
Deprecated.
retained for backwards binary compatibility.
|
LDAPSecurityRealm(String server,
String rootDN,
String userSearchBase,
String userSearch,
String groupSearchBase,
String groupSearchFilter,
String groupMembershipFilter,
String managerDN,
String managerPassword,
boolean inhibitInferRootDN,
boolean disableMailAddressResolver,
LDAPSecurityRealm.CacheConfiguration cache,
LDAPSecurityRealm.EnvironmentProperty[] environmentProperties,
String displayNameAttributeName,
String mailAddressAttributeName)
Deprecated.
retained for backwards binary compatibility.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.acegisecurity.userdetails.UserDetails |
authenticate(String username,
String password) |
hudson.security.SecurityRealm.SecurityComponents |
createSecurityComponents()
Creates security components.
|
LDAPSecurityRealm.CacheConfiguration |
getCache() |
Integer |
getCacheSize() |
Integer |
getCacheTTL() |
LDAPConfiguration |
getConfigurationFor(org.acegisecurity.userdetails.ldap.LdapUserDetails d) |
LDAPConfiguration |
getConfigurationFor(String configurationId) |
List<LDAPConfiguration> |
getConfigurations() |
LDAPSecurityRealm.DescriptorImpl |
getDescriptor() |
String |
getDisplayNameAttributeName()
Deprecated.
|
LDAPSecurityRealm.EnvironmentProperty[] |
getEnvironmentProperties()
Deprecated.
|
Map<String,String> |
getExtraEnvVars()
Deprecated.
|
jenkins.model.IdStrategy |
getGroupIdStrategy() |
String |
getGroupMembershipFilter()
Deprecated.
|
LDAPGroupMembershipStrategy |
getGroupMembershipStrategy()
Deprecated.
|
String |
getGroupSearchFilter()
Deprecated.
|
String |
getLDAPURL()
Deprecated.
|
String |
getMailAddressAttributeName()
Deprecated.
|
String |
getManagerPassword()
Deprecated.
|
hudson.util.Secret |
getManagerPasswordSecret()
Deprecated.
|
String |
getServerUrl()
Deprecated.
|
jenkins.model.IdStrategy |
getUserIdStrategy() |
boolean |
hasMultiConfiguration() |
boolean |
isDisableRolePrefixing() |
hudson.security.GroupDetails |
loadGroupByGroupname(String groupname) |
org.acegisecurity.userdetails.UserDetails |
loadUserByUsername(String username) |
void |
setDisableRolePrefixing(boolean disableRolePrefixing) |
static String |
toProviderUrl(String serverUrl,
String rootDN) |
org.acegisecurity.Authentication |
updateUserDetails(org.acegisecurity.Authentication authentication) |
org.acegisecurity.userdetails.ldap.LdapUserDetails |
updateUserDetails(org.acegisecurity.userdetails.ldap.LdapUserDetails d) |
org.acegisecurity.userdetails.UserDetails |
updateUserDetails(org.acegisecurity.userdetails.UserDetails userDetails) |
createCliAuthenticatorall, allowsSignup, canLogOut, commenceSignup, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getLoginUrl, getPostLogOutUrl, getSecurityComponents, loadGroupByGroupname, setCaptchaSupport, validateCaptcha@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String server
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String rootDN
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient boolean inhibitInferRootDN
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String userSearchBase
the root DN.
This is used to narrow down the search space when doing user search.
Something like "ou=people" but can be empty.@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String userSearch
FilterBasedLdapUserSearch@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String groupSearchBase
FilterBasedLdapUserSearch@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String groupSearchFilter
GROUP_SEARCH@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String groupMembershipFilter
groupMembershipStrategy{0}
is the user's full DN while {1} is the username. If non-null it will override the default specified in
LDAPBindSecurityRealm.groovy@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient LDAPGroupMembershipStrategy groupMembershipStrategy
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public transient String managerDN
managerPasswordSecret
when binding to LDAP.
This is necessary when LDAP doesn't support anonymous access.public final boolean disableMailAddressResolver
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final Logger LOGGER
public static final String GROUP_SEARCH
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String managerDN, String managerPassword, boolean inhibitInferRootDN)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String managerDN, String managerPassword, boolean inhibitInferRootDN, boolean disableMailAddressResolver)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String managerDN, String managerPassword, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String managerDN, String managerPassword, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String managerDN, String managerPassword, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, LDAPSecurityRealm.EnvironmentProperty[] environmentProperties)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String managerDN, String managerPassword, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, LDAPSecurityRealm.EnvironmentProperty[] environmentProperties, String displayNameAttributeName, String mailAddressAttributeName)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, String groupMembershipFilter, String managerDN, hudson.util.Secret managerPasswordSecret, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, LDAPSecurityRealm.EnvironmentProperty[] environmentProperties, String displayNameAttributeName, String mailAddressAttributeName)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, LDAPGroupMembershipStrategy groupMembershipStrategy, String managerDN, hudson.util.Secret managerPasswordSecret, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, LDAPSecurityRealm.EnvironmentProperty[] environmentProperties, String displayNameAttributeName, String mailAddressAttributeName)
@Deprecated public LDAPSecurityRealm(String server, String rootDN, String userSearchBase, String userSearch, String groupSearchBase, String groupSearchFilter, LDAPGroupMembershipStrategy groupMembershipStrategy, String managerDN, hudson.util.Secret managerPasswordSecret, boolean inhibitInferRootDN, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, LDAPSecurityRealm.EnvironmentProperty[] environmentProperties, String displayNameAttributeName, String mailAddressAttributeName, jenkins.model.IdStrategy userIdStrategy, jenkins.model.IdStrategy groupIdStrategy)
@DataBoundConstructor public LDAPSecurityRealm(List<LDAPConfiguration> configurations, boolean disableMailAddressResolver, LDAPSecurityRealm.CacheConfiguration cache, jenkins.model.IdStrategy userIdStrategy, jenkins.model.IdStrategy groupIdStrategy)
public List<LDAPConfiguration> getConfigurations()
public boolean isDisableRolePrefixing()
@DataBoundSetter public void setDisableRolePrefixing(boolean disableRolePrefixing)
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getServerUrl()
public jenkins.model.IdStrategy getUserIdStrategy()
getUserIdStrategy in class hudson.security.SecurityRealmpublic jenkins.model.IdStrategy getGroupIdStrategy()
getGroupIdStrategy in class hudson.security.SecurityRealmpublic LDAPSecurityRealm.CacheConfiguration getCache()
public Integer getCacheSize()
public Integer getCacheTTL()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getGroupMembershipFilter()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public LDAPGroupMembershipStrategy getGroupMembershipStrategy()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getGroupSearchFilter()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public Map<String,String> getExtraEnvVars()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public LDAPSecurityRealm.EnvironmentProperty[] getEnvironmentProperties()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getManagerPassword()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public hudson.util.Secret getManagerPasswordSecret()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getLDAPURL()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getDisplayNameAttributeName()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) public String getMailAddressAttributeName()
@CheckForNull @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public LDAPConfiguration getConfigurationFor(org.acegisecurity.userdetails.ldap.LdapUserDetails d)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean hasMultiConfiguration()
@CheckForNull @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public LDAPConfiguration getConfigurationFor(String configurationId)
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static String toProviderUrl(String serverUrl, String rootDN)
@Nonnull public hudson.security.SecurityRealm.SecurityComponents createSecurityComponents()
createSecurityComponents in class hudson.security.AbstractPasswordBasedSecurityRealmSecurityComponentsIllegalStateException - Execution errorprotected org.acegisecurity.userdetails.UserDetails authenticate(String username, String password) throws org.acegisecurity.AuthenticationException
authenticate in class hudson.security.AbstractPasswordBasedSecurityRealmorg.acegisecurity.AuthenticationExceptionpublic 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.DataAccessExceptionpublic org.acegisecurity.Authentication updateUserDetails(org.acegisecurity.Authentication authentication)
public org.acegisecurity.userdetails.UserDetails updateUserDetails(org.acegisecurity.userdetails.UserDetails userDetails)
public org.acegisecurity.userdetails.ldap.LdapUserDetails updateUserDetails(org.acegisecurity.userdetails.ldap.LdapUserDetails d)
public 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 LDAPSecurityRealm.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.security.SecurityRealm>getDescriptor in class hudson.security.SecurityRealmCopyright © 2016–2017. All rights reserved.