activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huntc <hu...@mac.com>
Subject CertificateLoginModule does not appear to receive certificates
Date Sat, 14 Mar 2009 10:29:42 GMT

Hi there,

I have a v.5.1.0 client/broker scenario with mutual SSL authentication
occurring. The certificates are exchanged and a connection is established
successfully.

I have subclassed ActiveMQ's CertificateLoginModule class and configured the
broker to use it for authentication. The class is very simple at present and
just logs the subject dn's of each client certificate presented.

Unfortunately despite successful SSL authentication my login module cannot
see any certificates. It reports "No client certificates received". Should
there not be a client certificate?

Here is my login module's source:


public class CertificateLoginJNDIGroupModule extends CertificateLoginModule
{

  Logger logger = Logger.getLogger(CertificateLoginJNDIGroupModule.class);

  @Override
  protected Set&lt;String&gt; getUserGroups(String distinguishedName)
      throws LoginException {
    Set&lt;String&gt; groups = new HashSet&lt;String&gt;(2);
    groups.add("activemq-users");
    groups.add("jms-services");
    return groups;
  }

  @Override
  protected String getUserNameForCertificates(X509Certificate[] certs)
      throws LoginException {
    if (certs == null) {
      logger.warn("No client certificates received");
    } else if (logger.isDebugEnabled()) {
      for (X509Certificate cert : certs) {
        logger.debug("Client cert received: " + cert.toString());
      }
    }
    return getDistinguishedName(certs);
  }
}


Thank you for any help.

Kind regards,
Christopher
-- 
View this message in context: http://www.nabble.com/CertificateLoginModule-does-not-appear-to-receive-certificates-tp22511235p22511235.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message