Package jenkins.security.plugins.ldap
Class LDAPConfiguration
java.lang.Object
hudson.model.AbstractDescribableImpl<LDAPConfiguration>
jenkins.security.plugins.ldap.LDAPConfiguration
- All Implemented Interfaces:
Describable<LDAPConfiguration>
A configuration for one ldap connection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLDAPConfiguration
(String server, String rootDN, boolean inhibitInferRootDN, String managerDN, Secret managerPasswordSecret) -
Method Summary
Modifier and TypeMethodDescriptionThis defines the organizational unit that contains groups.Query to locate an entry that identifies the group, given the group name string.getId()
If non-null, we use this andgetManagerPassword()
when binding to LDAP.Password used to first bind to LDAP.The root DN to connect to.LDAP server name(s) separated by spaces, optionally with TCP port number, like "ldap.acme.org" or "ldap.acme.org:389" and/or with protocol, like "ldap://ldap.acme.org".Query to locate an entry that identifies the user, given the user name string.Specifies the relative DN fromthe root DN
.boolean
boolean
boolean
Allow the rootDN to be inferred? Default is false.void
setDisplayNameAttributeName
(String displayNameAttributeName) void
setEnvironmentProperties
(LDAPSecurityRealm.EnvironmentProperty[] environmentProperties) void
setExtraEnvVars
(Map<String, String> extraEnvVars) void
setGroupMembershipStrategy
(LDAPGroupMembershipStrategy groupMembershipStrategy) void
setGroupSearchBase
(String groupSearchBase) This defines the organizational unit that contains groups.void
setGroupSearchFilter
(String groupSearchFilter) Query to locate an entry that identifies the group, given the group name string.void
setIgnoreIfUnavailable
(boolean ignoreIfUnavailable) void
setMailAddressAttributeName
(String mailAddressAttributeName) void
setUserSearch
(String userSearch) Query to locate an entry that identifies the user, given the user name string.void
setUserSearchBase
(String userSearchBase) Specifies the relative DN fromthe root DN
.static boolean
validateServerUrlIsSecure
(String server) Validates if the LDAP server URL is secure (uses ldaps).Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
CONNECT_TIMEOUT
public static final int CONNECT_TIMEOUT -
READ_TIMEOUT
public static final int READ_TIMEOUT
-
-
Constructor Details
-
LDAPConfiguration
-
-
Method Details
-
getServer
LDAP server name(s) separated by spaces, optionally with TCP port number, like "ldap.acme.org" or "ldap.acme.org:389" and/or with protocol, like "ldap://ldap.acme.org". -
getServerUrl
-
getRootDN
The root DN to connect to. Normally something like "dc=sun,dc=com" -
getLDAPURL
-
isInhibitInferRootDN
public boolean isInhibitInferRootDN()Allow the rootDN to be inferred? Default is false. If true, allow rootDN to be blank. -
getUserSearchBase
Specifies the relative DN fromthe root DN
. This is used to narrow down the search space when doing user search. Something like "ou=people" but can be empty. -
setUserSearchBase
Specifies the relative DN fromthe root DN
. This is used to narrow down the search space when doing user search. Something like "ou=people" but can be empty. -
getUserSearch
Query to locate an entry that identifies the user, given the user name string. Normally "uid={0}"- See Also:
-
FilterBasedLdapUserSearch
-
setUserSearch
Query to locate an entry that identifies the user, given the user name string. Normally "uid={0}"- See Also:
-
FilterBasedLdapUserSearch
-
getGroupSearchBase
This defines the organizational unit that contains groups. Normally "" to indicate the full LDAP search, but can be often narrowed down to something like "ou=groups"- See Also:
-
FilterBasedLdapUserSearch
-
setGroupSearchBase
This defines the organizational unit that contains groups. Normally "" to indicate the full LDAP search, but can be often narrowed down to something like "ou=groups"- See Also:
-
FilterBasedLdapUserSearch
-
getGroupSearchFilter
Query to locate an entry that identifies the group, given the group name string. If non-null it will override the default specified byLDAPSecurityRealm.GROUP_SEARCH
-
setGroupSearchFilter
Query to locate an entry that identifies the group, given the group name string. If non-null it will override the default specified byLDAPSecurityRealm.GROUP_SEARCH
-
getGroupMembershipStrategy
-
setGroupMembershipStrategy
@DataBoundSetter public void setGroupMembershipStrategy(LDAPGroupMembershipStrategy groupMembershipStrategy) -
getManagerDN
If non-null, we use this andgetManagerPassword()
when binding to LDAP. This is necessary when LDAP doesn't support anonymous access. -
getManagerPassword
Password used to first bind to LDAP. -
getManagerPasswordSecret
-
getDisplayNameAttributeName
-
setDisplayNameAttributeName
-
getMailAddressAttributeName
-
setMailAddressAttributeName
-
getExtraEnvVars
-
setExtraEnvVars
-
getEnvironmentProperties
-
setEnvironmentProperties
@DataBoundSetter public void setEnvironmentProperties(LDAPSecurityRealm.EnvironmentProperty[] environmentProperties) -
getId
-
isConfiguration
-
validateServerUrlIsSecure
Validates if the LDAP server URL is secure (uses ldaps). Returns FALSE if the server URL is not secure. -
createApplicationContext
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LDAPConfiguration.ApplicationContext createApplicationContext(LDAPSecurityRealm realm) -
getLdapTemplate
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public LDAPExtendedTemplate getLdapTemplate()
-