Example: Mapping web user IDs to MQMD user IDs

When you submit file uploads to the WebSphere® MQ File Transfer Edition Web Gateway, the Web Gateway determines which WebSphere MQ Message Descriptor (MQMD) user ID to use for the transfer. You can define a set of mappings between web user ID and MQMD user ID by using the Web Gateway.

About this task

Submit an HTTP request to the Web Gateway, with XML in the body of the request that maps web user IDs to MQMD user IDs. For more information about the format of the XML, see XML format for mapping web user ID to an MQMD user ID. A successful request returns an HTTP status code of 200.

You must have the wmqfte-admin role associated with your user account to create a set of mappings. For more information about security roles for the Web Gateway, see User roles for the Web Gateway.

If you have the security role wmqfte-admin, you can also map web user IDs to MQMD user IDs by using the administrative console. For more information, see Web Gateway administrative console.

The following steps describe how to submit a POST request to create a set of mappings. In this example, the server hosting the Web Gateway is example.com and the HTTP request is submitted using a web browser that identifies itself as mozilla. The request contains information for two users who have the web user IDs jim and rachel.

Procedure

  1. Create an HTTP request with the following format:
    POST HTTP/1.1 /admin/user
    Host: example.com
    User-Agent: mozilla
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <users>
      <user>
        <userID>jim</userID>
        <mqmdUserID>mqjim</mqmdUserID>
      </user>
      <user>
        <userID>rachel</userID>
        <mqmdUserID>mqrachel</mqmdUserID>
      </user>
    </users>
  2. Submit the request to the Web Gateway. The Web Gateway returns an HTTP response with the following format:
    HTTP/1.1 200 OK
    Server: WAS/7.0
    Content-Length: 0

    An invalid request returns an HTTP error code and a WebSphere MQ File Transfer Edition error message. To identify the cause of the error, see Troubleshooting the Web Gateway.

Results

When one of the users jim or rachel submits a file upload request through the Web Gateway, the appropriate MQMD user ID, mqjim or mqrachel, is used for the transfer. If a user who does not have an MQMD user ID defined submits a file upload request, the value of the defaultMQMDUserID parameter is used. In this situation, if this parameter was not defined during Web Gateway deployment, the transfer fails. For more information, see Deploying the Web Gateway with WebSphere Application Server Version 7.0 and Preparing to deploy the Web Gateway with WebSphere Application Server Community Edition.


Task Task

Feedback

Timestamp icon Last updated: Tuesday, 30 January 2018
http://www.ibm.com/support/knowledgecenter/SSEP7X_7.0.4/com.ibm.wmqfte.doc/web_usermapping_create.htm