Creating the gateway API endpoint
Configure a reverse proxy by configuring an API External Server and a Gateway API Endpoint.
Steps
-
Optional: Configure an API External Server for the Meme Game API. An API External Server controls how PingAuthorize Server handles connections to an HTTPS API server, including configuration related to TLS. In this case, we simply need to provide a base URL.
If you completed Tutorial 2: Configuring fine-grained access control for an API, then you already set up this API External Server.
-
Sign on to the administrative console using the URL and credentials from Accessing the GUIs.
-
Click External Servers.
-
Click New External Server and choose API External Server.
-
For Name, specify
Meme Game API
. -
For Base URL, specify
https://meme-game.com
.
The following image shows this configuration.
-
Click Save.
-
-
Configure a Gateway API Endpoint. A Gateway API Endpoint controls how PingAuthorize Server proxies incoming HTTP client requests to an upstream API server.
-
In the administrative console, click Configuration and then Gateway API Endpoints.
-
Click New Gateway API Endpoint.
-
For Name, specify
Meme Game - Shared Answers
. -
For Inbound Base Path, specify
/meme-game/api/v1/users/{user}/answers
.The inbound base path defines the base request path for requests to be received by PingAuthorize Server.
By surrounding a value in curly braces, you can add a parameter to a gateway API endpoint’s inbound-base-path and use it to fill in a parameter of the same name in the outbound path. You can also use this parameter to inform other elements of the policy request, such as the service.
-
For Outbound Base Path, specify
/api/v1/users/{user}/answers
.The outbound base path defines the base request path for requests that PingAuthorize Server forwards to an API server.
-
For API Server, specify
Meme Game API
. This is the API External Server you defined in Configuring a reverse proxy for the Meme Game API.
Your screen should look like the following one.
-
Save your changes.
-