Telemetry channel JAAS configuration
Configure JAAS to authenticate the Username sent by the client.
The IBM® MQ administrator configures which MQTT channels require client authentication using JAAS. Specify the name of a JAAS configuration for each channel that is to perform JAAS authentication. Channels can all use the same JAAS configuration, or they can use different JAAS configurations. The configurations are defined in WMQData directory\qmgrs\qMgrName\mqxr\jaas.config.
The jaas.config file is organized by JAAS configuration name. Under each configuration name is a list of Login configurations; see Figure 1.
- JndiLoginModule
- Authenticates against a directory service configured under JNDI ( Java Naming and Directory Interface).
- Krb5LoginModule
- Authenticates using Kerberos protocols.
- NTLoginModule
- Authenticates using the NT security information for the current user.
- UnixLoginModule
- Authenticates using the UNIX security information for the current user.
To overcome this problem, write your own Login module, or use the other standard Login modules. A sample JAASLoginModule.java
is supplied with IBM MQ Telemetry. It is an implementation of the javax.security.auth.spi.LoginModule interface. Use it to develop your own authentication method.
Any new LoginModule classes you provide must be on the class path of the telemetry (MQXR) service. Do not place your classes in IBM MQ directories that are in the class path. Create your own directories, and define the whole class path for the telemetry (MQXR) service.
You can augment the class path used by the telemetry (MQXR) service by setting class path in the service.env file. CLASSPATH
must be capitalized, and the class path statement can only contain literals. You cannot use variables in the CLASSPATH; for example CLASSPATH=%CLASSPATH% is incorrect. The telemetry (MQXR) service sets its own classpath. The CLASSPATH defined in service.env is added to it.
The telemetry (MQXR) service provides two callbacks that return the Username and the Password for a client connected to the MQTT channel. The Username and Password are set in the MqttConnectOptions object. See Figure 2 for an example of how to access Username and Password.
Examples
MQXRConfig
.