fix: scope GET /apps by caller app_provider_id via SRM

Summary

  • Scope CAMARA GET /apps by the caller's app_provider_id (JWT sub), so each user only sees apps they registered — not the whole tenant.
  • Pass app_provider_id on the internal SRM catalog list (?app_provider_id=…); do not forward tenant_id to SRM.
  • Keep CAMARA alignment: clients still only send optional x-correlator; identity comes from the token via Caller.

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_id to 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_id column on AppRegistration
  • Ownership checks on GET/DELETE /apps/{appId}

Merge request reports

Loading
Loading