Skip to content

feat(ipe): add signed policy loading and Azure mode selection - #52

Draft
aadhar-agarwal wants to merge 12 commits into
aclmainfrom
aadagarwal/acl-ipe-mode-toggle
Draft

feat(ipe): add signed policy loading and Azure mode selection#52
aadhar-agarwal wants to merge 12 commits into
aclmainfrom
aadagarwal/acl-ipe-mode-toggle

Conversation

@aadhar-agarwal

@aadhar-agarwal aadhar-agarwal commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Delivers the signed IPE policy as a per-UKI credential companion while preserving a bootable build-time candidate and moving final signing to ACL Pipelines definition 5425.

The credential is stored at EFI/Linux/<uki>.efi.extra.d/acl-ipe-policy.p7b.cred. systemd-stub exposes it in the initramfs at /.extra/credentials/acl-ipe-policy.p7b.cred, and the signed UKI command line binds it with acl.ipe.policy_sha256=<sha256-of-attached-CMS>.

Change Log

  • Generate a build-local attached CMS candidate for both ephemeral and external modes.
  • Stage the immutable raw policy and candidate credential under ${BUILD_DIR}/acl-ipe-policy/.
  • Bind the exact credential hash into the UKI before its build-time signature and install the credential beside that UKI.
  • On Azure, attempt to validate and load the credential during initrd; failures leave IPE inactive without blocking boot.
  • Keep runtime activation off by default and accept only off or permissive from Azure IMDS.
  • Forward the selected IPE asset mode through the SDK/container interfaces.
  • Reuse one ephemeral Secure Boot certificate across test and production VHD conversions.
  • Add build, loader, artifact-cleanup, and mode contracts plus updated architecture documentation.

Type of Change

  • Image build change (base image, sysexts, OEM images)
  • Package/SPEC update
  • CI/automation change
  • SDK/toolchain update
  • Configuration change
  • Documentation update
  • Bug fix

Does this affect the image build?

  • Yes
  • No

Associated Issues

Mode behavior

  • disabled: no token, credential, or raw policy.
  • ephemeral: the build-time candidate is final for development and tests.
  • external: the build-time candidate keeps the VHD bootable; definition 5425 validates and replaces it.

Normal production defaults remain disabled. Production activation is a follow-up.

Test Methodology

Step Validation Pipeline / evidence Status / refs
1 Independent PR-head checks • github-acl-pr-validation - PR 52 1193015
• prcheck 1193008
• acl-pipelines-prcheck 1193009
Current-head checks in progress at PR 52 701fa3e63; PR 28754 8c9d4f29.
2 AMD64 and ARM64 production defaults disabled • [AMD64-7-OneBranch]-Prod-BuildACL 1193016
• [ARM64-7-OneBranch]-Prod-BuildACL 1193017
Current-head PROD runs in progress with ipeAssetMode: disabled. ARM64 QEMU Kola is a known failing baseline and is not an IPE gate.
3-4 Standard Secure Boot and merged Mantle trust • aclmain-grub 1191526
Mantle PR 34
Passed without an additional UEFI db certificate; Mantle is merged.
5-6 Combined PR 52 + PR 28754 exact-ref integration • github-acl-pr-validation 1191549 Passed at 728686795 / dc202453, including both architectures after the ARM64 retry.
7 IPE image changes land in release/3.0 • This PR Pending - merge PR 28754, merge this PR, then backport.
8a External candidate build, bundle, and Azure smoke • [AMD64]-Prod-BuildACL-Nightly 1193012
• [ARM64]-Prod-BuildACL-Nightly 1193013
Current-head, non-hydrated external runs in progress at 701fa3e63 / 8c9d4f29.
8b-c Publisher signing and ACG dry-run, both architectures • ACL-Publish-MCR-And-ACG 1191577 Passed; the partial result is only a non-blocking 1ES warning.

Current-head IPE validation is in progress for PR 28754 8c9d4f29. ARM64 QEMU Kola remains a known failing baseline and is not an IPE gate.

