Inquire Policy
The Inquire Policy (MQCMD_INQUIRE_PROT_POLICY) command inquires about the policy, or policies, set on a queue.
HP Integrity NonStop Server | IBM® i | UNIX and Linux® | Windows | z/OS® |
---|---|---|---|---|
Required parameters
- policy-name (MQCFST)
- Policy name (parameter identifier: MQCA_POLICY_NAME).
This parameter is the name of the policy with attributes that are required. Generic policy names are not supported, however, an asterisk on its own can be used to return all policy objects.
The name of the policy, or policies (or part of the policy name or names) to inquire is the same as the name of the queue, or queues, that the policies control. The maximum length of the string is MQ_OBJECT_NAME_LENGTH.
The policy name is always returned regardless of the attributes requested.
Optional parameters
PolicyAttrs
(MQCFIL)- Policy attributes (parameter identifier: MQIACF_POLICY_ATTRS).
The attribute list might specify the following value on its own- default value if the parameter is not specified:
- MQIACF_ALL
- All attributes.
or a combination of the following:- MQCA_POLICY_NAME
- Name of the policy.
- MQIA_SIGNATURE_ALGORITHM
- The digital signature algorithm.
- MQIA_ENCRYPTION_ALGORITHM
- The encryption algorithm.
- MQCA_SIGNER_DN
- The distinguished name of an authorized signer, or signers.
- MQCA_RECIPIENT_DN
- The distinguished name of an intended recipient, or recipients.
- MQIA_TOLERATE_UNPROTECTED
- Whether the policy is enforced or unprotected messages tolerated.
- MQIACF_ACTION
- The action taken on the command with regards to signer and recipient parameters.
Expected behavior for inquiring a policy
When inquiring a policy name, a policy object is always returned even if one does not exist. When a policy object does not exist, the policy object returned is a default policy object that specifies plain text protection, that is, no signing or encryption of message data.
To view policy objects that exist, the policy name should be set to '*'. This returns all policy objects that exist.