bf5adadb24
6 routes over Payment, composite key (customernumber + checknumber), proxying to classic-models-api. openid-connect with RFC 8693 token exchange to classic-models-api audience, rate-limiting, proxy-cache, audit-log — same structure as customers-api's REST layer. Keycloak (local): payments-api-audience client scope + payments-api resource client added, attached to kong-token-exchange-broker's default scopes. No dedicated protocol mappers on payments-api itself, same practice as customers-api/mcp-customers. No MCP layer — same as customers-api, not needed yet.
28 lines
914 B
YAML
28 lines
914 B
YAML
# dev only: captures raw request/response bodies into kong.ctx.shared for
|
|
# audit-log.yaml's custom_fields_by_lua to read back in the log phase.
|
|
# Drop this file (and its bindings) to stop body capture without touching
|
|
# audit-log.yaml itself — it degrades gracefully to metadata-only logging.
|
|
apiVersion: configuration.konghq.com/v1
|
|
kind: KongPlugin
|
|
metadata:
|
|
name: ${NAME}-payments-api-audit-capture-request
|
|
namespace: ${NAMESPACE}
|
|
plugin: pre-function
|
|
config:
|
|
access:
|
|
- "kong.ctx.shared.audit_request_body = kong.request.get_raw_body()"
|
|
---
|
|
apiVersion: configuration.konghq.com/v1
|
|
kind: KongPlugin
|
|
metadata:
|
|
name: ${NAME}-payments-api-audit-capture-response
|
|
namespace: ${NAMESPACE}
|
|
plugin: post-function
|
|
config:
|
|
body_filter:
|
|
- |
|
|
local chunk = ngx.arg[1]
|
|
if chunk then
|
|
kong.ctx.shared.audit_response_body = (kong.ctx.shared.audit_response_body or "") .. chunk
|
|
end
|