PingAuthorize

Adding the ping-auth plugin to your control plane

Use the ping-auth plugin’s schema.lua file to create the configurable entity required by Konnect. Konnect uses this file to create a plugin entry in the plugin catalog for your control plane. If the plugin schema should be available in multiple control planes, add the schema individually to each one.

You can manage schemas for custom plugins through the Konnect UI or the Konnect Control Planes Config API.


  • Using the Konnect UI

  • Using the Konnect API

Adding the plugin using the Konnect UI

About this task

The UI is not available when using KIC in Konnect. Use the Konnect API instead.

Steps

  1. Download version 1.0.8-1 or later of the kong-plugin-ping-auth src from https://luarocks.org/modules/pingidentity/kong-plugin-ping-auth.

    Support for Kong Konnect is available in version 1.0.8 and later of the plugin.

  2. Extract the src.rock file and store it on your local computer.

    Verify that you have the following files in the extracted /kong-plugin/ping-auth folder:

    • access.lua

    • handler.lua

    • Network_handle.lua

    • response.lua

    • schema.lua

  3. In Gateway Manager, open a control plane.

  4. In the sidebar, open Plugins, then click New Plugin.

  5. Click the Custom Plugins tab, then click Create on the Custom Plugin tile.

  6. Click Select File, then select the schema.lua file for the ping-auth plugin that you extracted in step 1.

  7. Make sure your file displays correctly in the preview, then click Save.

Adding the plugin using the Konnect API

About this task

When using the /plugin-schemas API, authenticate your requests with either a personal access token or a system account token by including it in the authorization header:

--header 'Authorization: Bearer kpat_xgfT'

Steps

  1. Upload the schema.lua file for your plugin using the /plugin-schemas endpoint:

    curl -i -X POST \
    https://{region}.api.konghq.com/konnect-api/api/runtime_groups/{controlPlaneId}/v2/plugin-schemas \
    --header 'Content-Type: application/json' \
    --data "{\"lua_schema\":  <your escaped Lua schema>}"

    Result:

    You should get an HTTP 201 response.

  2. To check that your schema was uploaded, use the following request:

    curl -i -X GET \
    https://{region}.api.konghq.com/konnect-api/api/runtime_groups/{controlPlaneId}/v1/available-plugins

    Result:

    This request returns an HTTP 200 response with the schema for your plugin as a JSON object.