Landing Timeline

  • 1 - Integrate ephemeral IPE across PR 52 and PR 28754.
  • 2 - Keep AMD64 and ARM64 production defaults disabled.
  • 3 - Validate Mantle Trusted Launch and VHD fallback.
  • 4 - Merge Mantle PR 34.
  • 5 - Pass AMD64 and ARM64 Azure Kola.
  • 6 - Merge PR 28754.
  • 7 - Merge PR 52, then backport to release/3.0.
  • 8 - Validate external signing end to end.
  • 9 - Activate production in a follow-up PR.

Merge Checklist

  • Image build contracts pass for this change
  • Any updated packages/SPECs build successfully
  • Fresh relevant kola tests pass
  • All package sources are available
  • Source files have up-to-date hashes/manifests
  • Documentation has been updated
  • Ready to merge

@aadhar-agarwal aadhar-agarwal changed the title IPE functionality feat(ipe): add signed policy loading and Azure mode selection Aug 14, 2026
@aadhar-agarwal
aadhar-agarwal force-pushed the aadagarwal/acl-ipe-mode-toggle branch 2 times, most recently from fe37a53 to a449cd2 Compare August 14, 2026 18:32
@aadhar-agarwal
aadhar-agarwal force-pushed the aadagarwal/acl-ipe-mode-toggle branch 4 times, most recently from 269560d to 6cbfb5e Compare August 19, 2026 18:19
Build signed IPE policy and /usr dm-verity assets for Secure Boot UKIs,
load the policy before switch_root, and select disabled or permissive mode
from Azure IMDS.

Add the build, loader, Azure, CI, and documentation contracts, including
custom Secure Boot trust for VHD validation and reliable external policy
handoff to the SDK container.

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
@aadhar-agarwal
aadhar-agarwal force-pushed the aadagarwal/acl-ipe-mode-toggle branch from 6cbfb5e to 0db5ca5 Compare August 19, 2026 22:00
aadhar-agarwal and others added 5 commits August 19, 2026 15:19
Expose opt-in controls so a PR run can build Mantle from aclmain and execute targeted Azure Kola validation without changing normal defaults.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Add SSH keepalives and force-kill reboot sessions that ignore TERM so Azure smoke validation can continue polling for the reboot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Request the canonical libgomp RPM explicitly and expand catalog lists into distinct DNF arguments so bundled cloud-native libraries cannot hijack gettext dependency resolution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Keep the catalog and sourced RPM helper non-executable while leaving the provider contract executable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 266c8380-b4b0-48c4-8e5b-41af575fc9d0
@mayankfz
mayankfz requested a balanced review from Copilot August 20, 2026 16:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds opt-in IPE support to Azure Secure Boot UKI images, including signed policies, dm-verity signatures, and IMDS-based permissive mode.

Changes:

  • Builds and loads signed IPE policies with signed /usr root hashes.
  • Adds Azure Trusted Launch certificate forwarding and runtime validation.
  • Adds supporting tests, CI parameters, documentation, and package fixes.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk_lib/sdk_entry.sh Forwards validated IPE settings.
