![[MQ 9.2.0 Jul 2020]](ng920.gif)
Encrypting stored credentials in MFT
Managed File Transfer (MFT) requires several user IDs and credentials, which are stored in two XML files, and you can obfuscate these using the fteObfuscate command. From IBM® MQ 9.2.0, this command provides enhanced protection of the stored credentials.
Credential files
- MQMFTCredentials.xml
- This file contains the user Id and credentials for connecting to agents and coordination and command queue managers. The credentials to access key stores for secure connections to queue managers are also stored in the same file.
- ProtocolBridgeCredentials.xml
- This file contains the user Id and credentials for connecting to protocol servers.
Encrypting credentials using the fteObfuscate command
- credentialsFileName, which is required
- protection mode, credentialsKeyFile, and outputFileName, all of which are optional
See fteObfuscate for details of the parameters.
If you do not specify the protection mode, or a credentials key file, the command uses the default protection mode, and uses the latest algorithm, but with a fixed key to encrypt the credentials.
If you specify a protection mode of 0, and do not specify a credentials key
file, the command works as in previous releases of the product. You receive a warning message on the
console indicating usage of deprecated protection.
If you specify a protection mode of 0, and specify a credentials key file, you
receive an error output on the console indicating that it is not valid to specify key file when
using protection mode 0.
If you specify the protection mode of 1, and do not specify a credentials key
file, the command uses the latest algorithm, but with a fixed key to encrypt the credentials.
If you specify the protection mode of 1, and specify a credentials key file, the
command encrypts the credentials with the latest algorithm.
If you specify the protection mode of 1, or do not specify the protection mode,
and specify a credentials key file that does not exist, an error is output on the console indicating
that the file does not exist.
If you specify the protection mode of 1, or do not specify the protection mode,
and specify a credentials key file that is not readable, an error is output on the console
indicating that the file is not readable..
If you specify the protection mode of 2, and do not specify a
credentials key file, the command uses protection mode 2 to encrypt credentials using the latest
algorithm and a fixed key to encrypt.
If you specify the protection mode of 2, and specify a
credentials key file, the command uses protection mode 2 to encrypt credentials using the latest
algorithm and a user specified key to encrypt.
If you specify the protection mode of 2, or do not specify the
protection mode, and specify a credentials key file that does not exist, an error is output on the
console indicating that the file does not exist.
If you specify the protection mode of 2, or do not specify the
protection mode, and specify a credentials key file that is not readable, an error is output on the
console indicating that the file is not readable..
Decrypting credentials
- Using the Java Virtual Machine (JVM) property
com.ibm.wqmfte.cred.keyfile, for
example:
-Dcom.ibm.wmqfte.cred.keyfile=/usr/hime/credkeyfile.key - By setting a property in an agent, command, coordination, or logger properties file. The name
of the properties file, and the property that needs to be set in it are shown in the following
table:
Property file Property name agent.properties agentCredentialsKeyFile command.properties commandCredentialsKeyFile coordination.properties coordinationCredentialsKeyFile logger.properties loggerCredentialsKeyFile - In the installation.properties file.
Instead of adding properties in individual properties files, you can add the commonCredentialsKeyFile property to the existing common installation.properties file, so that agent, logger and commands can use the same property.
- Agent and logger, is logged to the output0.log file for that agent or logger.
- Commands, is displayed on the console.
The Java system property com.ibm.wqmfte.cred.keyfile overrides all others. If the system property is not set, the agent looks into the agent.properties file, followed by the installation.properties file for the initial key file.
If the initial key file is still not found and you have set the protection mode on the fteObfuscate command to 1, the agent logs an error
message in the output0.log file
If you have set the protection mode to 0 on the fteObfuscate
command, a warning message is logged indicating the deprecation.
The logger and commands follow the same steps for locating the initial key file.
Protocol Bridge and Connect:Direct Bridge
Protocol Bridge uses a properties file, ProtocolBridgeProperties.xml, for connecting to FTP, SFTP, and FTPS servers. This properties file contains connection attributes required to connect to these servers.
A bridge agent restart is required if you modify the value of the credentialsFile or credentialsKeyFile attributes in the ProtocolBridgeProperties.xml file.
<tns:credentialsFile path="$HOME/ProtocolBridgeCredentials.xml" /><tns:credentialsKeyFile path="$HOME/CredKey.key"/><tns:credentialsFile path="$HOME/ ConnectDirectCredentials.xml" /><tns:credentialsKeyFile path="$HOME/CredKey.key”/>You can specify the credentialsKeyFile element, without specifying the credentialsFile element in the ProtocolBridgeProperties.xml file.
If you do not specify the credentialsFile element, the default credential file ProtocolBridgeCredentials.xml is used by the protocol bridge agent, and the value of the key file specified in the credentialsKeyFile attribute is used to decrypt the credential file.
Similarly, you can specify the credentialsKeyFile element, without specifying the credentialsFile element in the ConnectDirectNodeProperties.xml file.
If you do not specify the credentialsFile element, the default credential file ConnectDirectCredentials.xml is used by the Connect:Direct bridge, and the value of the key file specified in the credentialsKeyFile attribute is used to decrypt the credential file.
![[z/OS]](ngzos.gif)
Using the key from the data set on z/OS
On z/OS®, you can specify MQMFTCredentials and provide the credentials key file using a PDSE. See Configuring MQMFTCredentials.xml on z/OS.