Repository: osbuild/osbuild-composer
Pull request #1438 (2021-06-01 15:06:18)

distro: add fedora 34 and 35 aliases to f33
This PR is an alternative to https://github.com/osbuild/osbuild-composer/pull/1426, specifically a result of this discussion: https://github.com/osbuild/osbuild-composer/pull/1426#issuecomment-852196746


This pull request includes:

- [ ] adequate testing for the new functionality or fixed issue
- [ ] adequate documentation informing people about the change such as
  - [ ] create a file in [news/unreleased](https://github.com/osbuild/osbuild-composer/tree/main/docs/news/unreleased) directory if this change should be mentioned in the release news
  - [ ] submit a PR for the [guides](https://github.com/osbuild/guides) repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

<!--
Thanks for proposing a change to osbuild-composer!

Please don't remove the above check list. These are things that each pull
request must have before it is merged. It helps maintainers to not forget
anything.

If the reason for ticking any of the boxes is ambiguous, please add a short
note explaining why.

For user-visible changes, "adequate documentation" is an entry describing the
change for users in docs/news. Please refer to docs/news/README.md for details.

In addition, if this pull request fixes a downstream issue, please refer to
test/README.md and add these additional items:

- [ ] 1st commit of any `rhbz#` related PR contains bug reproducer; CI reports FAIL or
- [ ] PR contains automated tests for new functionality and
- [ ] QE has approved reproducer/new tests and
- [ ] Subsequent commits provide bug fixes without modifying the reproducer; CI reports PASS and
- [ ] QE approves this PR; RHBZ status is set to `MODIFIED + Verified=Tested`
-->


ondrejbudai: oh, the unit tests are failing, we need to fix it before merging.
msehnout: > oh, the unit tests are failing, we need to fix it before merging.

![](https://media.giphy.com/media/14aUO0Mf7dWDXW/giphy.gif) 

Go structure initialization strikes again. It should be fixed now, but Github didn't propagate the changes from my fork to this PR. Let's wait a bit longer.
ondrejbudai: okay, the RPMs are currently unbuildable. This will fix itself when this update gets pushed to stable (should happen tomorrow): https://bodhi.fedoraproject.org/updates/FEDORA-2021-53ed7029f2
thozza: Great Work @msehnout.

Yesterday I suggested on Slack to add similar alias for RHEL-8.5 in 8.4 definitions until we port all supported images to 8.5. @teg agreed. Do you think you could add it as part of this PR? If it is too much hassle, it can be a different PR as well. 

Patch:
diff --git a/README.md b/README.md
index 03da623cf..7eca40b68 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ instance, includes a
 
  * **Website**: <https://www.osbuild.org>
  * **Bug Tracker**: <https://github.com/osbuild/osbuild-composer/issues>
+ * **IRC**: #osbuild on [Libera.Chat](https://libera.chat/)
 
 ### About
 
diff --git a/cmd/osbuild-composer/composer.go b/cmd/osbuild-composer/composer.go
index f4f6066ff..eafc7c5a5 100644
--- a/cmd/osbuild-composer/composer.go
+++ b/cmd/osbuild-composer/composer.go
@@ -111,17 +111,21 @@ func (c *Composer) InitAPI(cert, key string, l net.Listener) error {
 	c.api = cloudapi.NewServer(c.workers, c.rpm, c.distros)
 	c.koji = kojiapi.NewServer(c.logger, c.workers, c.rpm, c.distros)
 
-	tlsConfig, err := createTLSConfig(&connectionConfig{
-		CACertFile:     c.config.Koji.CA,
-		ServerKeyFile:  key,
-		ServerCertFile: cert,
-		AllowedDomains: c.config.Koji.AllowedDomains,
-	})
-	if err != nil {
-		return fmt.Errorf("Error creating TLS configuration: %v", err)
-	}
+	if len(c.config.ComposerAPI.IdentityFilter) > 0 {
+		c.apiListener = l
+	} else {
+		tlsConfig, err := createTLSConfig(&connectionConfig{
+			CACertFile:     c.config.Koji.CA,
+			ServerKeyFile:  key,
+			ServerCertFile: cert,
+			AllowedDomains: c.config.Koji.AllowedDomains,
+		})
+		if err != nil {
+			return fmt.Errorf("Error creating TLS configuration: %v", err)
+		}
 
-	c.apiListener = tls.NewListener(l, tlsConfig)
+		c.apiListener = tls.NewListener(l, tlsConfig)
+	}
 
 	return nil
 }
@@ -195,7 +199,7 @@ func (c *Composer) Start() error {
 			// Add a "/" here, because http.ServeMux expects the
 			// trailing slash for rooted subtrees, whereas the
 			// handler functions don't.
-			mux.Handle(apiRoute+"/", c.api.Handler(apiRoute))
+			mux.Handle(apiRoute+"/", c.api.Handler(apiRoute, c.config.ComposerAPI.IdentityFilter))
 			mux.Handle(kojiRoute+"/", c.koji.Handler(kojiRoute))
 
 			s := &http.Server{
diff --git a/cmd/osbuild-composer/config.go b/cmd/osbuild-composer/config.go
index 3cd6d4e7d..f77af1384 100644
--- a/cmd/osbuild-composer/config.go
+++ b/cmd/osbuild-composer/config.go
@@ -15,6 +15,9 @@ type ComposerConfigFile struct {
 		AllowedDomains []string `toml:"allowed_domains"`
 		CA             string   `toml:"ca"`
 	} `toml:"worker"`
+	ComposerAPI struct {
+		IdentityFilter []string `toml:"identity_filter"`
+	} `toml:"composer_api"`
 }
 
 func LoadConfig(name string) (*ComposerConfigFile, error) {
diff --git a/distribution/osbuild-composer-clouddot-template.yml b/distribution/osbuild-composer-clouddot-template.yml
index b16f3b416..a2e61d5ba 100644
--- a/distribution/osbuild-composer-clouddot-template.yml
+++ b/distribution/osbuild-composer-clouddot-template.yml
@@ -53,7 +53,8 @@ objects:
           secret:
             secretName: composer-config
         - name: state-directory
-          emptyDir: {}
+          persistentVolumeClaim:
+            claimName: osbuild-composer-state-dir
 
 - apiVersion: v1
   kind: Service
@@ -85,6 +86,17 @@ objects:
     selector:
       name: osbuild-composer
 
+- apiVersion: v1
+  kind: PersistentVolumeClaim
+  metadata:
+    name: osbuild-composer-state-dir
+  spec:
+    accessModes:
+    - ReadWriteOnce
+    resources:
+      requests:
+        storage: ${STATE_VOLUME_CAPACITY}
+
 parameters:
   - description: osbuild-composer image name
     name: IMAGE_NAME
@@ -96,3 +108,6 @@ parameters:
   - description: api listener port
     name: API_LISTENER_PORT
     value: "8080"
+  - description: Size of composer state directory
+    name: STATE_VOLUME_CAPACITY
+    value: 2Gi
diff --git a/internal/cloudapi/server.go b/internal/cloudapi/server.go
index 840d47b65..0850c1347 100644
--- a/internal/cloudapi/server.go
+++ b/internal/cloudapi/server.go
@@ -3,12 +3,15 @@
 package cloudapi
 
 import (
+	"context"
 	"crypto/rand"
+	"encoding/base64"
 	"encoding/json"
 	"fmt"
 	"math"
 	"math/big"
 	"net/http"
+	"strings"
 
 	"github.com/go-chi/chi"
 	"github.com/google/uuid"
@@ -23,9 +26,22 @@ import (
 
 // Server represents the state of the cloud Server
 type Server struct {
-	workers     *worker.Server
-	rpmMetadata rpmmd.RPMMD
-	distros     *distroregistry.Registry
+	workers        *worker.Server
+	rpmMetadata    rpmmd.RPMMD
+	distros        *distroregistry.Registry
+	identityFilter []string
+}
+
+type contextKey int
+
+const (
+	identityHeaderKey contextKey = iota
+)
+
+type IdentityHeader struct {
+	Identity struct {
+		AccountNumber string `json:"account_number"`
+	} `json:"identity"`
 }
 
 // NewServer creates a new cloud server
@@ -40,9 +56,13 @@ func NewServer(workers *worker.Server, rpmMetadata rpmmd.RPMMD, distros *distror
 
 // Create an http.Handler() for this server, that provides the composer API at
 // the given path.
-func (server *Server) Handler(path string) http.Handler {
+func (server *Server) Handler(path string, identityFilter []string) http.Handler {
 	r := chi.NewRouter()
 
+	if len(identityFilter) > 0 {
+		server.identityFilter = identityFilter
+		r.Use(server.VerifyIdentityHeader)
+	}
 	r.Route(path, func(r chi.Router) {
 		HandlerFromMux(server, r)
 	})
@@ -50,6 +70,37 @@ func (server *Server) Handler(path string) http.Handler {
 	return r
 }
 
+func (server *Server) VerifyIdentityHeader(next http.Handler) http.Handler {
+	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+		idHeaderB64 := r.Header["X-Rh-Identity"]
+		if len(idHeaderB64) != 1 {
+			http.Error(w, "Auth header is not present", http.StatusNotFound)
+			return
+		}
+
+		b64Result, err := base64.StdEncoding.DecodeString(idHeaderB64[0])
+		if err != nil {
+			http.Error(w, "Auth header has incorrect format", http.StatusNotFound)
+			return
+		}
+
+		var idHeader IdentityHeader
+		err = json.Unmarshal([]byte(strings.TrimSuffix(fmt.Sprintf("%s", b64Result), "\n")), &idHeader)
+		if err != nil {
+			http.Error(w, "Auth header has incorrect format", http.StatusNotFound)
+			return
+		}
+
+		for _, i := range server.identityFilter {
+			if idHeader.Identity.AccountNumber == i {
+				next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), identityHeaderKey, idHeader)))
+				return
+			}
+		}
+		http.Error(w, "Account not allowed", http.StatusNotFound)
+	})
+}
+
 // Compose handles a new /compose POST request
 func (server *Server) Compose(w http.ResponseWriter, r *http.Request) {
 	contentType := r.Header["Content-Type"]
diff --git a/internal/distro/distro.go b/internal/distro/distro.go
index b1125aae2..bca2fa042 100644
--- a/internal/distro/distro.go
+++ b/internal/distro/distro.go
@@ -23,6 +23,9 @@ type Distro interface {
 	// for modularity support.
 	ModulePlatformID() string
 
+	// Returns the ostree reference template
+	OSTreeRef() string
+
 	// Returns a sorted list of the names of the architectures this distro
 	// supports.
 	ListArches() []string
diff --git a/internal/distro/fedora32/distro.go b/internal/distro/fedora32/distro.go
index 0c946f8d1..4a3ea9d48 100644
--- a/internal/distro/fedora32/distro.go
+++ b/internal/distro/fedora32/distro.go
@@ -21,9 +21,11 @@ const modulePlatformID = "platform:f32"
 const ostreeRef = "fedora/32/%s/iot"
 
 type distribution struct {
-	name          string
-	arches        map[string]architecture
-	buildPackages []string
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]architecture
+	buildPackages    []string
 }
 
 type architecture struct {
@@ -251,7 +253,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func sources(packages []rpmmd.PackageSpec) *osbuild.Sources {
@@ -574,14 +580,14 @@ func ostreeCommitAssembler(options distro.ImageOptions, arch distro.Arch) *osbui
 
 // New creates a new distro object, defining the supported architectures and image types
 func New() distro.Distro {
-	return newDistro(defaultName)
+	return newDistro(defaultName, modulePlatformID, ostreeRef)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef)
 }
 
-func newDistro(name string) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
 	const GigaByte = 1024 * 1024 * 1024
 
 	iotImgType := imageType{
@@ -808,7 +814,9 @@ func newDistro(name string) distro.Distro {
 			"tar",
 			"xz",
 		},
-		name: name,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 	x8664 := architecture{
 		distro: &r,
diff --git a/internal/distro/fedora33/distro.go b/internal/distro/fedora33/distro.go
index 77a18f3f8..8f3e23499 100644
--- a/internal/distro/fedora33/distro.go
+++ b/internal/distro/fedora33/distro.go
@@ -20,10 +20,20 @@ const defaultName = "fedora-33"
 const modulePlatformID = "platform:f33"
 const ostreeRef = "fedora/33/%s/iot"
 
+const f34Name = "fedora-34"
+const f34modulePlatformID = "platform:f34"
+const f34ostreeRef = "fedora/34/%s/iot"
+
+const f35Name = "fedora-35"
+const f35modulePlatformID = "platform:f35"
+const f35ostreeRef = "fedora/35/%s/iot"
+
 type distribution struct {
-	name          string
-	arches        map[string]architecture
-	buildPackages []string
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]architecture
+	buildPackages    []string
 }
 
 type architecture struct {
@@ -251,7 +261,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func sources(packages []rpmmd.PackageSpec) *osbuild.Sources {
@@ -586,14 +600,22 @@ func ostreeCommitAssembler(options distro.ImageOptions, arch distro.Arch) *osbui
 
 // New creates a new distro object, defining the supported architectures and image types
 func New() distro.Distro {
-	return newDistro(defaultName)
+	return newDistro(defaultName, modulePlatformID, ostreeRef)
+}
+
+func NewF34() distro.Distro {
+	return newDistro(f34Name, f34modulePlatformID, f34ostreeRef)
+}
+
+func NewF35() distro.Distro {
+	return newDistro(f35Name, f35modulePlatformID, f35ostreeRef)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef)
 }
 
-func newDistro(name string) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
 	const GigaByte = 1024 * 1024 * 1024
 
 	iotImgType := imageType{
@@ -843,7 +865,9 @@ func newDistro(name string) distro.Distro {
 			"tar",
 			"xz",
 		},
-		name: name,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 	x8664 := architecture{
 		distro: &r,
diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go
index 2fe10d439..0dc1f0584 100644
--- a/internal/distro/rhel8/distro.go
+++ b/internal/distro/rhel8/distro.go
@@ -21,9 +21,11 @@ const modulePlatformID = "platform:el8"
 const ostreeRef = "rhel/8/%s/edge"
 
 type distribution struct {
-	name          string
-	arches        map[string]architecture
-	buildPackages []string
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]architecture
+	buildPackages    []string
 }
 
 type architecture struct {
@@ -253,7 +255,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func sources(packages []rpmmd.PackageSpec) *osbuild.Sources {
@@ -673,14 +679,14 @@ func ostreeCommitAssembler(options distro.ImageOptions, arch distro.Arch) *osbui
 
 // New creates a new distro object, defining the supported architectures and image types
 func New() distro.Distro {
-	return newDistro(defaultName)
+	return newDistro(defaultName, modulePlatformID, ostreeRef)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef)
 }
 
-func newDistro(name string) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
 	const GigaByte = 1024 * 1024 * 1024
 
 	edgeImgTypeX86_64 := imageType{
@@ -1073,7 +1079,9 @@ func newDistro(name string) distro.Distro {
 			"xfsprogs",
 			"xz",
 		},
-		name: name,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 	x8664 := architecture{
 		distro: &r,
diff --git a/internal/distro/rhel84/distro.go b/internal/distro/rhel84/distro.go
index 21493ae98..d6fa228d7 100644
--- a/internal/distro/rhel84/distro.go
+++ b/internal/distro/rhel84/distro.go
@@ -25,10 +25,12 @@ const modulePlatformID = "platform:el8"
 const ostreeRef = "rhel/8/%s/edge"
 
 type distribution struct {
-	name          string
-	arches        map[string]architecture
-	buildPackages []string
-	isCentos      bool
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]architecture
+	buildPackages    []string
+	isCentos         bool
 }
 
 type architecture struct {
@@ -282,7 +284,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func sources(packages []rpmmd.PackageSpec) *osbuild.Sources {
@@ -820,22 +826,22 @@ func removePackage(packages []string, packageToRemove string) []string {
 
 // New creates a new distro object, defining the supported architectures and image types
 func New() distro.Distro {
-	return newDistro(defaultName, false)
+	return newDistro(defaultName, modulePlatformID, ostreeRef, false)
 }
 
 func NewCentos() distro.Distro {
-	return newDistro(defaultCentosName, true)
+	return newDistro(defaultCentosName, modulePlatformID, ostreeRef, true)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name, false)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef, false)
 }
 
-func NewCentosHostDistro(name string) distro.Distro {
-	return newDistro(name, true)
+func NewCentosHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef, true)
 }
 
-func newDistro(name string, isCentos bool) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string, isCentos bool) distro.Distro {
 	const GigaByte = 1024 * 1024 * 1024
 
 	edgeImgTypeX86_64 := imageType{
@@ -1242,8 +1248,10 @@ func newDistro(name string, isCentos bool) distro.Distro {
 			"xfsprogs",
 			"xz",
 		},
-		isCentos: isCentos,
-		name:     name,
+		isCentos:         isCentos,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 	x8664 := architecture{
 		distro: &r,
diff --git a/internal/distro/rhel85/distro.go b/internal/distro/rhel85/distro.go
index c398663fb..dce417333 100644
--- a/internal/distro/rhel85/distro.go
+++ b/internal/distro/rhel85/distro.go
@@ -20,8 +20,10 @@ const modulePlatformID = "platform:el8"
 const ostreeRef = "rhel/8/%s/edge"
 
 type distribution struct {
-	name   string
-	arches map[string]distro.Arch
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]distro.Arch
 }
 
 func (d *distribution) Name() string {
@@ -29,7 +31,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func (d *distribution) ListArches() []string {
@@ -278,16 +284,18 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
 
 // New creates a new distro object, defining the supported architectures and image types
 func New() distro.Distro {
-	return newDistro(defaultName)
+	return newDistro(defaultName, modulePlatformID, ostreeRef)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef)
 }
 
-func newDistro(name string) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
 	rd := &distribution{
-		name: name,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 
 	x86_64 := architecture{
diff --git a/internal/distro/rhel90/distro.go b/internal/distro/rhel90/distro.go
index 9725bd66c..7ee4e7359 100644
--- a/internal/distro/rhel90/distro.go
+++ b/internal/distro/rhel90/distro.go
@@ -21,11 +21,14 @@ import (
 
 const defaultName = "rhel-90"
 const modulePlatformID = "platform:el9"
+const ostreeRef = "rhel/9/%s/edge"
 
 type distribution struct {
-	name          string
-	arches        map[string]architecture
-	buildPackages []string
+	name             string
+	modulePlatformID string
+	ostreeRef        string
+	arches           map[string]architecture
+	buildPackages    []string
 }
 
 type architecture struct {
@@ -257,7 +260,11 @@ func (d *distribution) Name() string {
 }
 
 func (d *distribution) ModulePlatformID() string {
-	return modulePlatformID
+	return d.modulePlatformID
+}
+
+func (d *distribution) OSTreeRef() string {
+	return d.ostreeRef
 }
 
 func sources(packages []rpmmd.PackageSpec) *osbuild.Sources {
@@ -743,14 +750,14 @@ func newRandomUUIDFromReader(r io.Reader) (uuid.UUID, error) {
 }
 
 func New() distro.Distro {
-	return newDistro(defaultName)
+	return newDistro(defaultName, modulePlatformID, ostreeRef)
 }
 
-func NewHostDistro(name string) distro.Distro {
-	return newDistro(name)
+func NewHostDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
+	return newDistro(name, modulePlatformID, ostreeRef)
 }
 
-func newDistro(name string) distro.Distro {
+func newDistro(name, modulePlatformID, ostreeRef string) distro.Distro {
 	const GigaByte = 1024 * 1024 * 1024
 
 	qcow2ImageType := imageType{
@@ -854,7 +861,9 @@ func newDistro(name string) distro.Distro {
 			"xfsprogs",
 			"xz",
 		},
-		name: name,
+		name:             name,
+		modulePlatformID: modulePlatformID,
+		ostreeRef:        ostreeRef,
 	}
 	x8664 := architecture{
 		distro: &r,
diff --git a/internal/distroregistry/distroregistry.go b/internal/distroregistry/distroregistry.go
index ccb80bf46..344660d6d 100644
--- a/internal/distroregistry/distroregistry.go
+++ b/internal/distroregistry/distroregistry.go
@@ -19,6 +19,8 @@ import (
 var supportedDistros = []supportedDistro{
 	{fedora32.New, fedora32.NewHostDistro},
 	{fedora33.New, fedora33.NewHostDistro},
+	{fedora33.NewF34, fedora33.NewHostDistro},
+	{fedora33.NewF35, fedora33.NewHostDistro},
 	{rhel8.New, rhel8.NewHostDistro},
 	{rhel84.New, rhel84.NewHostDistro},
 	{rhel84.NewCentos, rhel84.NewCentosHostDistro},
@@ -28,7 +30,7 @@ var supportedDistros = []supportedDistro{
 
 type supportedDistro struct {
 	defaultDistro func() distro.Distro
-	hostDistro    func(name string) distro.Distro
+	hostDistro    func(name, modulePlatformID, ostreeRef string) distro.Distro
 }
 
 type Registry struct {
@@ -70,6 +72,8 @@ func NewDefault() *Registry {
 		if distro.Name() == hostDistroName {
 			hostDistro = supportedDistro.hostDistro(
 				mangleHostDistroName(distro.Name(), hostDistroIsBeta, hostDistroIsStream),
+				distro.ModulePlatformID(),
+				distro.OSTreeRef(),
 			)
 		}
 
diff --git a/repositories/fedora-34.json b/repositories/fedora-34.json
new file mode 100644
index 000000000..0f275f5ad
--- /dev/null
+++ b/repositories/fedora-34.json
@@ -0,0 +1,58 @@
+{
+    "x86_64": [
+        {
+            "name": "fedora",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-34&arch=x86_64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2Cl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ac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f34&arch=x86_64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2ClbwoXCmXFSm72cCCt1SzcAmlaWh8E\nrXSUZfs7XqkBrbphXHZ1e6Vxjt/RyKC5doklfOhbuF8gJ31CPo/kuOjFrHGzOwgi\nLlec+GHGMfI/cUOu59qo3W85GHsntvEMk83QLkKjBInEYjZSAajp/lS4QF+SD4pl\nQj6Vc1mMCmci61cXX5CcIl1YxNJZzUfZEZNbUjDajqGzkYJoG9n2yJB0w4OiqsAe\nZCirmUIeDUNeI082epc4RFuV33hByGYY9kRWSyM+aCF6PYVISj4l1o9KcQARAQAB\ntDFGZWRvcmEgKDM0KSA8ZmVkb3JhLTM0LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQJOBBMBCAA4FiEEjFummQvbJuGfKhqAEWGuaUVxmjkFAl8sAZICGw8FCwkI\nBwIGFQoJCAsCBBYCAwECHgECF4AACgkQEWGuaUVxmjlVuA//QnMA02tydqwpM7r4\nWZ4OvlVqFWHhn3oDaBSwBvn6R1oC0MWbr79nnFDn3tpSkZDUdb7wyArmaF8kG8tI\nwit5xD/JAzqRBVa9z2hY3n1SFafU/hp3DwbGIL4vLUv3fRayCgWsGhGp0tZvDC9q\nPSvQZ675XpRG4pt/TGJB5gGXw7Jxoae/ffaJeblLLRDlSV/bKJt9sYpdu5InDG2i\nyIUHfamtYQtnENKL/bN6w7tU/IEgCHqxPmPRiJ0gTUAi5Yabp1+JHqskE85Hm2QF\nxMonX595Ry1yZzCjPGhCPAknJ4BhisXV+E/iV3Jyh8vxbJCo1//ygd1Xz8SkCuu/\nI0xPtFcVSIP2ikYpJwR2nwwQlLbQYIGCw/S1LV725oEYm/Z1xQ5zha2hBB+fxSwz\n7MHsD2XIHrP8NNwt3ywG3NV/BSSkvSSStGUNcQyGRi3O/x/BEIRtWRxgoNO9o3jE\nxtWFq3G5+gKY+wfYz/cTGlsWPDG7Fzx4lNisIGATKtLNqdedl7LASPK93z0XDdnS\nkfKF0HrT9rdzIKRu4xWatUVIq/65Gv7nsavdsRAQL/Y0jl6sjjQac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "fedora-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=x86_64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6Ypzqfm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1+JHqskE85Hm2QF\nxMonX595Ry1yZzCjPGhCPAknJ4BhisXV+E/iV3Jyh8vxbJCo1//ygd1Xz8SkCuu/\nI0xPtFcVSIP2ikYpJwR2nwwQlLbQYIGCw/S1LV725oEYm/Z1xQ5zha2hBB+fxSwz\n7MHsD2XIHrP8NNwt3ywG3NV/BSSkvSSStGUNcQyGRi3O/x/BEIRtWRxgoNO9o3jE\nxtWFq3G5+gKY+wfYz/cTGlsWPDG7Fzx4lNisIGATKtLNqdedl7LASPK93z0XDdnS\nkfKF0HrT9rdzIKRu4xWatUVIq/65Gv7nsavdsRAQL/Y0jl6sjjQac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f34&arch=x86_64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2ClbwoXCmXFSm72cCCt1Sz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W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        }
+    ],
+    "aarch64": [
+        {
+            "name": "fedora",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-34&arch=aarch64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2ClbwoXCmXFSm72cCCt1SzcAmlaWh8E\nrXSUZfs7XqkBrbphXHZ1e6Vxjt/RyKC5doklfOhbuF8gJ31CPo/kuOjFrHGzOwgi\nLlec+GHGMfI/cUOu59qo3W85GHsntvEMk83QLkKjBInEYjZSAajp/lS4QF+SD4pl\nQj6Vc1mMCmci61cXX5CcIl1YxNJZzUfZEZNbUjDajqGzkYJoG9n2yJB0w4OiqsAe\nZCirmUIeDUNeI082epc4RFuV33hByGYY9kRWSyM+aCF6PYVISj4l1o9KcQARAQAB\ntDFGZWRvcmEgKDM0KSA8ZmVkb3JhLTM0LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQJOBBMBCAA4FiEEjFummQvbJuGfKhqAEWGuaUVxmjkFAl8sAZICGw8FCwkI\nBwIGFQoJCAsCBBYCAwECHgECF4AACgkQEWGuaUVxmjlVuA//QnMA02tydqwpM7r4\nWZ4OvlVqFWHhn3oDaBSwBvn6R1oC0MWbr79nnFDn3tpSkZDUdb7wyArmaF8kG8tI\nwit5xD/JAzqRBVa9z2hY3n1SFafU/hp3DwbGIL4vLUv3fRayCgWsGhGp0tZvDC9q\nPSvQZ675XpRG4pt/TGJB5gGXw7Jxoae/ffaJeblLLRDlSV/bKJt9sYpdu5InDG2i\nyIUHfamtYQtnENKL/bN6w7tU/IEgCHqxPmPRiJ0gTUAi5Yabp1+JHqskE85Hm2QF\nxMonX595Ry1yZzCjPGhCPAknJ4BhisXV+E/iV3Jyh8vxbJCo1//ygd1Xz8SkCuu/\nI0xPtFcVSIP2ikYpJwR2nwwQlLbQYIGCw/S1LV725oEYm/Z1xQ5zha2hBB+fxSwz\n7MHsD2XIHrP8NNwt3ywG3NV/BSSkvSSStGUNcQyGRi3O/x/BEIRtWRxgoNO9o3jE\nxtWFq3G5+gKY+wfYz/cTGlsWPDG7Fzx4lNisIGATKtLNqdedl7LASPK93z0XDdnS\nkfKF0HrT9rdzIKRu4xWatUVIq/65Gv7nsavdsRAQL/Y0jl6sjjQac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f34&arch=aarch64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH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hm2QF\nxMonX595Ry1yZzCjPGhCPAknJ4BhisXV+E/iV3Jyh8vxbJCo1//ygd1Xz8SkCuu/\nI0xPtFcVSIP2ikYpJwR2nwwQlLbQYIGCw/S1LV725oEYm/Z1xQ5zha2hBB+fxSwz\n7MHsD2XIHrP8NNwt3ywG3NV/BSSkvSSStGUNcQyGRi3O/x/BEIRtWRxgoNO9o3jE\nxtWFq3G5+gKY+wfYz/cTGlsWPDG7Fzx4lNisIGATKtLNqdedl7LASPK93z0XDdnS\nkfKF0HrT9rdzIKRu4xWatUVIq/65Gv7nsavdsRAQL/Y0jl6sjjQac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "fedora-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-34&arch=aarch64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2ClbwoXCmXFSm72cCCt1SzcAmlaWh8E\nrXSUZfs7XqkBrb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jJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f34&arch=aarch64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBF8sAZIBEADKYvLg/5FdLXcVryAFd7Q8qrJq23R7ebxUT1u48Dc8xrsfYJZq\naMcna/xw47wZNyek4Z6YpzqfmnjR7H8yRH/1hAPi/ixYnA6DVL7O3eGE5lYGJzN3\nE2ILTzBOI9o/pavvtOqW9N5WIus8cqSdA921v8YPzr3/BTKgGqC9biOrMA+3sNoe\nU4T+dztLg20SyBTr/rBH0eui2p/ipvIRuJvHLTKTubR+yG804yupI69M6qFBDebT\nrm+CBmwVyj/DY/92LgvCgYqV/TL5FU4qvtyB6jd8JkEeaz/G7UmDRB5JqzKEu6TB\nN3SY7nwLiRpIaXet1TWVW/8UKSB2JvYt1LbZyEO82/QOIXxqvV6h3kuBI21RvURz\nVxEjRlvPRGHMZ80OoAQqNPkLnVTcX1eLj2ClbwoXCmXFSm72cCCt1SzcAmlaWh8E\nrXSUZfs7XqkBrbphXHZ1e6Vxjt/RyKC5doklfOhbuF8gJ31CPo/kuOjFrHGzOwgi\nLlec+GHGMfI/cUOu59qo3W85GHsntvEMk83QLkKjBInEYjZSAajp/lS4QF+SD4pl\nQj6Vc1mMCmci61cXX5CcIl1YxNJZzUfZEZNbUjDajqGzkYJoG9n2yJB0w4OiqsAe\nZCirmUIeDUNeI082epc4RFuV33hByGYY9kRWSyM+aCF6PYVISj4l1o9KcQARAQAB\ntDFGZWRvcmEgKDM0KSA8ZmVkb3JhLTM0LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQJOBBMBCAA4FiEEjFummQvbJuGfKhqAEWGuaUVxmjkFAl8sAZICGw8FCwkI\nBwIGFQoJCAsCBBYCAwECHgECF4AACgkQEWGuaUVxmjlVuA//QnMA02tydqwpM7r4\nWZ4OvlVqFWHhn3oDaBSwBvn6R1oC0MWbr79nnFDn3tpSkZDUdb7wyArmaF8kG8tI\nwit5xD/JAzqRBVa9z2hY3n1SFafU/hp3DwbGIL4vLUv3fRayCgWsGhGp0tZvDC9q\nPSvQZ675XpRG4pt/TGJB5gGXw7Jxoae/ffaJeblLLRDlSV/bKJt9sYpdu5InDG2i\nyIUHfamtYQtnENKL/bN6w7tU/IEgCHqxPmPRiJ0gTUAi5Yabp1+JHqskE85Hm2QF\nxMonX595Ry1yZzCjPGhCPAknJ4BhisXV+E/iV3Jyh8vxbJCo1//ygd1Xz8SkCuu/\nI0xPtFcVSIP2ikYpJwR2nwwQlLbQYIGCw/S1LV725oEYm/Z1xQ5zha2hBB+fxSwz\n7MHsD2XIHrP8NNwt3ywG3NV/BSSkvSSStGUNcQyGRi3O/x/BEIRtWRxgoNO9o3jE\nxtWFq3G5+gKY+wfYz/cTGlsWPDG7Fzx4lNisIGATKtLNqdedl7LASPK93z0XDdnS\nkfKF0HrT9rdzIKRu4xWatUVIq/65Gv7nsavdsRAQL/Y0jl6sjjQac/Te5J0fByHY\n6tGG1W0UWTd0rzFWitEZI/64/Bs83rGhjJNLqWXItZ5VqLe0TWzuxvRFLfM7oX8r\nn5Si4l7NpIJubWPqjPoCoP5lsS8=\n=V2FG\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        }
+    ]
+}
diff --git a/repositories/fedora-35.json b/repositories/fedora-35.json
new file mode 100644
index 000000000..e4f2cbe6f
--- /dev/null
+++ b/repositories/fedora-35.json
@@ -0,0 +1,58 @@
+{
+    "x86_64": [
+        {
+            "name": "fedora",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBE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LVt+TEa14isYSGCjzo7PY8V3JOk50\ngqWg82N/bm2EzS7T83WEDb1lvj4IlvxgIqKeg11zXYxmrYSZJJCfvzf+lNS6uxgH\njx/J0ylZ2LibGr6GAAyO9UWrAZSwSM0EcjT8wECnxkSDuyqmWwVvNBXuEIV8Oe3Y\nMiU1fJN8sd7DpsFx5M+XdnMnQS+HrjTPKD3mWrlAdnEThdYV8jZkpWhDys3/99eO\nhk0rLny0jNwkauf/iU8Oc6XvMkjLRMJg5U9VKyJuWWtzwXnjMN5WRFBqK4sZomMM\nftbTH1+5ybRW/A3vBbaxRW2t7UzNjczekSZEiaLN9L/HcJCIR1QF8682DdAlEF9d\nk2gQiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f35&arch=x86_64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgDU76jaT5pVD5mFMJ3pkeneR/cTmqqQkNyQshX2oQXwEzUSb1CNMCfCGgkX8Q2\nzZkrIcCrF0Q2wrKblaudhU+iVanADsm18YEqsb5AU37dtUrM3QYdWg9R+XiPfV8R\nKBjT03vVBOdMSsY39LaCn6Ip1Ovp8IEo/IeEVY1qmCOPAaK0bJH3ufg4Cueks+TS\nwQWTeCLxuZL6OMXoOPKwvMQfxbg1XD8vuZ0Ktj/cNH2xau0xmsAu9HJpekvOPRxl\nyqtjyZfroVieFypwZgvQwtnnM8/gSEu/JVTrY052mEUT7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QiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "fedora-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-35&arch=x86_64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgDU76jaT5pVD5mFMJ3pkeneR/cTmqqQkNyQshX2oQXwEzUSb1CNMCfCGgkX8Q2\nzZkrIcCrF0Q2wrKblaudhU+iVanADsm18YEqsb5AU37dtUrM3QYdWg9R+XiPfV8R\nKBjT03vVBOdMSsY39LaCn6Ip1Ovp8IEo/IeEVY1qmCOPAaK0bJH3ufg4Cueks+TS\nwQWTeCLxuZL6OMXoOPKwvMQfxbg1XD8vuZ0Ktj/cNH2xau0xmsAu9HJpekvOPRxl\nyqtjyZfroVieFypwZgvQwtnnM8/gSEu/JVTrY052mEUT7Ccb74kcHFTFfMklnkG/\n0fU4ARa504H3xj0ktbe3vKcPXoPOuKBVsHSv00UGYAyPeuy+87cU/YEhM7k3SVKj\n6eIZgyiMO0wl1YGDRKculwks9A+ulkg1oTb4s3zmZvP07GoTxW42jaK5WS+NhZee\n860XoVhbc1KpS+jfZojsrEtZ8PbUZ+YvF8RprdWArjHbJk2JpRKAxThxsQAsBhG1\n0Lux2WaMB0g2I5PcMdJ/cqjo08ccrjBXuixWri5iu9MXp8qT/fSzNmsdIgn8/qZK\ni8Qulfu77uqhW/wt2btnitgRsqjhxMujYU4Zb4hktF8hKU/XX742qhL5KwARAQAB\ntDFGZWRvcmEgKDM1KSA8ZmVkb3JhLTM1LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQJOBBMBCAA4FiEEeH6mrhFH7uVsQLMM20Y5cZhnxY8FAmAcScoCGw8FCwkI\nBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ20Y5cZhnxY+NYA/7BYpglySAZYHhjyKh\n/+f6zPfVvbH20Eq3kI7OFBN0nLX+BU1muvS+qTuS3WLrB3m3GultpKREJKLtm5ED\n1rGzXAoT1yp9YI8LADdMCCOyjAjsoWU87YUuC+/bnjrTeR2LROCfyPC76W985iOV\nm5S+bsQDw7C2LrldAM4MDuoyZ1SitGaZ4KQLVt+TEa14isYSGCjzo7PY8V3JOk50\ngqWg82N/bm2EzS7T83WEDb1lvj4IlvxgIqKeg11zXYxmrYSZJJCfvzf+lNS6uxgH\njx/J0ylZ2LibGr6GAAyO9UWrAZSwSM0EcjT8wECnxkSDuyqmWwVvNBXuEIV8Oe3Y\nMiU1fJN8sd7DpsFx5M+XdnMnQS+HrjTPKD3mWrlAdnEThdYV8jZkpWhDys3/99eO\nhk0rLny0jNwkauf/iU8Oc6XvMkjLRMJg5U9VKyJuWWtzwXnjMN5WRFBqK4sZomMM\nftbTH1+5ybRW/A3vBbaxRW2t7UzNjczekSZEiaLN9L/HcJCIR1QF8682DdAlEF9d\nk2gQiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f35&arch=x86_64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJal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k50\ngqWg82N/bm2EzS7T83WEDb1lvj4IlvxgIqKeg11zXYxmrYSZJJCfvzf+lNS6uxgH\njx/J0ylZ2LibGr6GAAyO9UWrAZSwSM0EcjT8wECnxkSDuyqmWwVvNBXuEIV8Oe3Y\nMiU1fJN8sd7DpsFx5M+XdnMnQS+HrjTPKD3mWrlAdnEThdYV8jZkpWhDys3/99eO\nhk0rLny0jNwkauf/iU8Oc6XvMkjLRMJg5U9VKyJuWWtzwXnjMN5WRFBqK4sZomMM\nftbTH1+5ybRW/A3vBbaxRW2t7UzNjczekSZEiaLN9L/HcJCIR1QF8682DdAlEF9d\nk2gQiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        }
+    ],
+    "aarch64": [
+        {
+            "name": "fedora",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=aarch64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgDU76jaT5pVD5mFMJ3pkeneR/cTmqqQkNyQshX2oQXwEzUSb1CNMCfCGgkX8Q2\nzZkrIcCrF0Q2wrKblaudhU+iVanADsm18YEqsb5AU37dtUrM3QYdWg9R+XiPfV8R\nKBjT03vVBOdMSsY39LaCn6Ip1Ovp8IEo/IeEVY1qmCOPAaK0bJH3ufg4Cueks+TS\nwQWTeCLxuZL6OMXoOPKwvMQfxbg1XD8vuZ0Ktj/cNH2xau0xmsAu9HJpekvOPRxl\nyqtjyZfroVieFypwZgvQwtnnM8/gSEu/JVTrY052mEUT7Ccb74kcHFTFfMklnkG/\n0fU4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2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f35&arch=aarch64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgDU76jaT5pVD5mFMJ3pkeneR/cTmqqQkNyQshX2oQXwEzUSb1CNMCfCGgkX8Q2\nzZkrIcCrF0Q2wrKblaudhU+iVanADsm18YEqsb5AU37dtUrM3QYdWg9R+XiPfV8R\nKBjT03vVBOdMSsY39LaCn6Ip1Ovp8IEo/IeEVY1qmCOPAaK0bJH3ufg4Cueks+TS\nwQWTeCLxuZL6OMXoOPKwvMQfxbg1XD8vuZ0Ktj/cNH2xau0xmsAu9HJpekvOPRxl\nyqtjyZfroVieFypwZgvQwtnnM8/gSEu/JVTrY052mEUT7Ccb74kcHFTFfMklnkG/\n0fU4ARa504H3xj0ktbe3vKcPXoPOuKBVsHSv00UGYAyPeuy+87cU/YEhM7k3SVKj\n6eIZgyiMO0wl1YGDRKculwks9A+ulkg1oTb4s3zmZvP07GoTxW42jaK5WS+NhZee\n860XoVhbc1KpS+jfZojsrEtZ8PbUZ+YvF8RprdWArjHbJk2JpRKAxThxsQAsBhG1\n0Lux2WaMB0g2I5PcMdJ/cqjo08ccrjBXuixWri5iu9MXp8qT/fSzNmsdIgn8/qZK\ni8Qulfu77uqhW/wt2btnitgRsqjhxMujYU4Zb4hktF8hKU/XX742qhL5KwARAQAB\ntDFGZWRvcmEgKDM1KSA8ZmVkb3JhLTM1LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v\ncmc+iQJOBBMBCAA4FiEEeH6mrhFH7uVsQLMM20Y5cZhnxY8FAmAcScoCGw8FCwkI\nBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ20Y5cZhnxY+NYA/7BYpglySAZYHhjyKh\n/+f6zPfVvbH20Eq3kI7OFBN0nLX+BU1muvS+qTuS3WLrB3m3GultpKREJKLtm5ED\n1rGzXAoT1yp9YI8LADdMCCOyjAjsoWU87YUuC+/bnjrTeR2LROCfyPC76W985iOV\nm5S+bsQDw7C2LrldAM4MDuoyZ1SitGaZ4KQLVt+TEa14isYSGCjzo7PY8V3JOk50\ngqWg82N/bm2EzS7T83WEDb1lvj4IlvxgIqKeg11zXYxmrYSZJJCfvzf+lNS6uxgH\njx/J0ylZ2LibGr6GAAyO9UWrAZSwSM0EcjT8wECnxkSDuyqmWwVvNBXuEIV8Oe3Y\nMiU1fJN8sd7DpsFx5M+XdnMnQS+HrjTPKD3mWrlAdnEThdYV8jZkpWhDys3/99eO\nhk0rLny0jNwkauf/iU8Oc6XvMkjLRMJg5U9VKyJuWWtzwXnjMN5WRFBqK4sZomMM\nftbTH1+5ybRW/A3vBbaxRW2t7UzNjczekSZEiaLN9L/HcJCIR1QF8682DdAlEF9d\nk2gQiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "fedora-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-35&arch=aarch64",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgD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vxgIqKeg11zXYxmrYSZJJCfvzf+lNS6uxgH\njx/J0ylZ2LibGr6GAAyO9UWrAZSwSM0EcjT8wECnxkSDuyqmWwVvNBXuEIV8Oe3Y\nMiU1fJN8sd7DpsFx5M+XdnMnQS+HrjTPKD3mWrlAdnEThdYV8jZkpWhDys3/99eO\nhk0rLny0jNwkauf/iU8Oc6XvMkjLRMJg5U9VKyJuWWtzwXnjMN5WRFBqK4sZomMM\nftbTH1+5ybRW/A3vBbaxRW2t7UzNjczekSZEiaLN9L/HcJCIR1QF8682DdAlEF9d\nk2gQiYSQAaaJ0JJAzHvRkRJLLgK2YQYiHNVy2t3JyFfsram5wSCWOfhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        },
+        {
+            "name": "updates-modular",
+            "metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f35&arch=aarch64",
+            "metadata_expire": "6h",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAcScoBEADLf8YHkezJ6adlMYw7aGGIlJalt8Jj2x/B2K+hIfIuxGtpVj7e\nLRgDU76jaT5pVD5mFMJ3pkeneR/cTmqqQkNyQshX2oQXwEzUSb1CNMCfCGgkX8Q2\nzZkrIcCrF0Q2wrKblaudhU+iVanADsm18YEqsb5AU37dtUrM3QYdWg9R+XiPfV8R\nKBjT03vVBOdMSsY39LaCn6Ip1Ovp8IEo/IeEVY1qmCOPAaK0bJH3ufg4Cueks+TS\nwQWTeCLxuZL6OMXoOPKwvMQfxbg1XD8vuZ0Ktj/cNH2xau0xmsAu9HJpekvOPRxl\nyqtjyZfroVieFypwZgvQwtnnM8/gSEu/JVTrY052mEUT7Ccb74kcHFTFfMklnkG/\n0fU4ARa504H3xj0ktbe3vKcPXoPOuKB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fhPeIyLBTZJ\nvrpNlPbefsT957Tf2BNIugzZrC5VxDSKkZgRh1VGvSIQnCyzkQy6EU2qPpiW59G/\nhPIXZrKocK3KLS9/izJQTRltjMA=\n=PfT7\n-----END PGP PUBLIC KEY BLOCK-----\n",
+            "check_gpg": true
+        }
+    ]
+}


Test patch:
diff --git a/internal/distro/test_distro/distro.go b/internal/distro/test_distro/distro.go
index 448c38d66..53cd690a1 100644
--- a/internal/distro/test_distro/distro.go
+++ b/internal/distro/test_distro/distro.go
@@ -14,6 +14,7 @@ import (
 type TestDistro struct {
 	name             string
 	modulePlatformID string
+	ostreeRef        string
 	arches           map[string]distro.Arch
 }
 
@@ -51,6 +52,10 @@ func (d *TestDistro) ModulePlatformID() string {
 	return d.modulePlatformID
 }
 
+func (d *TestDistro) OSTreeRef() string {
+	return d.ostreeRef
+}
+
 func (d *TestDistro) ListArches() []string {
 	archs := make([]string, 0, len(d.arches))
 	for name := range d.arches {
diff --git a/internal/distroregistry/distroregistry_test.go b/internal/distroregistry/distroregistry_test.go
index cadc6883b..f5fdee430 100644
--- a/internal/distroregistry/distroregistry_test.go
+++ b/internal/distroregistry/distroregistry_test.go
@@ -114,7 +114,7 @@ func TestRegistry_FromHost(t *testing.T) {
 
 	t.Run("host distro not nil", func(t *testing.T) {
 		mangledName := mangleHostDistroName("rhel-8", true, false)
-		hostDistro := rhel8.NewHostDistro(mangledName)
+		hostDistro := rhel8.NewHostDistro(mangledName, "", "")
 		registry, err := New(hostDistro, distros...)
 		require.Nil(t, err)
 		require.NotNil(t, registry)
diff --git a/test/cases/api.sh b/test/cases/api.sh
index 75492a2f9..5fb1004e9 100755
--- a/test/cases/api.sh
+++ b/test/cases/api.sh
@@ -658,4 +658,43 @@ case $CLOUD_PROVIDER in
     ;;
 esac
 
+
+
+# Verify the identityfilter
+cat <<EOF | sudo tee "/etc/osbuild-composer/osbuild-composer.toml"
+[koji]
+allowed_domains = [ "localhost", "client.osbuild.org" ]
+ca = "/etc/osbuild-composer/ca-crt.pem"
+
+[worker]
+allowed_domains = [ "localhost", "worker.osbuild.org" ]
+ca = "/etc/osbuild-composer/ca-crt.pem"
+
+[composer_api]
+identity_filter = ["000000"]
+EOF
+
+sudo systemctl restart osbuild-composer
+
+# account number 000000
+VALIDAUTHSTRING="eyJlbnRpdGxlbWVudHMiOnsiaW5zaWdodHMiOnsiaXNfZW50aXRsZWQiOnRydWV9LCJzbWFydF9tYW5hZ2VtZW50Ijp7ImlzX2VudGl0bGVkIjp0cnVlfSwib3BlbnNoaWZ0Ijp7ImlzX2VudGl0bGVkIjp0cnVlfSwiaHlicmlkIjp7ImlzX2VudGl0bGVkIjp0cnVlfSwibWlncmF0aW9ucyI6eyJpc19lbnRpdGxlZCI6dHJ1ZX0sImFuc2libGUiOnsiaXNfZW50aXRsZWQiOnRydWV9fSwiaWRlbnRpdHkiOnsiYWNjb3VudF9udW1iZXIiOiIwMDAwMDAiLCJ0eXBlIjoiVXNlciIsInVzZXIiOnsidXNlcm5hbWUiOiJ1c2VyIiwiZW1haWwiOiJ1c2VyQHVzZXIudXNlciIsImZpcnN0X25hbWUiOiJ1c2VyIiwibGFzdF9uYW1lIjoidXNlciIsImlzX2FjdGl2ZSI6dHJ1ZSwiaXNfb3JnX2FkbWluIjp0cnVlLCJpc19pbnRlcm5hbCI6dHJ1ZSwibG9jYWxlIjoiZW4tVVMifSwiaW50ZXJuYWwiOnsib3JnX2lkIjoiMDAwMDAwIn19fQ=="
+# account number 000001
+INVALIDAUTHSTRING="eyJlbnRpdGxlbWVudHMiOnsiaW5zaWdodHMiOnsiaXNfZW50aXRsZWQiOnRydWV9LCJzbWFydF9tYW5hZ2VtZW50Ijp7ImlzX2VudGl0bGVkIjp0cnVlfSwib3BlbnNoaWZ0Ijp7ImlzX2VudGl0bGVkIjp0cnVlfSwiaHlicmlkIjp7ImlzX2VudGl0bGVkIjp0cnVlfSwibWlncmF0aW9ucyI6eyJpc19lbnRpdGxlZCI6dHJ1ZX0sImFuc2libGUiOnsiaXNfZW50aXRsZWQiOnRydWV9fSwiaWRlbnRpdHkiOnsiYWNjb3VudF9udW1iZXIiOiIwMDAwMDMiLCJ0eXBlIjoiVXNlciIsInVzZXIiOnsidXNlcm5hbWUiOiJ1c2VyIiwiZW1haWwiOiJ1c2VyQHVzZXIudXNlciIsImZpcnN0X25hbWUiOiJ1c2VyIiwibGFzdF9uYW1lIjoidXNlciIsImlzX2FjdGl2ZSI6dHJ1ZSwiaXNfb3JnX2FkbWluIjp0cnVlLCJpc19pbnRlcm5hbCI6dHJ1ZSwibG9jYWxlIjoiZW4tVVMifSwiaW50ZXJuYWwiOnsib3JnX2lkIjoiMDAwMDAwIn19fQo="
+
+curl \
+    --silent \
+    --show-error \
+    --header "x-rh-identity: $VALIDAUTHSTRING" \
+    http://localhost:443/api/composer/v1/version | jq .
+
+#
+# Make sure the invalid auth string returns a 404
+#
+[ "$(curl \
+        --silent \
+        --output /dev/null \
+        --write-out '%{http_code}' \
+        --header "x-rh-identity: $INVALIDAUTHSTRING" \
+        http://localhost:443/api/composer/v1/version)" = "404" ]
+
 exit 0
diff --git a/test/cases/aws.sh b/test/cases/aws.sh
index c18e01806..d4ca5d6ca 100755
--- a/test/cases/aws.sh
+++ b/test/cases/aws.sh
@@ -131,6 +131,8 @@ sudo composer-cli blueprints depsolve bash
 WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
 sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
 WORKER_JOURNAL_PID=$!
+# Stop watching the worker journal when exiting.
+trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
 # Start the compose and upload to AWS.
 greenprint "🚀 Starting compose"
@@ -172,9 +174,6 @@ $AWS_CMD ec2 describe-images \
 
 AMI_IMAGE_ID=$(jq -r '.Images[].ImageId' "$AMI_DATA")
 
-# Stop watching the worker journal.
-sudo pkill -P ${WORKER_JOURNAL_PID}
-
 # NOTE(mhayden): Getting TagSpecifications to play along with bash's
 # parsing of curly braces and square brackets is nuts, so we just write some
 # json and pass it to the aws command.
diff --git a/test/cases/azure.sh b/test/cases/azure.sh
index 735a0e10e..071a81a30 100755
--- a/test/cases/azure.sh
+++ b/test/cases/azure.sh
@@ -150,6 +150,8 @@ sudo composer-cli blueprints depsolve bash
 WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
 sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
 WORKER_JOURNAL_PID=$!
+# Stop watching the worker journal when exiting.
+trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
 # Start the compose and upload to Azure.
 greenprint "🚀 Starting compose"
@@ -182,9 +184,6 @@ if [[ $COMPOSE_STATUS != FINISHED ]]; then
     exit 1
 fi
 
-# Stop watching the worker journal.
-sudo pkill -P ${WORKER_JOURNAL_PID}
-
 # Set up necessary variables for terraform
 export TF_VAR_RESOURCE_GROUP="$AZURE_RESOURCE_GROUP"
 export TF_VAR_STORAGE_ACCOUNT="$AZURE_STORAGE_ACCOUNT"
diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh
index 28ac4f29d..f3b720ef6 100755
--- a/test/cases/ostree-ng.sh
+++ b/test/cases/ostree-ng.sh
@@ -119,6 +119,8 @@ build_image() {
     WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
     sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
     WORKER_JOURNAL_PID=$!
+    # Stop watching the worker journal when exiting.
+    trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
     # Start the compose.
     greenprint "🚀 Starting compose"
@@ -155,9 +157,6 @@ build_image() {
         echo "Something went wrong with the compose. 😢"
         exit 1
     fi
-
-    # Stop watching the worker journal.
-    sudo pkill -P ${WORKER_JOURNAL_PID}
 }
 
 # Wait for the ssh server up to be.
diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh
index 228760c1d..6c6a81e05 100755
--- a/test/cases/ostree.sh
+++ b/test/cases/ostree.sh
@@ -146,6 +146,8 @@ build_image() {
     WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
     sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
     WORKER_JOURNAL_PID=$!
+    # Stop watching the worker journal when exiting.
+    trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
     # Start the compose.
     greenprint "🚀 Starting compose"
@@ -187,9 +189,6 @@ build_image() {
         echo "Something went wrong with the compose. 😢"
         exit 1
     fi
-
-    # Stop watching the worker journal.
-    sudo pkill -P ${WORKER_JOURNAL_PID}
 }
 
 # Wait for the ssh server up to be.
diff --git a/test/cases/vmware.sh b/test/cases/vmware.sh
index cbbece63d..b7ad46457 100755
--- a/test/cases/vmware.sh
+++ b/test/cases/vmware.sh
@@ -131,6 +131,8 @@ sudo composer-cli blueprints depsolve bash
 WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
 sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
 WORKER_JOURNAL_PID=$!
+# Stop watching the worker journal when exiting.
+trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
 # Start the compose and upload to VMWare.
 greenprint "🚀 Starting compose"
@@ -164,9 +166,6 @@ if [[ $COMPOSE_STATUS != FINISHED ]]; then
     exit 1
 fi
 
-# Stop watching the worker journal.
-sudo pkill -P ${WORKER_JOURNAL_PID}
-
 greenprint "👷🏻 Building VM in vSphere"
 $GOVC_CMD vm.create -u "${GOVMOMI_USERNAME}":"${GOVMOMI_PASSWORD}"@"${GOVMOMI_URL}" \
     -k=true \
diff --git a/tools/libvirt_test.sh b/tools/libvirt_test.sh
index f5ea731c9..a20826c5f 100755
--- a/tools/libvirt_test.sh
+++ b/tools/libvirt_test.sh
@@ -138,6 +138,8 @@ sudo composer-cli blueprints depsolve bp
 WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
 sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
 WORKER_JOURNAL_PID=$!
+# Stop watching the worker journal when exiting.
+trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
 
 # Start the compose
 greenprint "🚀 Starting compose"
@@ -170,9 +172,6 @@ if [[ $COMPOSE_STATUS != FINISHED ]]; then
     exit 1
 fi
 
-# Stop watching the worker journal.
-sudo pkill -P ${WORKER_JOURNAL_PID}
-
 # Download the image.
 greenprint "📥 Downloading the image"