Encrypting stored credentials in MFT
The Managed File Transfer (MFT) configuration contains several user IDs and passwords. These credentials are stored in two XML files. You can obfuscate these credentials by using the fteObfuscate command.
Credential files
- MQMFTCredentials.xml
- This file contains user IDs and passwords that are used to connect to agent, coordination, and command queue managers. This file also contains passwords that are used to access keystores that are used to secure connections to queue managers.
- ProtocolBridgeCredentials.xml
- This file contains user IDs and passwords that are used to connect to protocol servers.
Encrypting credentials
To protect sensitive information that is stored in these files, use the fteObfuscate command.
An encryption key, which is known as the initial key, is used to encrypt sensitive data in credentials files. You can provide a file that contains the initial key when you run the fteObfuscate command. Create the initial key file before you run the command. If you do not provide the initial key, the default initial key is used.
For more information about the fteObfuscate command, see fteObfuscate.
Decrypting credentials
- By using a Java system
property, for example:
-Dcom.ibm.wmqfte.cred.keyfile=/usr/hime/credkeyfile.keyNote:.- Before IBM MQ 9.3.1 and IBM MQ 9.3.0 Fix Pack 10, the name of this Java system property was misspelled in the product code as com.ibm.wqmfte.cred.keyfile. From IBM MQ 9.3.1 and IBM MQ 9.3.0 Fix Pack 10, the spelling of the property name is corrected to be com.ibm.wmqfte.cred.keyfile. Managed File Transfer uses both versions of the Java system property when checking if a user has specified a file containing the initial key that should be used for encrypting and decrypting credentials. This allows you to use the correct spelling of the property name, while maintaining backwards compatibility with the old misspelled name. Note that if both Java system properties are set, then the value of the correctly spelled property com.ibm.wmqfte.cred.keyfile is used.
- Before IBM MQ 9.3.1 and IBM MQ 9.3.0 Fix Pack 10, use the property com.ibm.wqmfte.cred.keyfile.
- 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.
- The path of the credentials key file being used for the agent and logger is logged to the output0.log file for that agent or logger.
- The path of the credentials key file being used for the commands, is displayed on the console.
The Java system property com.ibm.wmqfte.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.