Modifying Context Root Discovery URLs

The information documents, by default, describe the paths to the different applications’ context roots through the same router port and scheme as the current request is using (by utilizing the host header of the request). This may not be desirable in all cases. For example, you may want to present different context root discovery URLs when traffic from external sources is to be routed through a web server fronting the grid and traffic from internal sources should connect directly to the grid. Another example where you may want a different context root discovery URL is when an application should be defaulted to https even though the discovery-request is not.

To modify the context root discovery URLs, you add or modify entries for the Context root discovery urls grid property. This property is a map where the key is a contextRoot (optionally together with a router) and the value is a list of addresses (optionally together with SSL authentication mode). Multiple entries in the list are a preferred order that enables fallback addresses in the discovery document.

The format for entries in the Context root discovery urls grid property is as follows:

  • Key: [RouterName:]contextRootName

  • Value (list of): [sslMode:]httpAddress

    Valid sslMode values are:

    • none - applicable for HTTP only

    • server - default for https, the server presents certificates to identify itself to the client

    • client - the server presents certificates to identify itself to the client and the client may choose to identify itself with a certificate

    • required - the server presents certificates to identify itself to the client and the client is required to identify itself with a certificate

To modify or override context root discovery URLs

  1. Navigate to the Configuration Manager.

  2. Click the Grid Properties link.

  3. Locate the property named Context root discovery urls in the Grid Http Discovery Services section.

  4. Click the link in the Value column.

  5. In the resulting dialog box, click Add New Entry and add values for the context root (and optional router) and for the addresses (and optional SSL authentication modes).

  6. Click Save to close the dialog box, click the Save button on the Grid Properties page, and then click Save to confirm the changes.

Example 1: A Web Server or Two in Front of the Grid

Context root discovery urls value:

TestRouter:m3api-rest -> client:https://m3rest.example.com, http://restportal.example.com/m3

This grid property values means that when the discovery service is accessed through the TestRouter grid router, the ordered list of access addresses for the context root m3api-rest will be https://m3rest.example.com (https mode "client") and then http://restportal.example.com/m3.

Example 2: Use of HTTPS as Preferred Scheme

Context root discovery urls value:

m3api -> https://server1.mycompany.com:10081/m3api/

This grid property values means that no matter which router the discovery request comes from, the context root m3api should be accessed through the TestRouter on https (the TestRouter has that specific address and https port).