debian-forge-composer/internal
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
..
auth api/{cloud,worker}: used channel name based on JWT claims for new jobs 2022-03-08 12:07:00 +01:00
blueprint distro/rhel86: add fido dracut module and enable customizing onboarding 2022-02-24 17:07:34 +01:00
boot tests: update IDs in Openstack image boot test 2022-02-14 12:13:18 +02:00
client client: Add Cancel function and tests 2022-02-18 09:31:07 +01:00
cloud internal/cloud: Allow aws creds from defaults 2022-02-21 15:43:53 +01:00
cloudapi api/{cloud,worker}: used channel name based on JWT claims for new jobs 2022-03-08 12:07:00 +01:00
common internal/common: introduce function to convert data sizes 2021-11-02 18:32:47 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk ditro/rhel86: set volid like in rhel9.0 2022-02-28 23:05:45 +00:00
distro distro/rhel86: set GPGKeyFiles for azure-rhui 2022-03-05 21:04:24 +01:00
distroregistry distroregistry: enable CS9 2022-02-18 10:39:08 +00:00
jobqueue jobqueuetest: add a test for multiple channels 2022-03-08 12:07:00 +01:00
jsondb gosec: G306-WriteFile permissions higher than 0600 2021-12-13 12:17:30 +02:00
kojiapi jobqueue: introduce the concept of channels 2022-03-08 12:07:00 +01:00
mocks worker: NewServer: move config parameters to a new Config struct 2022-03-08 12:07:00 +01:00
osbuild1 osbuild2: add X11Keymap option to KeymapStageOptions 2022-02-27 22:03:36 +01:00
osbuild2 osbuild2: expose new gpgkeys.fromtree osbuild option 2022-03-05 21:04:24 +01:00
ostree ostree: rename errors and introduce ParameterComboError 2022-02-23 11:08:24 +01:00
prometheus metrics: change job metrics namespace 2022-02-08 15:57:12 +01:00
reporegistry reporegistry: Add a DistroHasRepos helper function 2021-07-12 08:58:42 +02:00
rhsm internal/rhsm: implement fallback to the previous mechanism 2021-08-09 12:40:23 +02:00
rpmmd Move OSBuildMetadataToRPMs and PackageMetadataToSignature to osbuild2 2022-02-18 09:26:35 +01:00
store store: Filter out blank blueprint name 2022-02-15 10:10:21 +01:00
target Add support for OCI upload provider 2022-01-28 15:16:47 +01:00
test gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
upload koji: add HTTP retries for uploads & init/finalize 2022-03-06 11:04:37 +01:00
weldr jobqueue: introduce the concept of channels 2022-03-08 12:07:00 +01:00
worker api/{cloud,worker}: used channel name based on JWT claims for new jobs 2022-03-08 12:07:00 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00