Class LdapCertCompsMap
java.lang.Object
com.netscape.cms.publish.mappers.LdapDNCompsMap
com.netscape.cms.publish.mappers.LdapCertCompsMap
- All Implemented Interfaces:
IExtendedPluginInfo,ILdapMapper,ILdapPlugin
Maps a X509 certificate to a LDAP entry using AVAs in the certificate's
subject name to form the ldap search dn and filter.
Takes a optional root search dn.
The DN comps are used to form a LDAP entry to begin a subtree search.
The filter comps are used to form a search filter for the subtree.
If none of the DN comps matched, baseDN is used for the subtree.
If the baseDN is null and none of the DN comps matched, it is an error.
If none of the DN comps and filter comps matched, it is an error.
If just the filter comps is null, a base search is performed.
- Version:
- $Revision$, $Date$
-
Nested Class Summary
Nested classes/interfaces inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
LdapDNCompsMap.SearchFilter -
Field Summary
FieldsFields inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
mBaseDN, mConfig, mDnComps, mFilterCompsFields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN -
Constructor Summary
ConstructorsConstructorDescriptionLdapCertCompsMap(String certAttr, String baseDN, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] dnComps, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] filterComps) constructor using non-standard certificate attribute.LdapCertCompsMap(String baseDN, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] dnComps, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] filterComps) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the initial default parameters.Returns the description of this mapper.Returns implementation name.Returns the current instance parameters.protected voidinit(String baseDN, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] dnComps, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] filterComps) common initialization routine.maps a certificate to a LDAP entry.Maps a certificate to LDAP entry.Methods inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
formDNandFilter, getCompsFromString, getConfigStore, getDnComps, getExtendedPluginInfo, getFilterComps, init, mapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.netscape.certsrv.publish.ILdapPlugin
getConfigStore, init
-
Field Details
-
logger
public static org.slf4j.Logger logger
-
-
Constructor Details
-
LdapCertCompsMap
public LdapCertCompsMap() -
LdapCertCompsMap
public LdapCertCompsMap(String baseDN, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] dnComps, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] filterComps) Constructor. The DN comps are used to form a LDAP entry to begin a subtree search. The filter comps are used to form a search filter for the subtree. If none of the DN comps matched, baseDN is used for the subtree. If the baseDN is null and none of the DN comps matched, it is an error. If none of the DN comps and filter comps matched, it is an error. If just the filter comps is null, a base search is performed.- Parameters:
baseDN- The base DN.dnComps- Components to form the LDAP base dn for search.filterComps- Components to form the LDAP search filter.
-
LdapCertCompsMap
-
-
Method Details
-
getImplName
Description copied from interface:ILdapMapperReturns implementation name.- Specified by:
getImplNamein interfaceILdapMapper- Overrides:
getImplNamein classLdapDNCompsMap
-
getDescription
Description copied from interface:ILdapMapperReturns the description of this mapper.- Specified by:
getDescriptionin interfaceILdapMapper- Overrides:
getDescriptionin classLdapDNCompsMap
-
getDefaultParams
Description copied from interface:ILdapMapperReturns the initial default parameters.- Specified by:
getDefaultParamsin interfaceILdapMapper- Overrides:
getDefaultParamsin classLdapDNCompsMap
-
getInstanceParams
Description copied from interface:ILdapMapperReturns the current instance parameters.- Specified by:
getInstanceParamsin interfaceILdapMapper- Overrides:
getInstanceParamsin classLdapDNCompsMap
-
init
protected void init(String baseDN, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] dnComps, org.mozilla.jss.netscape.security.util.ObjectIdentifier[] filterComps) Description copied from class:LdapDNCompsMapcommon initialization routine.- Overrides:
initin classLdapDNCompsMap
-
map
Maps a certificate to LDAP entry. Uses DN components and filter components to form a DN and filter for a LDAP search. If the formed DN is null the baseDN will be used. If the formed DN is null and baseDN is null an error is thrown. If the filter is null a base search is performed. If both are null an error is thrown.- Specified by:
mapin interfaceILdapMapper- Parameters:
conn- - the LDAP connection.obj- - the X509Certificate.- Returns:
- dn indicates whether a mapping was successful
- Throws:
ELdapException- Map operation failed.
-
map
public String map(netscape.ldap.LDAPConnection conn, IRequest req, Object obj) throws ELdapException Description copied from interface:ILdapMappermaps a certificate to a LDAP entry. returns dn of the mapped LDAP entry.- Specified by:
mapin interfaceILdapMapper- Parameters:
conn- the LDAP connectionreq- the request to mapobj- the object to map- Returns:
- dn indicates whether a mapping was successful
- Throws:
ELdapException- Map operation failed.
-