Skip to content

Axway amplify Unified Catalog integration with Kong Community edition

rathna-axway edited this page Feb 4, 2021 · 10 revisions

Axway amplify Unified Catalog integration with Kong Community edition

Step by step guide to setup and test Kong Community edition and Axway amplify

Create a Service

curl -i -X POST \
  --url http://localhost:8001/services/ \
  --data 'name=petstore' \
  --data 'url=http://petstore.swagger.io' \
  --data 'tags=spec_local_petstore.json'

Create a Route

curl -i -X POST \
http://localhost:8001/services/petstore/routes \
--data 'paths[]=/petstore' \
--data name=petstore

Add key auth plugin to route

curl -i -X POST \
  --url http://localhost:8001/routes/petstore/plugins/ \
  --data 'name=key-auth'

Add ACL plugin to route

curl --location --request POST 'http://localhost:8001/routes/petstore/plugins' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "acl",
    "config": {
        "allow": [
            "amplify.group1"
        ]
    }
}'

Add http log plugin globally

curl -X POST http://localhost:8001/plugins/ \
--data "name=http-log" \
--data "config.http_endpoint=http://host.docker.internal:9000/requestlogs" \
--data "config.method=POST" \
--data "config.timeout=1000" \
--data "config.keepalive=1000" \
--data "config.flush_timeout=2" \
--data "config.retry_count=15"

Add additional parameter for tracing

curl -X POST http://localhost:8001/plugins/ \
--data "name=correlation-id" \
--data "config.header_name=Kong-Request-ID" \
--data "config.generator=uuid" \
--data "config.echo_downstream=false"

Build and start Kong traceability and discovery agent

$make build-trace
$./bin/run-trace
  • Traceability agent creates service and catalog.
  • Subscribe to catalog API
    • It creates an application, apikey and assign appropriate acl
$make build-disc
./bin/run-disc

Test Route on Kong

curl --location --request GET 'http://localhost:8000/petstore/v2/store/inventory' \
--header 'apikey: 123456'

Test API Observer screen on amplify

Clone this wiki locally