Class LDAPConfiguration
- java.lang.Object
-
- org.oa4mp.delegation.server.claims.server.ClaimSourceConfiguration
-
- org.oa4mp.delegation.server.config.server.JSONClaimSourceConfig
-
- org.oa4mp.delegation.server.config.server.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 edu.uiuc.ncsa.oa4mp.delegation.oa2.server.config.JSONClaimSourceConfig
jsonObject
-
Fields inherited from class edu.uiuc.ncsa.oa4mp.delegation.oa2.server.claims.ClaimSourceConfiguration
enabled, failOnError, id, jsonPostProcessorDone, jsonPreProcessorDone, name, notifyOnFail
-
-
Constructor Summary
Constructors Constructor Description LDAPConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPConfiguration
clone()
boolean
equals(Object obj)
void
fromJSON(net.sf.json.JSONObject json)
String
getAdditionalFilter()
This is used as part of the search filter.int
getAuthType()
This will return the corresponding number for the security authorization (see constants inLDAPConfigurationUtil
) which can be used for switch statements.String
getContextName()
The name of the context for the JNDIDirContext.search(Name, Attributes)
function.String
getPassword()
int
getPort()
Map<String,LDAPConfigurationUtil.AttributeEntry>
getSearchAttributes()
Search attributes are recorded as a map.String
getSearchBase()
String
getSearchFilterAttribute()
String
getSearchNameKey()
String
getSearchScope()
String
getSecurityPrincipal()
String
getServer()
This is a raw string of addresses (possibly plural) all comma separated.edu.uiuc.ncsa.security.util.ssl.SSLConfiguration
getSslConfiguration()
boolean
hasJSONObject()
boolean
hasSearchScope()
void
setAdditionalFilter(String additionalFilter)
void
setAuthType(int authType)
void
setContextName(String contextName)
void
setPassword(String password)
void
setPort(int port)
void
setSearchAttributes(Map<String,LDAPConfigurationUtil.AttributeEntry> searchAttributes)
void
setSearchBase(String searchBase)
void
setSearchFilterAttribute(String searchFilterAttribute)
void
setSearchNameKey(String searchNameKey)
void
setSearchScope(String searchScope)
void
setSecurityPrincipal(String securityPrincipal)
void
setServer(String server)
void
setSslConfiguration(edu.uiuc.ncsa.security.util.ssl.SSLConfiguration sslConfiguration)
net.sf.json.JSONObject
toJSON()
String
toString()
-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.oa2.server.claims.ClaimSourceConfiguration
getId, getJSONPostProcessing, getJSONPreProcessing, getMaxWait, getName, getOmitList, getProperties, getProperty, getRawPostProcessor, getRawPreProcessor, getRetryCount, hasJSONPostProcessing, hasJSONPreProcessing, isEnabled, isFailOnError, isNotifyOnFail, makeProcessor, setEnabled, setFailOnError, setId, setMaxWait, setName, setNotifyOnFail, setOmitList, setProperties, setRawPostProcessor, setRawPreProcessor, 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:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
public String toString()
- Overrides:
toString
in 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:
fromJSON
in classJSONClaimSourceConfig
-
toJSON
public net.sf.json.JSONObject toJSON()
- Overrides:
toJSON
in classJSONClaimSourceConfig
-
hasJSONObject
public boolean hasJSONObject()
- Overrides:
hasJSONObject
in classJSONClaimSourceConfig
-
-