RACF Integration

IBM MQ for z/OS does not maintain a separate permission database like the Object Authority Manager file on distributed systems. Instead, when an application issues MQCONN or MQOPEN, or when an operator runs an administrative command, the queue manager asks the System Authorization Facility (SAF) whether the caller is allowed to perform the operation. RACF, as the most common external security manager on z/OS, answers with return codes that permit or deny access. This integration is why mainframe MQ security skills overlap with RACF administration: the queue name your developer sees in a JCL or CICS definition must have matching RACF profiles, and the user ID under which the channel initiator runs must be permitted for channel and queue access. Beginners coming from Linux MQ must relearn grants as profiles and classes, not setmqaut. This tutorial explains the RACF integration model, major MQ RACF classes and what they protect, how access levels map to put and get, started tasks versus interactive users, administration profiles, relationship to CHLAUTH and TLS, auditing with SMF, and troubleshooting 2035 and CSQ security messages.

SAF as the Middle Layer

MQ does not call RACF directly by name in application code—it calls SAF with a resource class, profile name, and requested access. SAF routes to the active external security manager (RACF, ACF2, or Top Secret). The same SAF interface is used by CICS, Db2, and datasets. Enterprise security standards therefore apply uniformly: revoke a user in RACF and MQ access disappears along with other resources. MQ product documentation lists the RACF class names and profile naming conventions for each release; your security team may use custom generic profiles for naming standards.

Typical RACF access levels (conceptual mapping)
RACF accessGeneral meaningMQ example use
READInspect or consume where read appliesBrowse or get where profile maps to read
UPDATEChange data or put messagesPut to queue, some operational updates
CONTROLBroader control short of full adminVaries by class—see IBM MQ z/OS security manual
ALTERAdministrative change authorityDefine or alter MQ objects where class allows

MQ RACF Classes and Profiles (Overview)

IBM MQ defines multiple RACF classes so security can be granular. Exact class names and profile formats are release-specific—always use the IBM MQ for z/OS RACF guide for your version. Conceptually: classes exist for queue manager-level access (who may connect or administer the queue manager), queue profiles (who may open named queues or patterns), channel profiles, and administrative functions. Profiles often embed the queue manager name and object name so QM1 and QM2 production isolation is possible. Generic profiles with wildcards reduce profile sprawl but increase risk if patterns are too broad—a profile that covers all queues on a queue manager is convenient and dangerous.

text
1
2
3
4
5
/* Illustrative RACF commands — syntax varies by site standards */ /* PERMIT profile naming must match IBM MQ RACF profile rules */ RDEFINE MQQUEUE qmgr1.queue.payment.in UACC(NONE) PERMIT qmgr1.queue.payment.in CLASS(MQQUEUE) ID(PAYSRV) ACCESS(UPDATE) SETROPTS RACLIST(MQQUEUE) REFRESH

User IDs: Interactive, Started Tasks, and Channels

A developer’s TSO user ID may work in test because personal RACF groups include MQ permissions. In production, CICS transactions and batch jobs run under application user IDs; channel initiators run under dedicated started task IDs. Each needs explicit PERMIT statements. A common production incident is promoting code that worked under the developer ID while the CICS region user lacks UPDATE on the queue profile. Channel security also maps partner identity through MCAUSER and CHLAUTH, but RACF still gates whether that MCAUSER may put to the target queue. Document every user ID in the message path, not only the last mile application.

Administration and CSQ Commands

Operators using CSQUTIL or console commands need RACF authority appropriate to the command class. Defining queues, altering channels, and displaying objects each map to profiles documented by IBM. Emergency break-glass IDs should be rare, monitored, and time-bound. MQ administrators should not share superuser RACF access when CONTROL on specific queue managers is sufficient for daily work.

Explainer: Building Security Desk for MQ

RACF integration is giving IBM MQ a single building security desk shared with the rest of the mainframe. Before you enter a room (open a queue), the desk checks your badge (user ID) against a list (profile) for that room name.

RACF, CHLAUTH, and TLS Together

CHLAUTH rules decide which channel connections are accepted and which MCAUSER applies at the channel layer. RACF decides whether that MCAUSER may perform the MQI operation on the queue. TLS authenticates the network peer. All three layers are required in modern architectures: TLS without RACF leaves authorized network peers able to abuse weak MCAUSER mapping; RACF without CHLAUTH may allow unwanted connections before identity is established. Security architecture documents should show all three for inbound distributed traffic to z/OS.

Auditing and Compliance

RACF generates SMF records for failures and sometimes successes depending on SETROPTS and audit settings. MQ also logs not authorized events. Correlate RACF audit, MQ AMQ messages, and application 2035 return codes during investigations. Regulated environments require periodic access reviews of MQ profiles just like dataset profiles.

Migration From Distributed MQ Security Thinking

  • Export dspmqaut output from Linux labs does not apply on z/OS—rebuild as RACF profiles.
  • Group names in RACF must match how MQ passes group IDs to SAF on your z/OS level.
  • Queue sharing groups add sysplex-wide considerations—profiles may reference shared queue names.
  • Test under production-like started task IDs, not only personal IDs.

Troubleshooting RACF-Related MQ Failures

  1. Capture failing user ID from MQ or CICS message (2035, CSQ messages).
  2. Use RACF LISTDSD or security tool equivalent for the MQ class and profile name MQ expects.
  3. Verify user is connected to RACF (not revoked, password not expired for interactive IDs).
  4. Check group membership via RACF LISTUSER.
  5. Confirm generic profile order—more specific profiles should win per RACF rules.
  6. After profile change, SETROPTS REFRESH for the class if required at your site.

Explain Like I'm Five: RACF Integration

RACF is the list of who may use each IBM MQ mailbox name on the mainframe computer, shared with all the other programs in the building.

Practice Exercises

Exercise 1

List all user IDs that touch one CICS-to-MQ payment flow and the RACF profile each needs.

Exercise 2

Explain to a Linux MQ admin why setmqaut does not apply on z/OS production.

Exercise 3

Write a RACF change request template for new queue PAYMENT.IN on QM1.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. On z/OS MQ, authorization is checked via:

  • SAF to RACF (or ESM)
  • setmqaut only
  • DNS
  • JCL DD only

2. RACF profiles for MQ live in:

  • MQ-specific RACF classes
  • ONLY UNIX files
  • CICS PCT
  • JES2 spool

3. Channel initiator needs:

  • RACF authority for its userid
  • No security
  • Only TLS
  • FTP access

4. RACF versus OAM on Linux:

  • Same role, different platform mechanism
  • Unrelated
  • RACF replaces queues
  • OAM is z/OS only
Published
Read time22 min
AuthorMainframeMaster
Verified: IBM MQ for z/OS security documentation