Class LDAPConfiguration
- java.lang.Object
-
- org.oa4mp.delegation.server.server.claims.ClaimSourceConfiguration
-
- org.oa4mp.delegation.server.server.config.JSONClaimSourceConfig
-
- org.oa4mp.delegation.server.server.config.LDAPConfiguration
-
- All Implemented Interfaces:
Serializable
public class LDAPConfiguration extends JSONClaimSourceConfig
Created by Jeff Gaynor
on 5/3/16 at 11:17 AM- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.oa4mp.delegation.server.server.config.JSONClaimSourceConfig
jsonObject
-
Fields inherited from class org.oa4mp.delegation.server.server.claims.ClaimSourceConfiguration
enabled, failOnError, id, name, notifyOnFail
-
-
Constructor Summary
Constructors Constructor Description LDAPConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPConfigurationclone()booleanequals(Object obj)voidfromJSON(net.sf.json.JSONObject json)StringgetAdditionalFilter()This is used as part of the search filter.intgetAuthType()This will return the corresponding number for the security authorization (see constants inLDAPConfigurationUtil) which can be used for switch statements.StringgetContextName()The name of the context for the JNDIDirContext.search(Name, Attributes)function.StringgetPassword()intgetPort()Map<String,LDAPConfigurationUtil.AttributeEntry>getSearchAttributes()Search attributes are recorded as a map.StringgetSearchBase()StringgetSearchFilterAttribute()StringgetSearchNameKey()StringgetSearchScope()StringgetSecurityPrincipal()StringgetServer()This is a raw string of addresses (possibly plural) all comma separated.edu.uiuc.ncsa.security.util.ssl.SSLConfigurationgetSslConfiguration()booleanhasJSONObject()booleanhasSearchScope()voidsetAdditionalFilter(String additionalFilter)voidsetAuthType(int authType)voidsetContextName(String contextName)voidsetPassword(String password)voidsetPort(int port)voidsetSearchAttributes(Map<String,LDAPConfigurationUtil.AttributeEntry> searchAttributes)voidsetSearchBase(String searchBase)voidsetSearchFilterAttribute(String searchFilterAttribute)voidsetSearchNameKey(String searchNameKey)voidsetSearchScope(String searchScope)voidsetSecurityPrincipal(String securityPrincipal)voidsetServer(String server)voidsetSslConfiguration(edu.uiuc.ncsa.security.util.ssl.SSLConfiguration sslConfiguration)net.sf.json.JSONObjecttoJSON()StringtoString()-
Methods inherited from class org.oa4mp.delegation.server.server.claims.ClaimSourceConfiguration
getId, getMaxWait, getName, getOmitList, getProperties, getProperty, getRetryCount, isEnabled, isFailOnError, isNotifyOnFail, setEnabled, setFailOnError, setId, setMaxWait, setName, setNotifyOnFail, setOmitList, setProperties, setRetryCount
-
-
-
-
Method Detail
-
getSearchNameKey
public String getSearchNameKey()
-
setSearchNameKey
public void setSearchNameKey(String searchNameKey)
-
getSecurityPrincipal
public String getSecurityPrincipal()
-
setSecurityPrincipal
public void setSecurityPrincipal(String securityPrincipal)
-
getSearchBase
public String getSearchBase()
-
setSearchBase
public void setSearchBase(String searchBase)
-
getSearchAttributes
public Map<String,LDAPConfigurationUtil.AttributeEntry> getSearchAttributes()
Search attributes are recorded as a map. The key is the search term in the LDAP query. The value is the name that should be returned for this attribute in the claim.- Returns:
-
setSearchAttributes
public void setSearchAttributes(Map<String,LDAPConfigurationUtil.AttributeEntry> searchAttributes)
-
getSearchFilterAttribute
public String getSearchFilterAttribute()
-
setSearchFilterAttribute
public void setSearchFilterAttribute(String searchFilterAttribute)
-
getPassword
public String getPassword()
-
setPassword
public void setPassword(String password)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
getServer
public String getServer()
This is a raw string of addresses (possibly plural) all comma separated. Each address will be checked in sequence. The idea is that there are multiple LDAP servers with identical configurations that have difference addresses in case of failure (e.g.ldap1.ncsa.illinois.edu, ladp2.ncsa.illinois.edu) and the contract is that if there are multiple addresses here, they will be sequentially checked until one of them works and then the LDAP claim source is deemed done. Only in the case that all the addresses fail is a failure raised.- Returns:
-
setServer
public void setServer(String server)
-
getSslConfiguration
public edu.uiuc.ncsa.security.util.ssl.SSLConfiguration getSslConfiguration()
-
setSslConfiguration
public void setSslConfiguration(edu.uiuc.ncsa.security.util.ssl.SSLConfiguration sslConfiguration)
-
getAuthType
public int getAuthType()
This will return the corresponding number for the security authorization (see constants inLDAPConfigurationUtil) which can be used for switch statements.- Returns:
-
setAuthType
public void setAuthType(int authType)
-
getContextName
public String getContextName()
The name of the context for the JNDIDirContext.search(Name, Attributes)function. If this is omitted in the configuration, then it is set to the empty string.- Returns:
-
setContextName
public void setContextName(String contextName)
-
clone
public LDAPConfiguration clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
toString
public String toString()
- Overrides:
toStringin classClaimSourceConfiguration
-
getSearchScope
public String getSearchScope()
-
setSearchScope
public void setSearchScope(String searchScope)
-
hasSearchScope
public boolean hasSearchScope()
-
getAdditionalFilter
public String getAdditionalFilter()
This is used as part of the search filter. A normal one would be((& +So one might look likegetSearchFilterAttribute()+ claim + )(getAdditionalFilter()))(&(uid=bob)(isMemberOf=Communities:LVC:SegDB:SegDBWriter))Generally this will be dropped verbatim in the slot, so include parentheses.- Returns:
-
setAdditionalFilter
public void setAdditionalFilter(String additionalFilter)
-
fromJSON
public void fromJSON(net.sf.json.JSONObject json)
- Overrides:
fromJSONin classJSONClaimSourceConfig
-
toJSON
public net.sf.json.JSONObject toJSON()
- Overrides:
toJSONin classJSONClaimSourceConfig
-
hasJSONObject
public boolean hasJSONObject()
- Overrides:
hasJSONObjectin classJSONClaimSourceConfig
-
-