Skip to content

Add inst.cert boot option for CA certificates import. - #7343

Open
rvykydal wants to merge 3 commits into
rhinstaller:mainfrom
rvykydal:inst-cert
Open

rvykydal wants to merge 3 commits into
rhinstaller:mainfrom
rvykydal:inst-cert

Conversation

@rvykydal

@rvykydal rvykydal commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Initiated by this user feature request (pull request): #7307
The option addresses some feature gaps in CA certificates import by installer:

  • import preceding kickstart download
  • import independent of kickstart modification

Resolves: INSTALLER-4927

Kickstart test: rhinstaller/kickstart-tests#1779


Add a new boot option inst.cert that imports a CA trust anchor
certificate from the installation medium or any other disk device
before kickstart or stage2 is fetched over HTTPS.

Supported formats:

  inst.cert=cdrom:/path/to/cert.pem
  inst.cert=hd:<dev>:/path/to/cert.pem

The certificate is:

  • trusted immediately in the installer environment
  • installed into the target system during installation

This is equivalent to using the kickstart %certificate section with --type anchor.

See the commit message for implementation details.

@github-actions github-actions Bot added the f46 label Oct 9, 2026
@rvykydal
rvykydal deployed to gh-cockpituous October 9, 2026 10:04 — with GitHub Actions Active
@rvykydal
rvykydal deployed to gh-cockpituous October 9, 2026 11:00 — with GitHub Actions Active
@rvykydal

rvykydal commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

/build-image

@rvykydal rvykydal changed the title Inst cert Add inst.cert boot option for CA certificates import. Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Images built based on commit 5b3760d:

  • boot.iso: failure

Download the images from the bottom of the job status page.

@rvykydal

rvykydal commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

/build-image

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Images built based on commit 173c2fc:

  • boot.iso: success

Download the images from the bottom of the job status page.

@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --kstest-pr 1779 certificates-inst-cert-curl

@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --kstest-pr 1779 certificate-inst-cert-curl

@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --kstest-pr 1779 certificate-inst-cert-curl

Passed: https://github.com/rhinstaller/anaconda/actions/runs/38248744030

Add a new boot option inst.cert= that imports a CA trust anchor
certificate from the installation medium or any other disk device
before kickstart or stage2 is fetched over HTTPS.

Supported formats:
  inst.cert=cdrom:/path/to/cert.pem
  inst.cert=hd:<dev>:/path/to/cert.pem

The certificate source device is mounted independently (not relying
on /run/install/repo) using udev rules that trigger when the block
device appears, similar to how inst.dd= works.

The certificate is:
- trusted immediately in the installer environment
- installed into the target system during installation

This is equivalent to using the kickstart %certificate section with
--type anchor.

To ensure certificates are imported before any HTTPS fetches, the
initqueue job is named "01-anaconda-cert" so it sorts before
"99-nm-run.sh" in the settled hook directory. This required adding
an explicit job name parameter to when_diskdev_appears and
when_any_cdrom_appears in anaconda-lib.sh (all existing callers
updated to preserve their current behavior).

After switchroot, certificates staged at /run/install/certificates/
are collected into CertificatesModule so they are installed to the
target system alongside any kickstart %certificate entries.

New dracut files:
  parse-anaconda-cert.sh  - cmdline hook (priority 24) parsing inst.cert=
  cert-genrules.sh        - pre-trigger hook generating udev rules
  anaconda-fetch-cert     - mounts device and imports certificate(s)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Resolves: INSTALLER-4927
The test_find_rw_mounts test strips log messages before checking for
non-read-only mount commands, but the log regex only matched info,
warn, and error. The warn_critical function used in anaconda-fetch-cert
was not matched, causing the test to flag "failed to mount" in the
log message as a non-read-only mount command.

Broaden the regex to match warn and any warn_* variants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Related: INSTALLER-4927
@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --kstest-pr 1779 certificate-inst-cert-curl

@rvykydal
rvykydal deployed to gh-cockpituous October 12, 2026 14:12 — with GitHub Actions Active
@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --testtype smoke

@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --kstest-pr 1779 certificate-inst-cert-curl

https://github.com/rhinstaller/anaconda/actions/runs/38261187961

@rvykydal

Copy link
Copy Markdown
Contributor Author

/kickstart-test --testtype smoke

@rvykydal
rvykydal marked this pull request as ready for review October 13, 2026 07:32
@rvykydal
rvykydal requested review from KKoukiou, M4rtinK, bookwar, bruno-fs, jikortus and jstodola and removed request for KKoukiou October 13, 2026 07:32
@lzap

lzap commented Oct 13, 2026

Copy link
Copy Markdown

I can confirm that this is sufficient, actually better, than what I asked for. Thanks for looking in into this.

I am aiming for fully encrypted TLS provisioning workflow via ISO media:

  • User creates a modified netboot.iso with Satellite certificate using this new feature
  • A system is booted via removable media (physically or virtually using BMC)
  • Kickstart is downloaded over HTTPS with TLS server CA validation on
  • The kickstart contains repository HTTPS URL (Satellite uses the same certificate)
  • Satellite does not enforce client certificates for kickstart repos so the installation proceeds

A logical extension would be support for client certificates, but at this point I think this is a good enough start and we do not have a hard requirement from the customer for client certs at this point. May I assume that as long as the OS supports PQC, this will also accept PQC certificates?

@rvykydal

rvykydal commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

...May I assume that as long as the OS supports PQC, this will also accept PQC certificates?

I am not sure, it depends on the OS mechanism for PQC certificates import. Currently, in initramfs we just append the certificate to the bundle (don't run any tool) so there might be some update needed (like adding the tool to the intiramfs). We haven't scoped adding import tool to the initramfs yet.
After switchroot, and for installed system, we use the trust tool.

@tomasfratrik
tomasfratrik self-requested a review October 20, 2026 07:44

This branch was successfully deployed

1 active deployment
gh-cockpituous — 799304ba Deployed Oct 12, 2026 by rvykydal via trigger-webui (fedora-rawhide) #2539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants