+164
−40
File changed.
Preview size limit exceeded, changes collapsed.
Loading
Adds app_provider_id ownership checks to the Edge App Management endpoints that act on an app, instance or deployment by ID, and to the appId check in Traffic Influence create. Before this, any authenticated caller could read, delete, deploy or reference resources owned by another app provider.
| Endpoint | Owner source | On mismatch |
|---|---|---|
GET /apps/{appId} |
service_specification.app_provider_id from the SRM catalog |
404 |
DELETE /apps/{appId} |
same, checked before the SRM delete | 404, nothing deleted |
POST /appinstances, POST /deployments (appId) |
same | 400 "App … is not registered" |
POST /traffic-influences (appId) |
same (replaces the previous tenant_id comparison) |
400 |
DELETE /appinstances/{id}, DELETE /deployments/{id} |
app_provider_id of the deploy operation |
404, no terminate published |
404 rather than 403, so callers can't probe which IDs exist (same pattern as QoD sessions and TI).app_provider_id only; tenant_id is not used._get_owned_app in EdgeApplicationManagementService; the router now passes the caller to get_app.404 on delete. This matches how GET /deployments already filters.GET /apps/{appId} already did this; for the other paths it's one extra call.tenant_id rule is replaced by test_other_providers_app_id_is_rejected.pytest tests/unit: 1146 passed. ruff, ruff format and mypy are clean.File changed.
Preview size limit exceeded, changes collapsed.