Broadcom API Gateway - How to publish REST Man Service on port 9443 only
search cancel

Broadcom API Gateway - How to publish REST Man Service on port 9443 only

book

Article ID: 373462

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

In this scenario, customer would like Gateway's REST Management Service to be available only via HTTP port 9443 and not port 8443.

Environment

API Gateway 

Cause

By default, REST Management Service is published on port 8443 and 9443.

Resolution

The restriction and/or port redirection can be done by network systems acting before the Gateway (e.g Firewalls, Load Balancer and so on...).

However, a quick workaround can be applied by modifying the REST Man service policy logic.

Here an example:

1 - In the beginning of the policy logic, we add Set Context Variable assertion to parse the local TCP port the incoming requests is coming from ( request.tcp.localPort )

2 - We can use Compare Expression assertion to compare the variable's value retrieved from point 1 and to add a rule that allows only port 9443

3 - Finally, we can make use of a Customise Error Response assertion to return a meaningful error or whatever error we wish to return back to the client.

The final policy changes should look like those highlighted below: