de69f88e29
14 routes: Order (single key, full CRUD + order-details sub-resource) and Orderdetail (composite key ordernumber+productcode, own top-level resource, mirrors backend's own URL structure). MCP layer built with the corrected single-route pattern from the start (STATUS.md section 18) — 7 tools, list/get read-only for all 5 roles, create-order/create-orderdetail for admin+customer+support (verified against OrderPermission/OrderScopedPermission.check() — support gets an unconditional class-level pass, the status-only restriction is object-level and doesn't apply to create). Keycloak (local): sales-api-audience + mcp-sales-audience client scopes, sales-api + mcp-sales resource clients, attached to the broker and librechat respectively. Deploy key and broker secret reused/mirrored from catalog-api and the live broker client, same pattern as customers-api/payments-api.
24 lines
612 B
YAML
24 lines
612 B
YAML
apiVersion: configuration.konghq.com/v1
|
|
kind: KongPlugin
|
|
metadata:
|
|
name: ${NAME}-sales-mcp-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}-sales-mcp-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
|