![[OpenShift Container Platform]](ngocp.gif)
![[MQ 9.4.0 Jun 2024]](ng940.gif)
Configuring the IBM MQ Console with a basic registry using the IBM MQ Operator
To log in to the IBM® MQ Console, you can supply your own configuration to the queue manager.
Before you begin
If you are deploying a queue manager with an IBM MQ Advanced for Developers license, there is a simple configuration built in. See Example queue manager YAML that describes how to specify passwords for admin and app users. If you are deploying an IBM Cloud Pak® for Integration license queue manager on the Red Hat® OpenShift® Container Platform only, you can enable integration with the IBM Cloud Pak for Integration Keycloak to log in to the IBM MQ Console using Single Sign-On. See Connecting to the IBM MQ Console.
Procedure
-
Create a password and hash it using securityUtility.
A ConfigMap can be used to store the credentials that you use to access your queue manager. Alternatively you can use a Secret, which protects credentials in the Kubernetes layer. However, monitoring or troubleshooting tools might expose the underlying file insecurely.
For improved security with either option, hash these credentials by using the
securityUtility encodecommand with the--encoding=hashoption. -
Log into your cluster from the command line.
Alternatively, if you are using Red Hat OpenShift, you can use the Red Hat OpenShift console.
-
Create a ConfigMap with your configuration.
For help with creating the XML configuration, see IBM MQ Console and REST API security.
The following example creates a user within the group MQWebAdminGroup. Members of the MQWebAdminGroup are assigned the MQWebAdmin role. In this example:- You must replace the USERNAME and PASSWORD with
your own values. Note that USERNAME is used twice in the example.
You must specify the NAMESPACE as the one in which your IBM MQ Operator is deployed and where your queue manager will be, or already is, deployed.
- Use the command line, or the Red Hat OpenShift console for deployments on the Red Hat OpenShift Container Platform, to create the following
ConfigMap:
kind: ConfigMap apiVersion: v1 metadata: name: mqwebuserconfigmap namespace: NAMESPACE data: mqwebuser.xml: | <?xml version="1.0" encoding="UTF-8"?> <server> <featureManager> <feature>appSecurity-2.0</feature> <feature>basicAuthenticationMQ-1.0</feature> </featureManager> <enterpriseApplication id="com.ibm.mq.console"> <application-bnd> <security-role name="MQWebAdmin"> <group name="MQWebAdminGroup" realm="defaultRealm"/> </security-role> </application-bnd> </enterpriseApplication> <basicRegistry id="basic" realm="defaultRealm"> <user name="USERNAME" password="PASSWORD"/> <group name="MQWebAdminGroup"> <member name="USERNAME"/> </group> </basicRegistry> </server> - Optional: If using the command line, apply the
ConfigMap:
- For deployments on the Red Hat OpenShift Container Platform:
oc apply -f mqwebuserconfigmap.yaml - For deployments on Amazon EKS:
kubectl apply -f mqwebuserconfigmap.yaml
- For deployments on the Red Hat OpenShift Container Platform:
For the remaining steps, choose one of the following options:-
Deploy a new queue manager with the configuration to access the IBM MQ Console.
-
Apply configuration that gives the IBM MQ Console access to an existing queue manager.
- You must replace the USERNAME and PASSWORD with
your own values. Note that USERNAME is used twice in the example.
- Optional: Deploy a new queue manager with the configuration to access the
IBM MQ Console.
- Create your queue manager. Set the authentication and authorization providers to manual and supply the newly created ConfigMap
mqwebuserconfigmapthough one of the following options:- Option 1: Through the queue manager YAMLFor deployments on Red Hat OpenShift, add the following code under the
websection of the queue manager YAML:... web: enabled: true console: authentication: provider: manual authorization: provider: manual manualConfig: configMap: name: mqwebuserconfigmapFor deployments on Amazon EKS, add the following code under thewebsection of the queue manager YAML:... web: enabled: true console: authentication: provider: manual authorization: provider: manual manualConfig: configMap: name: mqwebuserconfigmap route: enabled: falsespec.web.route.enabledis set tofalsebecause it is a Red Hat OpenShift specific feature that is enabled by default. This feature must be disabled explicitly on Amazon EKS. - Option 2: Through the OpenShift console Form view:
- On the OpenShift console, select Operators > Installed Operators.
- Select your deployment of the IBM MQ Operator.
- Select Queue Manager and click Create QueueManager.
- Select the relevant options for your queue manager.
- Select Web and set Enable web server to true.
- Open the Advanced configuration list box.
- Under the Console list box, set the provider for both Authentication and Authorization to manual.
- Open the Configuration list box.
- Open the ConfigMap list box and select the ConfigMap mqwebuserconfigmap that was created in step 3.
- Click Create.
You can now access the IBM MQ Console of your new queue manager through the credentials specified in the ConfigMap created in step 3.
- Option 1: Through the queue manager YAML
- Create your queue manager.
- Optional: Apply configuration that enables the IBM MQ Console for an existing queue manager.
There are two options for applying the configuration:
-
Option 1: by using the CLI
OCP:
oc edit qmgr <QUEUEMANAGER_NAME>EKS:
kubectl edit qmgr <QUEUEMANAGER_NAME> -
Option 2: OCP users, by using the OCP console
- On the Red Hat OpenShift console, select Operators > Installed Operators.
- Select your deployment of the IBM MQ Operator.
- Select Queue Mananger and select the name of your queue manager.
- Select YAML.
- Edit the YAML and click Save
- For both options, replace the existing
websection of the queue manager YAML with the following code:For deployments on Red Hat OpenShift:... web: enabled: true console: authentication: provider: manual authorization: provider: manual manualConfig: configMap: name: mqwebuserconfigmapFor deployments on Amazon EKS:... web: enabled: true console: authentication: provider: manual authorization: provider: manual manualConfig: configMap: name: mqwebuserconfigmap route: enabled: falsespec.web.route.enabledis set tofalsebecause it is a Red Hat OpenShift specific feature that is enabled by default. This feature must be disabled explicitly on Amazon EKS.
-
- Amazon EKS deployments only: Configure an
Ingressto connect to the IBM MQ Console.
Results
You can now access the IBM MQ Console of your queue manager through the credentials specified in the ConfigMap that you created in step 3.