Loading
fix: scope GET /apps by caller app_provider_id via SRM
Summary
- Scope CAMARA
GET /appsby the caller'sapp_provider_id(JWTsub), so each user only sees apps they registered — not the whole tenant. - Pass
app_provider_idon the internal SRM catalog list (?app_provider_id=…); do not forwardtenant_idto SRM. - Keep CAMARA alignment: clients still only send optional
x-correlator; identity comes from the token viaCaller.
Context
CAMARA getApps has no filter params and only says return apps “the user has permission to view.” For this release, that means app provider scope (JWT sub), not org/tenant_id. SRM owns provider filtering on the catalog list; OEG extracts app_provider_id from the validated token and forwards it on the internal call.
Changes
- Router:
get_apps→service.get_apps(app_provider_id=caller.app_provider_id, …) - Service: remove scoping TODO; forward
app_provider_idto SRM - SRM port/client + fake:
get_apps(app_provider_id, x_correlator)with query param - Unit/endpoint/flow/SRM client tests updated
Out of scope
- OEG
list_by_tenant/ registration ∩ SRM id join - Adding
app_provider_idcolumn onAppRegistration - Ownership checks on
GET/DELETE /apps/{appId}