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.
31 lines
688 B
YAML
31 lines
688 B
YAML
apiVersion: configuration.konghq.com/v1
|
|
kind: KongPlugin
|
|
metadata:
|
|
name: ${NAME}-sales-api-openid-connect
|
|
namespace: ${NAMESPACE}
|
|
plugin: openid-connect
|
|
config:
|
|
issuer: ${OIDC_ISSUER}
|
|
audience_required: ${BACKEND_AUDIENCE}
|
|
auth_methods:
|
|
- bearer
|
|
display_errors: false
|
|
ssl_verify: true
|
|
consumer_claims:
|
|
- - sub
|
|
consumer_by:
|
|
- custom_id
|
|
- username
|
|
consumer_optional: true
|
|
client_id:
|
|
- ${TOKEN_EXCHANGE_CLIENT_ID}
|
|
client_secret:
|
|
- ${TOKEN_EXCHANGE_CLIENT_SECRET}
|
|
token_exchange:
|
|
subject_token_issuers:
|
|
- issuer: ${OIDC_ISSUER}
|
|
conditions: {}
|
|
request:
|
|
audience: ${BACKEND_AUDIENCE}
|
|
scopes: ${BACKEND_SCOPES}
|