debian-forge-composer/cmd
Ondřej Budai cfb756b9ba api/{cloud,worker}: used channel name based on JWT claims for new jobs
This commit implements multi-tenancy. A tenant is defined based on a value
from JWT claims. The key of this value must be specified in the configuration
file. This allows us to pick different values when using multiple SSOs.

Let me explain more in depth how this works:

Cloud API gets a new compose request. Firstly, it extracts a tenant name from
JWT claims. The considered claims are configured as an array in
cloud_api.jwt.tenant_provider_fields in composer's config file. The channel
name for all jobs belonging to this compose is created by `"org-" + tenant`.

Why is the channel prefixed by "org-"? To give us options in the future. I can
imagine the request having a channel override. This basically means that
multiple tenants can share a channel. A real use-case for this is multiple
Fedora projects sharing one pool of workers.

Why this commit adds a whole new cloud_api section to the config? Because the
current config is a mess and we should stop adding new stuff into the koji
section. As the Koji API is basically deprecated, we will need to remove it
soon nevertheless.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-08 12:07:00 +01:00
..
cloud-cleaner ci/tests: scheduled cloud-cleaner for Azure 2021-08-19 09:04:28 +02:00
osbuild-auth-tests osbuild-auth-tests: add a build constraint also to certificates.go 2021-12-18 11:56:17 +00:00
osbuild-composer api/{cloud,worker}: used channel name based on JWT claims for new jobs 2022-03-08 12:07:00 +01:00
osbuild-composer-cli-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-composer-dbjobqueue-tests jobqueue: introduce the concept of channels 2022-03-08 12:07:00 +01:00
osbuild-composer-manifest-tests Test all manifests with depsolved package sets 2021-11-19 19:50:25 +01:00
osbuild-dnf-json-tests .gitlabci.yml: Add fedora-35 testing 2022-02-03 14:51:07 +01:00
osbuild-image-tests osbuild-image-tests: skip Openstack boot testing on aarch64 2021-11-18 16:24:36 +01:00
osbuild-koji koji: add HTTP retries for uploads & init/finalize 2022-03-06 11:04:37 +01:00
osbuild-koji-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-mock-openid-provider osbuild-mock-openid-provider: use offline token as org id 2022-03-08 12:07:00 +01:00
osbuild-pipeline distro: remove OSTreeImageOptions type and use ostree.RequestParams 2022-02-23 11:08:24 +01:00
osbuild-service-maintenance cmd/osbuild-service-maintenance: Log aws error 2022-03-02 12:36:09 +01:00
osbuild-store-dump distro/fedora: implementation cleanups for newer releases 2022-02-03 14:51:07 +01:00
osbuild-upload-aws osbuild-service-maintenance: Clean up expired images 2021-12-03 00:14:09 +00:00
osbuild-upload-azure cmd/upload-azure: set storage account 2021-03-06 15:40:48 +00:00
osbuild-upload-gcp internal/worker: Use logrus for logging 2021-12-16 11:58:41 +00:00
osbuild-upload-oci Add support for OCI upload provider 2022-01-28 15:16:47 +01:00
osbuild-worker worker/osbuild-koji: fix double-reporting of osbuild-koji job status 2022-02-22 19:27:17 +00:00