sdk_lib/sdk_container_common.sh Adds version-file fallback.
run_sdk_container Streams external policies into containers.
run_azure_tests.sh Forwards Trusted Launch settings.
image_to_vm.sh Reuses IPE signing certificates.
ci-automation/vendor-testing/azure.sh Configures Trusted Launch and certificates.
build_library/rpm/uki_install.sh Signs and installs verity companions.
build_library/rpm/sign_uki_ephemeral.sh Supports shared signing certificates.
build_library/rpm/rpm_install.sh Installs signed policies and multi-RPM mappings.
build_library/rpm/package_catalog.yaml Adds explicit libgomp dependencies.
build_library/rpm/ipe_verity.sh Serializes validated root hashes.
build_library/rpm/ensure_ephemeral_cert.sh Generates shared ephemeral certificates.
build_library/rpm/dracut_install.sh Installs the IPE loader module.
build_library/rpm/additional_files/ipe/acl-ipe-boot-policy.pol Defines the IPE execution policy.
build_library/rpm/additional_files/dracut-acl-selinux-toggle/module-setup.sh Installs the shared profile helper.
build_library/rpm/additional_files/dracut-acl-selinux-toggle/acl-selinux-toggle.sh Uses shared IMDS parsing.
build_library/rpm/additional_files/dracut-acl-ipe-load/module-setup.sh Defines the IPE dracut module.
build_library/rpm/additional_files/dracut-acl-ipe-load/acl-ipe-load.sh Selects and activates IPE mode.
build_library/rpm/additional_files/dracut-acl-ipe-load/acl-ipe-load.service Orders early policy loading.
build_library/rpm/additional_files/acl-node-security-profile.sh Fetches and caches IMDS profiles.
build_library/build_image_util.sh Integrates policy installation.
acl/validate/validate_common.sh Forwards host-test timeouts.
acl/tests/test-run-sdk-container-ipe-policy.sh Tests policy streaming and reuse.
acl/tests/test-rpm-provider-selection.sh Tests multi-package mappings.
acl/tests/test-ipe-policy-input.sh Tests policy preparation and validation.
acl/tests/test-ipe-loader-runtime.sh Tests runtime mode selection.
acl/tests/test-azure-security-profile-test-common.sh Tests timeout contracts.
acl/tests/run-selinux-toggle-test.sh Reuses shared Azure helpers.
acl/tests/run-ipe-permissive-test.sh Validates permissive IPE behavior.
acl/tests/run-ipe-mode-toggle-test.sh Tests reboot-based IPE selection.
acl/tests/azure-security-profile-test-common.sh Shares Azure tag/reboot logic.
acl/docs/BUILD_RPM_IMAGE_README.md Documents policy build inputs.
acl/docs/architecture.md Documents IPE and verity architecture.
acl/build_rpm_image.sh Adds IPE configuration and validation.
.pipelines/github-pr-validation.yml Adds validation parameters.
Suppressed comments (1)

acl/docs/BUILD_RPM_IMAGE_README.md:173

  • The external-policy example also omits ACL_IPE_CAPABLE=true, so the supplied artifact is validated but never installed because rpm_install_ipe_policy returns immediately for the default disabled capability. Update this command to opt into IPE explicitly.
./acl/build_rpm_image.sh --rebuild \
  --ipe-policy-mode=external \
  --ipe-policy-path=/secure/input/acl.pol.p7b

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread acl/docs/BUILD_RPM_IMAGE_README.md Outdated
Comment on lines +165 to +168
Production builds can consume an externally signed attached DER PKCS#7
artifact. The artifact is mounted read-only into the SDK container, verified,
and accepted only when its extracted content exactly matches
`build_library/rpm/additional_files/ipe/acl-ipe-boot-policy.pol`:
Comment thread acl/docs/BUILD_RPM_IMAGE_README.md Outdated
default, which is intended for development and test builds:

```bash
./acl/build_rpm_image.sh --rebuild --ipe-policy-mode=ephemeral
aadhar-agarwal and others added 4 commits August 20, 2026 16:35
Replace the public capability/policy-mode split with ACL_IPE_ASSET_MODE.
Record the completed producer mode in ipe-asset-mode and compare exact modes when reusing image artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 266c8380-b4b0-48c4-8e5b-41af575fc9d0
The IPE policy trusts signed dm-verity roots and never interpolates a per-image root hash, so retain only the policy rule validation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 266c8380-b4b0-48c4-8e5b-41af575fc9d0
…-mode-toggle

# Conflicts:
#	sdk_lib/sdk_container_common.sh
Stage a bootable policy candidate outside /usr, bind it to the signed UKI command line, and load it best-effort from systemd-stub credentials on Azure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
@aadhar-agarwal
aadhar-agarwal force-pushed the aadagarwal/acl-ipe-mode-toggle branch from 5f6bf68 to 27b83f3 Compare August 27, 2026 00:29
The policy credential is exposed only in the initrd. Validate the loaded policy after switch-root instead of requiring the transient credential path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Use one per-build ephemeral certificate for both test and production VHD conversions so the exported gallery certificate matches every signed image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d2c3f02c-40e7-4079-9a25-e82509b05333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants