Build payments-api REST layer (Layer 3), mirroring customers-api
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.
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-listpayments
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_listpayments
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /payments/v1/payments/
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-createpayment
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_createpayment
|
||||
methods:
|
||||
- POST
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /payments/v1/payments/
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-getpayment
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_getpayment
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/payments/v1/payments/(?<customernumber>[^#?/]+)/(?<checknumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-updatepayment
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_updatepayment
|
||||
methods:
|
||||
- PUT
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/payments/v1/payments/(?<customernumber>[^#?/]+)/(?<checknumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-patchpayment
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_patchpayment
|
||||
methods:
|
||||
- PATCH
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/payments/v1/payments/(?<customernumber>[^#?/]+)/(?<checknumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-payments-api-deletepayment
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-payments-api
|
||||
name: payments-api_deletepayment
|
||||
methods:
|
||||
- DELETE
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/payments/v1/payments/(?<customernumber>[^#?/]+)/(?<checknumber>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- payments
|
||||
Reference in New Issue
Block a user