AuthToken stanza of the qm.ini file
Use the AuthToken stanza to configure the queue manager to validate authentication tokens that are provided by connecting applications.
The AuthToken stanza
- KeyStore=string
- File path for the keystore that contains the trusted issuer's public key certificates and symmetric keys. You can add the keys to an existing keystore or create a new keystore. For more information, see Configuring a queue manager to accept authentication tokens. The queue manager uses the keys in the keystore to verify that the authentication token that the application presents is signed by the trusted issuer.
- KeyStorePwdFile=string
- File path for the file that contains the encrypted password for the keystore. The file must contain the encrypted password as a single line of text. Plain text passwords are not accepted.
- CertLabel=string
- The certificate label for a public key certificate or symmetric key in the keystore that is used to validate authentication tokens. You can provide up to 32 certificate labels by repeating the CertLabel attribute.
- UserClaim=string
- Claim within the token that contains the user ID that the queue manager adopts for authorization checks.
- AllowOSGroups=NO (default) |YES
- The default value is NO. Determines whether an identity that is adopted from a
token is treated as an operating system (OS) user, and whether the group memberships of the matching
OS user are honored during authorization. .
- AllowOSGroups=NO|N
- Authorization checks are based only on the name of the user that is adopted from the token.
- AllowOSGroups=YES|Y
- Authorization checks are based on the name of the user and the groups they might belong to are also checked.
Example stanza - authentication only
Your AuthToken stanza can be valid with only the two minimum required parameters:
- KeyStore file path, and
- CertLabel name.
AuthToken:
KeyStore=/var/mqm/qmgrs/qmgrs/qm1/tokenissuer/key.kdb
CertLabel=token
... up to 32 CertLabel fields
If you only included the two minimum parameters, then:
- A stash file key.sth must exist with the encrypted keystore password so the keystore password file is not required.
- The token does not contain a username that is to be passed to IBM MQ for authorization. The application can connect and be authenticated but a different mechanism must be in place to provide authorization for the application to do work after it is connected.
- Your queue manager is put into UserExternal mode, which means users that do not exist on the operating system where the queue manager is running can be used for authentication.
- Even if you do not include the AllowOSGroups option in your AuthToken qm.ini stanza, the default is set to No. Therefore, if you include the UserClaim but do not specify the AllowOSGroups=Yes, the token user that is adopted for authorization is not checked for groups that it might belong to on the operating system where the queue manager is running.
Example stanza - authentication and authorization
You can define all the AuthToken parameters:
- KeyStore file path,
- KeyStorePwdFile file path,
- CertLabel name,
- UserClaim name and
- AllowOSGroups option.
AuthToken:
KeyStore=/var/mqm/qmgrs/qmgrs/QMJWT/ssl/key.kdb
KeyStorePwdFile=/var/mqm/qmgrs/QMJWT/ssl/key.pw
CertLabel=token
CertLabel=rsakey
CertLabel=mark
... up to 32 CertLabel fields
UserClaim=AppUser
AllowOSGroups=Y
If you included all the available parameters, then:
- Encrypt the password for the keystore by using the runqmcred command. Save it in a file then include the file path in the AuthToken stanza.
- The username that is in the authentication token user claim is used for both authentication and authorization.
- The token user might exist as a user on the operating system where the queue manager is running.
- You defined an authentication information object to enable user checking.
- You set up channel authentication records to adopt a user with authorization to interact with IBM MQ objects, based on the channel authentication or MCA rules.