feat(jsonrpc): use regex named group for path-tenant routing - #1067
feat(jsonrpc): use regex named group for path-tenant routing#1067ehsavoie wants to merge 2 commits into
Conversation
9b33f74 to
7bb34c5
Compare
|
Hi @ehsavoie , thanks. Ran the paths from the issue against this branch and against main, same probes both times.
Behaves as expected. Path tenant, multi-segment, trailing slash and the body/URL mismatch validation all work. One thing worth a look: the catch-all |
@omatheusmesmo Yes but we can't just filter on the tenant. You application would have to have something after the second / Maybe we could make that multitenancy configurable so that the catch all route would only be activated by setting a configuration property? WDYT ? |
|
@omatheusmesmo would the changes I've added in the right direction ? |
- Catch-all regex ^/(?<tenant>.*)$ captures multi-segment URL tenants - Blank/absent params.tenant falls back to URL path tenant (SDK extension) - URL and body tenants must agree or InvalidParamsError is returned BREAKING CHANGE: POSTing to /tenantA with params.tenant set to a different value previously succeeded (body tenant silently won). It now fails with InvalidParamsError (-32602). Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
- Add `quarkus.a2a.multitenancy.enabled` property to disable tenant routing - Multi-segment paths (e.g. /org/team) now return 404 Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Fixes #1034 🦕