Configuring the LTPA token
LTPA tokens can be used to avoid needing a user to provide username and password credentials on each request to the mqweb server. You can configure the name of the LTPA token cookie, the expiry interval for LTPA authentication tokens, and configure whether LTPA tokens can be used by HTTP connections, by using the setmqweb command.
Before you begin
- On z/OS®, you must have authority to run the dspmqweb and setmqweb commands, and write access to the mqwebuser.xml file.
- On all other operating systems, you must be a privileged user.
Before issuing either the setmqweb or dspmqweb commands on z/OS, you must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.
export WLP_USER_DIR=WLP_user_directory
where
WLP_user_directory
is the name of the directory that is passed
to crtmqweb
. For
example:export WLP_USER_DIR=/var/mqm/web/installation1
For more information, see Create the mqweb server.
About this task
/login
REST API resource with the HTTP POST method. This
token is returned in a cookie. The token is used to authenticate the user without the user being
required to log in again with their user ID and password, until the token expires. The default
expiry interval is 120 minutes. - On the IBM MQ Appliance, the LTPA
token is
LtpaToken2
. This value cannot be changed. - By default, on all other platforms, the name of the cookie that includes the
LTPA token starts with
LtpaToken2
, and includes a suffix that can change when the mqweb server is restarted. This randomized cookie name allows more than one mqweb server to run on the same system. However, if you want the cookie name to remain a consistent value, you can specify the name that the cookie has by using the setmqweb command.
If you enable both the HTTP and HTTPS ports, an LTPA token that is issued for an HTTPS request can be reused for an HTTP request. This behavior is disabled by default, but you can enable this behavior by using the setmqweb command.