Skip to content

depsolve: add rhui flag to skip RHSM cert lookup for cloud RHUI repos#5029

Closed
brandonrc wants to merge 1 commit intoosbuild:mainfrom
brandonrc:rhui-support
Closed

depsolve: add rhui flag to skip RHSM cert lookup for cloud RHUI repos#5029
brandonrc wants to merge 1 commit intoosbuild:mainfrom
brandonrc:rhui-support

Conversation

@brandonrc
Copy link
Copy Markdown

@brandonrc brandonrc commented Feb 17, 2026

Summary

Adds RHUI support to osbuild-composer so that the worker can generate manifests that use org.osbuild.rhui secrets for RPM downloads on cloud instances.

Closes #5028
Related: #820 (original report, closed as stale), osbuild/osbuild#2355 (companion osbuild changes), osbuild/images#2208 (companion images changes)

Dependencies

This PR depends on two upstream PRs that must merge first:

  1. Add RHUI support for cloud instance authentication images#2208 — adds RHUI bool to RepoConfig, case "org.osbuild.rhui" to NewCurlPackageItem(), and RHUI handling in depsolvednf
  2. Add native RHUI support for building images on cloud instances osbuild#2355 — adds the org.osbuild.rhui secrets provider, cloud provider detection, and identity header support

After osbuild/images#2208 merges, this PR will need an images dependency bump (go mod vendor) to pull in the RHUI changes, replacing the direct vendor edits currently included here.

Changes

depsolve: add rhui flag to skip RHSM cert lookup for cloud RHUI repos

  • Add RHUI bool field to DepsolvedRepoConfig in internal/worker/json.go with JSON serialization support
  • Add RHUI test cases to TestDepsolvedRepoConfigJSONRoundtrip and TestDepsolvedRepoConfigRPMMDConversion
  • Vendor changes (temporary, will be replaced by images bump):
    • curl_source.go — add case "org.osbuild.rhui"
    • repository.go — add RHUI bool to RepoConfig
    • depsolvednf.go — RHUI secrets and subscription validation
    • v2.go — pass RHUI flag to solver

Test plan

  • Unit tests for JSON round-trip with RHUI repos
  • Unit tests for RPMMD conversion with RHUI repos
  • Tested end-to-end on AWS EC2 RHEL 8 Cloud Access instance — successfully built a 10GB qcow2 image using RHUI repos

Stopgap

Until this is merged, users can use osbuild-rhui-shim as a workaround.

Add a `rhui: true` repository config flag that allows cloud RHUI
systems to bypass the Go-side RHSM entitlement certificate lookup.

On cloud instances (AWS, Azure, GCP), RHEL repos are served via
RHUI mirrors authenticated by cloud instance identity headers and
host-installed SSL certificates, not RHSM entitlement certs from
/etc/pki/entitlement/. The existing `rhsm: true` flag requires
those certs to exist, which fails on RHUI-only systems with
"no matching key and certificate pair".

When `rhui: true` is set on a repository:
- validateSubscriptionsForRepos() skips the RHSM cert check
- reposFromRPMMD() passes rhsm: true to the Python depsolve
  script, which handles RHUI secret discovery via osbuild's
  util.rhsm and util.rhui modules
- Package secrets are set to "org.osbuild.rhui" instead of
  "org.osbuild.rhsm"

This works in conjunction with osbuild's RHUI support which
discovers RHUI repo files, SSL certs, and cloud identity headers
from the host system automatically.
@brandonrc brandonrc requested review from a team and thozza as code owners February 17, 2026 16:50
@brandonrc brandonrc requested review from bcl and lzap and removed request for a team February 17, 2026 16:51
@thozza thozza marked this pull request as draft February 18, 2026 14:56
@github-actions
Copy link
Copy Markdown

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 23, 2026
@github-actions
Copy link
Copy Markdown

This PR was closed because it has been stalled for 30+7 days with no activity.

@github-actions github-actions bot closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add RHUI support for building images on cloud instances

1 participant