Configuring Kong Gateway for PingAccess integration
Download, install, and configure the ping-auth
plugin to set up a connection between Kong Gateway and PingAccess.
Before you begin
Install and start Kong Gateway. Learn more in the Kong Gateway documentation.
Steps
-
Download and extract the
ping-auth
plugin for Kong Gateway from https://luarocks.org/modules/pingidentity/kong-plugin-ping-auth. -
Install the
ping-auth
plugin using one of the following procedures:-
Via LuaRocks from the created ‘rock’: If you use this procedure, run the
luarocks install kong-plugin-ping-auth
command to install the plugin. -
Manually: Learn more in Kong’s installation guide.
-
-
After installation, load the plugin into Kong:
-
Edit the
plugins
property in thekong.conf
file to include theping-auth
plugin.Example:
plugins = bundled,ping-auth
-
Restart Kong Gateway to apply your changes.
-
To confirm that Kong loaded the plugin successfully, look for the debug-level message
Loading plugin: ping-auth
in Kong’serror.log
file.
You can find more information and configuration tips in Load the plugin and Verify loading the plugin in the Kong Gateway documentation.
-
-
Use the Kong Gateway UI or API to complete the configuration.
-
Kong Gateway UI
-
Kong Gateway API
Setting up Kong Gateway
Steps
-
In Kong Manager, select the Default workspace, then click Plugins.
-
On the
ping-auth
line, click Edit -
On the Update ping-auth plugin page, click the toggle to enable the plugin.
-
(Optional) If you want to enable the plugin for specific consumers, services, or routes, click Scoped and then enter Service, Route, and Consumer information as needed.
-
In the Config.Service URL field, enter the full URL for PingAccess, using the
https://<PINGACCESS_URL>:<SIDEBAND_PORT>/
format.Example:
https://localhost:3020/
-
<PINGACCESS_URL>
is the fully-qualified name of the machine running PingAccess. -
Don’t include
/sideband…
in the path. -
The default sideband port is
3020
, but you should check thesideband.http.port
property in the PingAccessrun.properties
file to confirm that you haven’t configured a different value. Learn more in the Configuration file reference. -
The
sideband.http.enabled
property must be set totrue
in the PingAccessrun.properties
file for theping-auth
plugin to communicate with PingAccess successfully.
-
-
In the Config.Shared Secret field, paste the shared secret you created in Configuring PingAccess for Kong Gateway integration.
Version 1.2.0 of the ping-auth
plugin supports referenceable secrets. For security reasons, store the shared secret in a vault supported by Kong. Learn more in Secrets Management and Environment Variables Vault in the Kong documentation. -
In the Config.Secret Header Name field, enter the name of the header that provides the shared secret.
The default value is
CLIENT-TOKEN
. -
(Optional) Configure additional options in Kong Manager or the API:
You can find information on using the API to configure these fields in Create a plugin in the Kong Gateway admin API documentation. Option API Field Name Description Config.Connection KeepAlive Ms
connection_keepAlive_ms
The duration to keep the connection alive for reuse.
The default value is
6000
.Config.Connection Timeout Ms
connection_timeout_ms
The duration to wait before the connection times out.
The default value is
10000
.Config.Enable Debug Logging
enable_debug_logging
Controls if requests and responses are logged at the debug level. The default value is
false
.For log messages to show in the error.log
, you must setlog_level = debug
in thekong.conf
file.Config.Verify Service Certificate
verify_service_certificate
Controls whether the service certificate is verified.
This configuration option is intended for testing purposes. The default value is
true
. -
Click Update, then click Update Plugin.
Next steps
Setting up Kong Gateway using the API
Steps
-
Include the following JSON object in a POST request to
https://<KONG_URL>/plugins
:{ "name": "ping-auth", "enabled": true, "config": { "service_url": "https://<PINGACCESS_URL>:3020/", "shared_secret": "<SHARED_SECRET>", "secret_header_name": "<HEADER_NAME>" } }
Use the following information to fill out the required fields in the Config section:
-
service_url
: The full URL of the Ping policy provider, using thehttps://<PINGACCESS_URL>:<SIDEBAND_PORT>/
format. The default value ishttps://localhost:3020/
.-
<PINGACCESS_URL>
is the fully-qualified name of the machine running PingAccess. -
Don’t include
/sideband…
in the path. -
The default sideband port is
3020
, but you should check thesideband.http.port
property in the PingAccessrun.properties
file to confirm that you haven’t configured a different value. Learn more in the Configuration file reference. -
The
sideband.http.enabled
property must be set totrue
in the PingAccessrun.properties
file for theping-auth
plugin to communicate with PingAccess successfully.
-
-
shared_secret
: The shared secret used to authenticate this plugin to the policy provider. Paste the shared secret you created in Configuring PingAccess for Kong Gateway integration.Version 1.2.0 of the ping-auth
plugin supports referenceable secrets. For security reasons, store the shared secret in a vault supported by Kong. Learn more in Secrets Management and Environment Variables Vault in the Kong documentation. -
secret_header_name
: The name of the header that provides the shared secret. The default value isCLIENT-TOKEN
.
-
-
(Optional) Include additional fields in the POST request, making sure to adhere to the Kong API specification.
Learn more in Create a plugin in the Kong Gateway admin API documentation.
Option API Field Name Description Config.Connection KeepAlive Ms
connection_keepAlive_ms
The duration to keep the connection alive for reuse.
The default value is
6000
.Config.Connection Timeout Ms
connection_timeout_ms
The duration to wait before the connection times out.
The default value is
10000
.Config.Enable Debug Logging
enable_debug_logging
Controls if requests and responses are logged at the debug level. The default value is
false
.For log messages to show in the error.log
, you must setlog_level = debug
in thekong.conf
file.Config.Verify Service Certificate
verify_service_certificate
Controls whether the service certificate is verified.
This configuration option is intended for testing purposes. The default value is
true
.