Specifying common URIMAP attributes for CICS as an HTTP server

A URIMAP resource definition defines how HTTP requests are processed. Many of the attributes specified in a URIMAP apply to all configurations is which CICS acts as an HTTP server.

About this task

A URIMAP is a resource that matches the URLs that are received on inbound HTTP requests, to provide information about how to process the requests.

Procedure

  1. Use the STATUS attribute to specify whether the URIMAP definition is installed in an enabled or disabled state.
  2. Specify a USAGE attribute of SERVER (CICS® as an HTTP server).
  3. Identify the URL to be processed by the URIMAP.
    The URL represents a resource that you plan to make available to a web client through CICS, and consists of several components.
    For example, in http://www.example.com/software/index.html?n=John&s=Smith:
    • The scheme component is http
    • The host component is www.example.com
    • The path component is /software/index.html
    • The query string is ?n=John&s=Smith
    The components of a URL are described in The components of a URL.
  4. Specify the components of the URL in the corresponding attribute of the URIMAP resource.
    1. Specify the scheme component in the SCHEME attribute.
      You can specify values of HTTP or HTTPS. Do not include the delimiters // following the scheme component. If you specify SCHEME(HTTP), the URIMAP accepts web client requests made using either the HTTP scheme or the more secure HTTPS scheme. If you specify SCHEME(HTTPS), the URIMAP accepts only web client requests made using the HTTPS scheme.
    2. If you need to distinguish between URLs containing different host names, specify the host component in the HOST attribute.
      When you specify the host component:
      • Do not include a port number.
      • You can specify a host name or an IPv4 or IPv6 address.
      • You can specify a single asterisk (*).

        Use this option if you are not using multiple host names or if you do not want to distinguish between hosts names. If you use this option, the URIMAP definition matches any host name on incoming URLs.

    3. Specify the path component in the PATH attribute.
      • You can omit the delimiter / (forward slash) at the beginning of the path component, because CICS automatically provides it.
      • You can use an asterisk as a wildcard character at the end of the path. For example:
        • If you specify /software/*, the URIMAP resource matches all requests with paths that start with the string /software/.
        • If you specifying /*, the URIMAP resource matches all requests directed to the host named in the HOST attribute.
        If more than one URIMAP resource containing a wildcard matches an HTTP request, the most specific match is taken.
      • If inbound URLs contain a query string, and you want to apply the URIMAP definition to a specific query, include the query string, with the leading question mark (?) character, in the PATH attribute. You can specify a query string following a path component that includes an asterisk as a wildcard, but the query string cannot itself include an asterisk: you must specify the exact query string. If you do not specify a query string in the URIMAP definition, matching takes place only on the path, and any query string in the request is ignored.
      • For a static response with a CICS document template, you can use a query string to select the URIMAP definition or it can be substituted into the document template.
  5. Optional: In the TCPIPSERVICE attribute, specify the name of the TCPIPSERVICE definition that defines the inbound port to which this URIMAP definition relates.

    If you do not specify this attribute, the URIMAP definition applies to a matching HTTP request on any inbound port.

    When a URIMAP that specifies SCHEME( HTTPS) matches an inbound request, CICS checks that the inbound port used by the request is using SSL. If SSL is not specified for the port, the request is rejected with a 403 (Forbidden) status code. When the URIMAP definition applies to all inbound ports, this check ensures that a web client cannot use an unsecured port to access a secured resource. No check is carried out for a URIMAP definition that specifies HTTP as the scheme, so web clients can use either unsecured or secured (SSL) ports to access these resources.

What to do next

Specify further attributes, depending on how you intend to provide the response to an inbound HTTP request.
  • You can provide a dynamic response by writing a web-aware application program
  • You can provide a static response in a CICS document template or a z/OS UNIX file