MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  JAAS classpath configuration for MQTT channels

    Posted Mon July 06, 2020 09:47 AM
    Hi all,

    I am in the process of setting up JAAS security on our MQTT channels but I am having trouble getting MQ to recognize the sample login module. 

    Following the procedure in Knowledge Center
    1. I created a separate folder that will contain the login modules /var/mqm/jaas
    2. Copied the examples from /opt/mqm/mqxr/samples/samples/ to that folder
    3. Added the folder to the /var/mqm/service.env file as CLASSPATH=/var/mqm/jaas/
    4. Added the JAAS parameter on the MQTT channel
    5. Restarted the telemetry service

    In the mqxr error logs I find this error:

    Login failed for ClientIdentifier MQTT_FX_Client with exception javax.security.auth.login.LoginException: unable to find LoginModule class: samples.JAASLoginModule.

    I tried adding the sample classes to a .jar file but this didn't change anything. 

    Any help is appreciated.

    Regards
    Jeroen


    ------------------------------
    Jeroen Cornelis
    System Engineer @ Colruyt Group
    ------------------------------


  • 2.  RE: JAAS classpath configuration for MQTT channels

    Posted Tue July 07, 2020 06:55 AM
    The error message indicates an issue with CLASSPATH and folder
    Did you copy JAASLoginModule.class and JAASPrincipal.class into /var/mqm/jaas or into /var/mqm/jaas/samples

    Did compiling JAASLoginModule.java work for you?

    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 3.  RE: JAAS classpath configuration for MQTT channels

    Posted Wed July 08, 2020 10:32 AM
    At first I thought it might have been because of https://www.ibm.com/support/pages/apar/IT30032 but this was not the case since we have Fixpack 9.1.0.5 installed. 

    All I had to do was add the samples to a .jar file and add the full path of this file in service.env so that it becomes "CLASSPATH=/var/mqm/jaas/LoginJAAS.jar" instead of  "CLASSPATH=/var/mqm/jaas/"



    ------------------------------
    Jeroen Cornelis
    System Engineer @ Colruyt Group
    ------------------------------