Group Permissions

Group permissions are how mature IBM MQ estates scale authorization without running setmqaut for every developer who joins a team. Instead of attaching +put on PAYMENT.IN to fifty individual user IDs, you grant +put once to the group MQ.APP.PAYMENTS and manage membership in Active Directory, LDAP, or Unix groups. When someone transfers departments, security removes them from the directory group and MQ access disappears on the next connection—no queue manager change ticket required. OAM still evaluates the effective user ID at runtime, but that user inherits every authority bit granted to any group they belong to, plus any direct user grants. This tutorial explains setmqaut and dspmqaut with -g, how group membership is resolved on distributed and z/OS systems, nesting and naming conventions, combining group and user grants, audit workflows, anti-patterns like over-broad enterprise groups, and troubleshooting when dspmqaut shows the group has +put but the application still receives 2035.

Why Groups Beat Per-User Grants

Per-user setmqaut lines multiply with headcount and drift out of sync with HR systems. A developer promoted to a team with production access might retain old user grants unless someone audits dspmqaut output quarterly. Groups encode roles: MQ.ORDERS.PRODUCER, MQ.ORDERS.CONSUMER, MQ.OPERATORS.READONLY. Change management attaches new queues to role templates. Compliance reviewers export group grants once per role instead of thousands of user rows. Break-glass individual accounts remain possible but should be rare and time-limited.

Group versus user principal grants
AspectGroup (-g)User (-p)
setmqaut flag-g MQ.APP.ROLE-p app_svc01
Membership managed inLDAP / AD / OSN/A (single account)
OffboardingRemove from directory groupsetmqaut -remove per object
Best forTeams and rolesService accounts, break-glass
Audit focusGroup catalog + membershipNamed account inventory

Granting Group Permissions

shell
1
2
3
4
setmqaut -m QM1 -n ORDERS.IN -t queue -g MQ.ORDERS.PRODUCERS +put +connect setmqaut -m QM1 -n ORDERS.OUT -t queue -g MQ.ORDERS.CONSUMERS +get +browse +connect setmqaut -m QM1 -t topic -n 'retail/order/#' -g MQ.ORDERS.PRODUCERS +pub dspmqaut -m QM1 -n ORDERS.IN -t queue -g MQ.ORDERS.PRODUCERS

The group name string must match what the queue manager resolves when it asks the operating system or security subsystem for group membership. On Windows MQ, that is often the domain group SAM account name. On Linux, it may be a Unix group from /etc/group or sssd. Mismatch between LDAP cn and the string in setmqaut is a top cause of “group grant looks correct but user fails.” Document the exact group string in your connection specification next to the application ID.

How OAM Resolves Group Membership

When application app01 connects and ADOPTCTX adopts app01, OAM loads grants for principal app01 and for every group containing app01. If MQ.ORDERS.PRODUCERS has +put on ORDERS.IN and app01 is a member, the put succeeds. Nested groups depend on platform: some LDAP layouts use groupOfGroups; verify whether MQ expands nested membership on your OS. Service accounts used only as MCAUSER may never be in LDAP groups—grant those IDs directly with -p instead of expecting group inheritance through a human user.

Combining User and Group Grants

A user might inherit +put from MQ.PRODUCERS and receive an exceptional +clr on one queue from a break-glass user grant. OAM unions allowed operations. Revoking a dangerous +all requires checking both dspmqaut -p and dspmqaut -g for that object. Incident response: remove user from group first for fastest containment, then clean stray user-level setmqaut lines during root cause review.

Explainer: Team Badge Color

Group permissions are like everyone with a red team badge being allowed in the cafeteria. You do not write each person name on the door—you write “red team.” New hires get a red badge in HR; they automatically get cafeteria access.

Role Design Patterns

  • One group per application role per environment—MQ.PAY.PROD.WRITER in production, MQ.PAY.TEST.WRITER in test.
  • Separate producer and consumer groups even when one app does both—simplifies audits.
  • Read-only monitoring group with +browse +inq +dsp only, never +get on sensitive queues.
  • Avoid Domain Users or Everyone-style groups in setmqaut—equivalent to open access.

Directory and MQ Coordination

LDAP authentication validates passwords; group membership for OAM usually comes from the same directory via OS integration. When CONNAUTH uses IDPWLDAP, the userid presented must be the same account that directory lists in MQ.ORDERS.PRODUCERS. Group names in setmqaut do not need to match LDAP organizational units—they are arbitrary role labels stored in MQ OAM, but membership must be real on the host evaluating security calls.

Auditing Group Permissions

  1. Export all setmqaut -g lines from version control or runbooks.
  2. For each group, dspmqaut critical objects monthly.
  3. Reconcile directory membership to expected headcount.
  4. Flag groups with +all or +dlt on application queues.
  5. After DR restore, replay group grants before user-specific exceptions.

z/OS and RACF Groups

On IBM MQ for z/OS, RACF groups connect users to MQ profiles. Commands differ from setmqaut -g but the role-based idea is identical: grant to MQGRD.PRODUCER group profile, connect users with RACF CONNECT. Distributed administrators collaborating with mainframe teams should use the same role names in architecture documents even when implementation commands differ.

Explain Like I'm Five: Group Permissions

The teacher has a list that says “kids in the red group may use the swings.” You do not need your own separate list if you are in the red group.

Practice Exercises

Exercise 1

Design three groups for an order system and list setmqaut -g commands for two queues and one topic.

Exercise 2

A user has 2035 but dspmqaut -g shows +put—write five membership checks.

Exercise 3

Document offboarding steps for a developer in MQ.ORDERS.PRODUCERS.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. Group grants use setmqaut:

  • -g GroupName
  • -xmitq
  • -port 1414
  • -chltype SDR

2. Removing a user from LDAP group:

  • Revokes MQ access without setmqaut
  • Deletes the queue
  • Stops the listener
  • Clears DLQ

3. dspmqaut for groups uses:

  • -g GroupName
  • -m only
  • -all
  • -remove

4. Best practice for roles:

  • Grant to groups
  • Grant +all to every user
  • Use mqm for apps
  • Skip OAM
Published
Read time18 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation