IBM Support

How to customize the hostname of OSLC responses from ClearQuest Change Management Server (load-balanced environments)

Question/Answer


Question

How can I use the domain name or an alternate hostname instead of an IP address in the OSLC response in a ClearQuest load-balanced environment?

Cause

Consider a ClearQuest OSLC load-balanced environment with a proxy server.
Now a user wants to access the CQ Web in an OSLC application.

  1. The OSLC application server sends the following request to the proxy server:
    https://proxy.server/cqweb/oslc?rcm.contentType=application/json
  2. The proxy server forwards this request as:
    https://clearquest.behind.proxy/cqweb/oslc?rcm.contentType=application/json
  3. The load balancer changes this request into:
    https://8.8.8.8/cqweb/oslc?rcm.contentType=application/json
  4. The CQWeb server with the IP address 8.8.8.8 receives the request and replies with a response:
    {"dc:title":"Schema Repositories","oslc_cm:results":[{"dc:title":"9.0.0","rdf:resource":"https:\/\/8.8.8.8\/cqweb\/oslc\/repo\/9.0.0"}]}
  5. The reply finds it's way back to the OSLC application server.
  6. The OSLC application server reads the URL in the response body and tries to use it to process some more OSLC requests. Since the URL contains the server IP address, the connection fails, because that IP is not reachable directly from its side of the proxy server.

Answer

There are already technotes that describe how to modify this file.

The typical location is:
<clearquest_home>\cqweb\cqwebprofile\installedApps\dfltCell\TeamEAR.ear\cqweb.war\WEB-INF\classes\cqrest.properties or its Linux or UNIX equivalent relative to the CQ Web profile home directory.

  • Add a new property in cqrest.properties file as follows:

   # Allow administrators to specify a "public URI root" that is used for all generated URIs.
   # This is needed in case the ClearQuest server is behind a proxy.
   # The format is https://hostname:port
   com.ibm.rational.cm.web.component.public.uri.root=https://proxy.server

  • Restart the CM server for changes to take effect.
  • Repeat for every load-balanced CM server.

After restarting the CM server, responses should now appear with your modified root:
The response in above step 4 will be:
{
  "dc:title": "Schema Repositories",
  "oslc_cm:results": [{
    "dc:title": "9.0.0",
    "rdf:resource": "https:\/\/proxy.server\/cqweb\/oslc\/repo\/ILC"
  }]
}

Document information

More support for: Rational ClearQuest

Software version: All Versions

Operating system(s): AIX, Linux, Solaris, Windows

Reference #: 0730197

Modified date: 20 September 2018