MCAUserIdentifier (MQCHAR12)

This field specifies the user identifier for the message channel agent (MCA).

This field uses the first 12 bytes of the MCA user identifier, and can be set by a security agent.

There are two fields that contain the MCA user identifier:

  • MCAUserIdentifier contains the first 12 bytes of the MCA user identifier, and is padded with blanks if the identifier is shorter than 12 bytes. MCAUserIdentifier can be blank.
  • LongMCAUserIdPtr points to the full MCA user identifier, which can be longer than 12 bytes. Its length is given by LongMCAUserIdLength. The full identifier contains no trailing blanks, and is not null-terminated. If the identifier is blank, LongMCAUserIdLength is zero, and the value of LongMCAUserIdPtr is undefined. Note: LongMCAUserIdPtr is not present if Version is less than MQCD_VERSION_6.

If the MCA user identifier is nonblank, it specifies the user identifier to be used by the message channel agent for authorization to access IBM MQ resources. For channel types MQCHT_REQUESTER, MQCHT_RECEIVER, and MQCHT_CLUSRCVR, if PutAuthority is MQPA_DEFAULT this is the user identifier used for authorization checks for the put operation to destination queues.

If the MCA user identifier is blank, the message channel agent uses its default user identifier.

The MCA user identifier can be set by a security exit to indicate the user identifier that the message channel agent must use. The exit can change either MCAUserIdentifier, or the string pointed at by LongMCAUserIdPtr. If both are changed but differ from each other, the MCA uses LongMCAUserIdPtr in preference to MCAUserIdentifier. If the exit changes the length of the string addressed by LongMCAUserIdPtr, LongMCAUserIdLength must be set correspondingly. If the exit increases the length of the identifier, the exit must allocate storage of the required length, set that storage to the required identifier, and place the address of that storage in LongMCAUserIdPtr. The exit is responsible for freeing that storage when the exit is later invoked with the MQXR_TERM reason.

For channels with a ChannelType of MQCHT_SVRCONN, if MCAUserIdentifier in the channel definition is blank, any user identifier transferred from the client is copied into it. This user identifier (after any modification by the security exit at the server) is the one which the client application is assumed to be running under.

The MCA user identifier is not relevant for channels with a ChannelType of MQCHT_SDR, MQCHT_SVR, MQCHT_CLNTCONN, MQCHT_CLUSSDR.

This is an input/output field to the exit. The length of this field is given by MQ_USER_ID_LENGTH. This field is not present when Version is less than MQCD_VERSION_2.

Parent topic: Fields