Class LdapPublishModule

  • All Implemented Interfaces:
    IRequestListener

    public class LdapPublishModule
    extends java.lang.Object
    implements IRequestListener
    Handles requests to perform Ldap publishing.
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • mMappers

        protected java.util.Hashtable<java.lang.String,​com.netscape.cmscore.ldap.LdapMappers> mMappers
        hashtable of cert types to cert mappers and publishers. cert types are client, server, ca, subca, ra, crl, etc. XXX the cert types need to be consistently used. for each, the mapper may be null, in which case the full subject name is used to map the cert. for crl, if the mapper is null the ca mapper is used. if that is null, the full issuer name is used. XXX if we support crl issuing points the issuing point should be used to publish the crl. When publishers are null, the certs are not published.
      • mEventHandlers

        protected java.util.Hashtable<java.lang.String,​IRequestListener> mEventHandlers
        handlers for request types (events) values implement IRequestListener
      • ATTR_LDAPPUBLISH_STATUS

        public static final java.lang.String ATTR_LDAPPUBLISH_STATUS
        instantiate connection factory.
        See Also:
        Constant Field Values
      • PROP_TYPE_CLIENT

        public static final java.lang.String PROP_TYPE_CLIENT
        See Also:
        Constant Field Values
    • Constructor Detail

      • LdapPublishModule

        public LdapPublishModule()
    • Method Detail

      • set

        public void set​(java.lang.String name,
                        java.lang.String val)
        Description copied from interface: IRequestListener
        Sets attribute.
        Specified by:
        set in interface IRequestListener
        Parameters:
        name - attribute name
        val - attribute value
      • getLdapConnFactory

        public ILdapConnFactory getLdapConnFactory()
        Returns the internal ldap connection factory. This can be useful to get a ldap connection to the ldap publishing directory without having to get it again from the config file. Note that this means sharing a ldap connection pool with the ldap publishing module so be sure to return connections to pool. Use ILdapConnFactory.getConn() to get a Ldap connection to the ldap publishing directory. Use ILdapConnFactory.returnConn() to return the connection.
        See Also:
        com.netscape.certsrv.ldap.LdapBoundConnFactory, ILdapConnFactory
      • getMappers

        protected com.netscape.cmscore.ldap.LdapMappers getMappers​(java.lang.String certType)
        Returns the connection factory to the publishing directory. Must return the connection once you return
      • initHandlers

        protected void initHandlers()
      • accept

        public void accept​(IRequest request)
        Accepts completed requests from an authority and performs ldap publishing.
        Specified by:
        accept in interface IRequestListener
        Parameters:
        request - The publishing request.
      • publish

        public void publish​(java.lang.String certType,
                            java.security.cert.X509Certificate cert)
                     throws ELdapException
        Throws:
        ELdapException
      • unpublish

        public void unpublish​(java.lang.String certType,
                              java.security.cert.X509Certificate cert)
                       throws ELdapException
        Throws:
        ELdapException
      • setPublishedFlag

        public void setPublishedFlag​(java.math.BigInteger serialNo,
                                     boolean published)
        set published flag - true when published, false when unpublished. not exist means not published.
      • publish

        public void publish​(org.mozilla.jss.netscape.security.x509.X509CRLImpl crl)
                     throws ELdapException
        publishes a crl by mapping the issuer name in the crl to an entry and publishing it there. entry must be a certificate authority.
        Throws:
        ELdapException
      • publish

        public void publish​(java.lang.String dn,
                            java.security.cert.X509CRL crl)
                     throws ELdapException
        publishes a crl by mapping the issuer name in the crl to an entry and publishing it there. entry must be a certificate authority.
        Throws:
        ELdapException