Package jenkins.security.plugins.ldap
Class LDAPConfiguration
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<LDAPConfiguration>
-
- jenkins.security.plugins.ldap.LDAPConfiguration
-
- All Implemented Interfaces:
Describable<LDAPConfiguration>
public class LDAPConfiguration extends AbstractDescribableImpl<LDAPConfiguration>
A configuration for one ldap connection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LDAPConfiguration.ApplicationContext
static class
LDAPConfiguration.LDAPConfigurationDescriptor
-
Field Summary
Fields Modifier and Type Field Description static int
CONNECT_TIMEOUT
static int
READ_TIMEOUT
-
Constructor Summary
Constructors Constructor Description LDAPConfiguration(String server, String rootDN, boolean inhibitInferRootDN, String managerDN, Secret managerPasswordSecret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPConfiguration.ApplicationContext
createApplicationContext(LDAPSecurityRealm realm)
String
getDisplayNameAttributeName()
LDAPSecurityRealm.EnvironmentProperty[]
getEnvironmentProperties()
Map<String,String>
getExtraEnvVars()
LDAPGroupMembershipStrategy
getGroupMembershipStrategy()
String
getGroupSearchBase()
This defines the organizational unit that contains groups.String
getGroupSearchFilter()
Query to locate an entry that identifies the group, given the group name string.String
getId()
LDAPExtendedTemplate
getLdapTemplate()
String
getLDAPURL()
String
getMailAddressAttributeName()
String
getManagerDN()
If non-null, we use this andgetManagerPassword()
when binding to LDAP.String
getManagerPassword()
Password used to first bind to LDAP.Secret
getManagerPasswordSecret()
String
getRootDN()
The root DN to connect to.String
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".String
getServerUrl()
String
getUserSearch()
Query to locate an entry that identifies the user, given the user name string.String
getUserSearchBase()
Specifies the relative DN fromthe root DN
.boolean
isConfiguration(String id)
boolean
isIgnoreIfUnavailable()
boolean
isInhibitInferRootDN()
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
.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
getServer
public String 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
public String getServerUrl()
-
getRootDN
public String getRootDN()
The root DN to connect to. Normally something like "dc=sun,dc=com"
-
getLDAPURL
public String getLDAPURL()
-
isInhibitInferRootDN
public boolean isInhibitInferRootDN()
Allow the rootDN to be inferred? Default is false. If true, allow rootDN to be blank.
-
getUserSearchBase
public String 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
@DataBoundSetter public void setUserSearchBase(String userSearchBase)
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
public String getUserSearch()
Query to locate an entry that identifies the user, given the user name string. Normally "uid={0}"- See Also:
FilterBasedLdapUserSearch
-
setUserSearch
@DataBoundSetter public void setUserSearch(String userSearch)
Query to locate an entry that identifies the user, given the user name string. Normally "uid={0}"- See Also:
FilterBasedLdapUserSearch
-
getGroupSearchBase
public String 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
@DataBoundSetter public void setGroupSearchBase(String groupSearchBase)
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
public String 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
@DataBoundSetter public void setGroupSearchFilter(String groupSearchFilter)
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
public LDAPGroupMembershipStrategy getGroupMembershipStrategy()
-
setGroupMembershipStrategy
@DataBoundSetter public void setGroupMembershipStrategy(LDAPGroupMembershipStrategy groupMembershipStrategy)
-
getManagerDN
public String getManagerDN()
If non-null, we use this andgetManagerPassword()
when binding to LDAP. This is necessary when LDAP doesn't support anonymous access.
-
getManagerPassword
public String getManagerPassword()
Password used to first bind to LDAP.
-
getManagerPasswordSecret
public Secret getManagerPasswordSecret()
-
getDisplayNameAttributeName
public String getDisplayNameAttributeName()
-
setDisplayNameAttributeName
@DataBoundSetter public void setDisplayNameAttributeName(String displayNameAttributeName)
-
getMailAddressAttributeName
public String getMailAddressAttributeName()
-
setMailAddressAttributeName
@DataBoundSetter public void setMailAddressAttributeName(String mailAddressAttributeName)
-
isIgnoreIfUnavailable
public boolean isIgnoreIfUnavailable()
-
setIgnoreIfUnavailable
@DataBoundSetter public void setIgnoreIfUnavailable(boolean ignoreIfUnavailable)
-
setExtraEnvVars
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setExtraEnvVars(Map<String,String> extraEnvVars)
-
getEnvironmentProperties
public LDAPSecurityRealm.EnvironmentProperty[] getEnvironmentProperties()
-
setEnvironmentProperties
@DataBoundSetter public void setEnvironmentProperties(LDAPSecurityRealm.EnvironmentProperty[] environmentProperties)
-
getId
public String getId()
-
isConfiguration
public boolean isConfiguration(String id)
-
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()
-
-