Managed File Transfer provides a sample user exit that
performs user credential mapping.
About this task
A sample protocol bridge credential exit is provided in the
MQ_INSTALLATION_PATH/mqft/samples/protocolBridge directory
and in the topic Sample
protocol bridge credential user exit. This sample is based on the
com.ibm.wmqfte.exitroutine.api.ProtocolBridgeCredentialExit interface.
The SampleCredentialExit.java exit reads a properties file that maps the
MQMD user IDs associated with transfer requests to server user IDs and server passwords. The
location of the properties file is taken from the protocol bridge agent property
protocolBridgeCredentialConfiguration.
To run the sample user exit, complete the following steps:
Procedure
- Compile the SampleCredentialExit.java file.
-
Create a JAR file that contains the compiled exit and its package structure.
- Place the JAR file in the
MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent_name/exits
directory.
- Edit the
MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent_name/agent.properties
file to contain the line:
protocolBridgeCredentialExitClasses=SampleCredentialExit
-
Edit the property file of the protocol bridge agent to include:
exitClassPath=IBM MQ installation_directory\mqft\config\configuration_queue_manager\agents\protocol_bridge_agent_name\exits\SampleCredentialExit.jar
The agent.properties file for an agent is in your
MQ_DATA_PATH/mqft/config/coordination_qmgr_name/agents/agent_name
directory.
If you change the agent.properties file, you must restart the agent to pick
up the changes.
- Create a credential properties file (credentials.properties) in the
directory
MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent
and edit it to include entries in the format:
mqUserId=serverUserId,serverPassword
- Edit the
MQ_DATA_PATH/mqft/config/coordination_queue_manager/agents/bridge_agent_name/agent.properties
file to contain the line:
protocolBridgeCredentialConfiguration=MQ_DATA_PATH/mqft/
config/coordination_queue_manager/agents/bridge_agent_name/credentials.properties
You
must use the absolute path to the
credentials.properties file.
- Start the protocol bridge agent by using the fteStartAgent
command.