Commit Graph

8 Commits

Author SHA1 Message Date
Stéphane Tailland a8459f7ecf Fix invalid K8s resource names for read_only/product_manager consumer groups
metadata.name must be an RFC 1123 subdomain (no underscores); spec.name
(the value actually matched against the JWT role claim) stays read_only/
product_manager to match the realm role names exactly.
2026-08-21 18:39:30 +02:00
Stéphane Tailland fc6b60c582 Rebuild catalog-mcp consumer groups on the real 5-role model
KongConsumerGroups were still named sttlab-user/sttlab-admin, a leftover
from before the classic-models realm's role model existed. Real users'
JWTs carry realm roles (admin, read_only, product_manager, customer,
support) via consumer_groups_claim, so no group ever matched and every
tool call was rejected with 403 "consumer groups were not found".

Groups now match the realm roles directly; tool ACLs gate on each role's
catalog:read/catalog:write grant from security-model.yaml.
2026-08-21 18:35:02 +02:00
Stéphane Tailland 95f9b611b3 Capture request/response bodies for audit-log via pre/post-function
Body capture lives in dedicated audit-log-body-capture(-bindings).yaml
files, separate from audit-log.yaml itself, so they can be dropped
without touching the base logging plugin (degrades gracefully to
metadata-only via nil custom_fields). Response body captured in
body_filter (chunk-accumulated) rather than the log phase, which
cannot call kong.response.get_raw_body() directly.
2026-08-21 14:53:52 +02:00
Stéphane Tailland 1c46f9b447 Revert custom_fields_by_lua on audit-log: broke logging entirely
kong.request.get_raw_body()/kong.response.get_raw_body() cannot be
called from the log phase (confirmed via dataplane error logs:
"function cannot be called in log phase") — this silently killed
log_by_lua for every plugin on the request, not just body capture.
Back to metadata-only logging while body capture gets redone properly
(pre-function/post-function storing into kong.ctx.shared, read back
in custom_fields_by_lua).
2026-08-21 14:46:49 +02:00
Stéphane Tailland 6fa122207e Capture request/response bodies in audit-log, extend it to MCP
custom_fields_by_lua adds request_body/response_body to the http-log
payload. Bodies and the raw Authorization header are now both logged
in clear text — dev only, flagged in the plugin file itself.
2026-08-21 14:40:20 +02:00
Stéphane Tailland 466c657240 Point catalog-api at the classic-models Keycloak realm, drop separate MCP hostname
MCP now shares the REST hostname (routed by path), matching the
/catalog/v1 rework — no second TLS listener/certificate needed.
2026-08-21 09:24:18 +02:00
Stéphane Tailland 4a1c772b80 Expose catalog-api under /catalog/v1, decoupled from the backend path
Public routes no longer leak classic-models-api's own /api/v1 prefix.
request-transformer-advanced rewrites to the real backend path per route.
2026-08-21 09:22:33 +02:00
Stéphane Tailland f929a0f7e4 MCP server 2026-08-20 16:26:48 +02:00