debian-forge-composer/internal/cloudapi/v2
Tomas Hozza 4a94b46f33 cloudapi: handle multi-tenancy in all compose/<id> endpoints
Use the `EnsureJobChannel()` middleware in all `compose/<id>` endpoints.
Specifically in the:
 - status
 - metadata
 - manifests
 - logs

As a result, these endpoints now return `404` in case the server has JWT
enabled and the channel associated with the request does not match the
channel associated with the requested compose (job).

Extend the multi-tenancy unit test to ensure that these endpoints behave
as expected in case of match and mismatch between the request and
compose channels.
2022-06-10 14:48:18 +01:00
..
errors.go cloudapi: validate input 2022-05-16 13:20:46 +02:00
errors_test.go cloudapi/v2: Listen on /api/image-builder-composer/v2 2021-10-11 09:52:21 +02:00
handler.go cloudapi: handle multi-tenancy in all compose/<id> endpoints 2022-06-10 14:48:18 +01:00
middleware.go cloudapi: add EnsureJobChannel() middleware to verify job channel 2022-06-10 14:48:18 +01:00
openapi.v2.gen.go cloudapi: validate input 2022-05-16 13:20:46 +02:00
openapi.v2.yml cloudapi: validate input 2022-05-16 13:20:46 +02:00
server.go cloudapi: move ValidateRequest() to middleware.go 2022-06-10 14:48:18 +01:00
v2_internal_test.go simplify package set chain handling 2022-06-01 11:36:52 +01:00
v2_koji_test.go cloudapi: switch osbuild-koji -> osbuild for Koji build jobs 2022-06-10 14:48:18 +01:00
v2_multi_tenancy_test.go cloudapi: handle multi-tenancy in all compose/<id> endpoints 2022-06-10 14:48:18 +01:00
v2_test.go Cloud API: support composes/<id>/manifests endpoint for non-koji builds 2022-06-10 14:48:18 +01:00