Skip to content

feat: add UEFI SecureBoot enable/disable and key reset support - #457

Merged
mergify[bot] merged 2 commits into
bmc-toolbox:mainfrom
mcanevet:feat/secure-boot
Aug 18, 2026
Merged

mergify[bot] merged 2 commits into
bmc-toolbox:mainfrom
mcanevet:feat/secure-boot

Conversation

@mcanevet

@mcanevet mcanevet commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR implement/change/remove?

bmclib has no way to enable/disable UEFI SecureBoot or reset its key databases, despite gofish (already a direct dependency) fully supporting both via the ComputerSystem's SecureBoot resource (SecureBootEnable + .Update(), and .ResetKeys()).

Adds the standard three-layer bmclib capability, following the exact pattern of bmc/bios.go/bmc/boot_device.go:

  • internal/redfishwrapper: GetSecureBoot/SetSecureBoot/ResetSecureBootKeys wrapping gofish's schemas.SecureBoot.
  • bmc: SecureBootStateGetter/SecureBootSetter/SecureBootKeysResetter interfaces with the usual FromInterfaces dispatch.
  • Client.GetSecureBoot/SetSecureBoot/ResetSecureBootKeys passthroughs.

Wired into every provider that embeds redfishwrapper.Client - redfish (generic), dell, supermicro, and lenovo - plus new Feature* constants (FeatureGetSecureBoot, FeatureSetSecureBoot, FeatureResetSecureBootKeys) on each. This matches how every other redfishwrapper-backed capability (BIOS config, power state, NMI, ...) is exposed at each provider layer, even though the implementation is the same delegation in every case.

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

Any BMC reached via the generic Redfish, Dell, Supermicro, or Lenovo XCC provider.

The HW model number, product name this change applies to (if applicable)

N/A - generic Redfish SecureBoot resource, not vendor-specific.

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

Requires the standard Redfish SecureBoot resource under ComputerSystem.

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

gofish (already a direct dependency, github.com/stmcginnis/gofish/schemas).

Description for changelog/release notes

Add SetSecureBoot/GetSecureBoot/ResetSecureBootKeys support for the redfish, dell, supermicro, and lenovo providers.

mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Temporary replace directive so this branch builds against the SecureBoot
support this depends on (bmc-toolbox/bmclib#457) before that PR merges.

DO NOT MERGE this commit - drop it (go mod edit -dropreplace, then go mod
tidy) once bmclib#457 lands and a tagged bmclib release picks it up.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Temporary replace directive so this branch builds against the SecureBoot
support this depends on (bmc-toolbox/bmclib#457) before that PR merges.

DO NOT MERGE this commit - drop it (go mod edit -dropreplace, then go mod
tidy) once bmclib#457 lands and a tagged bmclib release picks it up.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Temporary replace directive so this branch builds against the SecureBoot
support this depends on (bmc-toolbox/bmclib#457) before that PR merges.

DO NOT MERGE this commit - drop it (go mod edit -dropreplace, then go mod
tidy) once bmclib#457 lands and a tagged bmclib release picks it up.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 14, 2026
Temporary replace directive so this branch builds against the SecureBoot
support this depends on (bmc-toolbox/bmclib#457) before that PR merges.

DO NOT MERGE this commit - drop it (go mod edit -dropreplace, then go mod
tidy) once bmclib#457 lands and a tagged bmclib release picks it up.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Comment thread internal/redfishwrapper/secure_boot.go Outdated
Comment thread internal/redfishwrapper/secure_boot.go Outdated
Comment thread internal/redfishwrapper/secure_boot.go Outdated
@mcanevet
mcanevet requested a review from joelrebel August 14, 2026 15:46
bmclib has no way to enable/disable UEFI SecureBoot or reset its key
databases, despite gofish (already a direct dependency) fully supporting
both via the ComputerSystem's SecureBoot resource (SecureBootEnable +
.Update(), and .ResetKeys()).

Adds the standard three-layer bmclib capability, following the exact
pattern of bmc/bios.go/bmc/boot_device.go:
- internal/redfishwrapper: GetSecureBoot/SetSecureBoot/ResetSecureBootKeys
  wrapping gofish's schemas.SecureBoot.
- bmc: SecureBootStateGetter/SecureBootSetter/SecureBootKeysResetter
  interfaces with the usual FromInterfaces dispatch.
- Client.GetSecureBoot/SetSecureBoot/ResetSecureBootKeys passthroughs.

Wired into every provider that embeds redfishwrapper.Client - redfish
(generic), dell, supermicro, and lenovo - matching how every other
redfishwrapper-backed capability (BIOS config, power state, NMI, ...) is
exposed at each of those provider layers, even though the implementation
is the same delegation in each case.

Tests added at the redfishwrapper and bmc dispatch layers (Dell fixture),
and at the lenovo provider layer (XCC fixture/mock server, already
scaffolded for SecureBoot ahead of this).

Description for changelog/release notes:

Add SetSecureBoot/GetSecureBoot/ResetSecureBootKeys support for the
redfish, dell, supermicro, and lenovo providers.
…ata ID

GetSecureBoot/SetSecureBoot/ResetSecureBootKeys returned nil on an
incompatible System odata ID, which the bmc dispatch loop treats as a
successful result and stops trying other providers. Return
ErrRedfishSystemOdataID instead, matching inventory.go's handling of
the same check.
@mergify

mergify Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-18 05:46 UTC · Rule: default · triggered by rule refactored queue action rule
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-08-18 05:46 UTC · at 51a7f0e471abc21d5fe354eabb185767ac0a09d9 · merge

This pull request spent 13 seconds in the queue, including 2 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 89df130 into bmc-toolbox:main Aug 18, 2026
4 of 5 checks passed
@mergify mergify Bot removed the queued label Aug 18, 2026
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 26, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 27, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 28, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Replace string parameters in SecureBoot functions with typed constants to:
- Make valid values explicit and discoverable
- Reduce validation burden on callers
- Match bmclib's pattern (BootDeviceType, etc.)

Also add nil checks after SecureBoot() calls - gofish returns nil,nil when
the resource link is empty, which previously caused silent success.

Implements reviewer feedback from PR bmc-toolbox#457.
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Extends the SecureBoot support added in bmc-toolbox#457 with per-database operations,
newly possible now that gofish's SecureBootDatabase gained AddCertificate/
AddSignature (stmcginnis/gofish#561). Unlike the whole-subsystem
ResetSecureBootKeys, these target a single database (e.g. "db", "KEK")
without touching PK - the mechanism a caller needs to enroll a custom
certificate into db/KEK while leaving an already-provisioned PK (and
whatever Setup Mode state it implies) alone.

Adds the same three-layer bmclib capability as bmc-toolbox#457, wired into the same
four providers:
- internal/redfishwrapper: ResetSecureBootDatabaseKeys/ImportSecureBootCertificate,
  finding the target database by DatabaseID in the SecureBootDatabases
  collection.
- bmc: SecureBootDatabaseKeysResetter/SecureBootCertificateImporter
  interfaces with the usual FromInterfaces dispatch.
- Client.ResetSecureBootDatabaseKeys/ImportSecureBootCertificate passthroughs.

Wired into redfish (generic), dell, supermicro, and lenovo - matching how
GetSecureBoot/SetSecureBoot/ResetSecureBootKeys are exposed at each of those
provider layers already.

Bumps gofish to a pseudo-version pinned to the AddCertificate/AddSignature
commit, ahead of the next tagged release.

Tests added at the bmc dispatch layer and the redfishwrapper layer (new Dell
SecureBootDatabases/db fixtures, named to match virtualmedia_collection.json's
<resource>_collection.json convention), including a not-found case when the
requested database isn't present in the collection.
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Replace string parameters in SecureBoot functions with typed constants to:
- Make valid values explicit and discoverable
- Reduce validation burden on callers
- Match bmclib's pattern (BootDeviceType, etc.)

Also add nil checks after SecureBoot() calls - gofish returns nil,nil when
the resource link is empty, which previously caused silent success.

Implements reviewer feedback from PR bmc-toolbox#457.
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Replace string parameters in SecureBoot functions with typed constants to:
- Make valid values explicit and discoverable
- Reduce validation burden on callers
- Match bmclib's pattern (BootDeviceType, etc.)

Also add nil checks after SecureBoot() calls - gofish returns nil,nil when
the resource link is empty, which previously caused silent success.

Implements reviewer feedback from PR bmc-toolbox#457.

example: add Secure Boot usage examples

Add comprehensive example showing how to use the Secure Boot functionality:
  - Get current Secure Boot state
  - Enable/disable Secure Boot
  - Reset all Secure Boot keys
  - Reset a specific database's keys (db, KEK, PK, dbx)
  - Import certificates into a database

Demonstrates usage of the typed constants for reset types and databases.
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Replace string parameters in SecureBoot functions with typed constants to:
- Make valid values explicit and discoverable
- Reduce validation burden on callers
- Match bmclib's pattern (BootDeviceType, etc.)

Also add nil checks after SecureBoot() calls - gofish returns nil,nil when
the resource link is empty, which previously caused silent success.

Update all mock implementations to use the new typed signatures.

Implements reviewer feedback from PR bmc-toolbox#457.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Aug 31, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/bmclib that referenced this pull request Aug 31, 2026
Extends the whole-subsystem SecureBoot support from bmc-toolbox#457 with
per-database operations, newly possible now that gofish's
SecureBootDatabase gained AddCertificate/AddSignature
(stmcginnis/gofish#561). Unlike ResetSecureBootKeys (which resets
PK/KEK/db/dbx together), these target a single database (e.g. "db",
"KEK") without touching PK - the mechanism a caller needs to enroll a
custom certificate into db/KEK while leaving an already-provisioned PK
(and whatever Setup Mode state it implies) alone.

- internal/redfishwrapper: ResetSecureBootDatabaseKeys/
  ImportSecureBootCertificate, finding the target database by
  DatabaseID in the SecureBootDatabases collection.
- bmc: SecureBootDatabaseKeysResetter/SecureBootCertificateImporter
  interfaces with the usual FromInterfaces dispatch, plus
  ResetSecureBootDatabaseKeysType/SecureBootDatabase typed constants
  (matching bmclib's existing BootDeviceType pattern, replacing raw
  strings so valid values are explicit and discoverable).
- client.go: passthroughs for both operations.
- providers/providers.go: FeatureResetSecureBootDatabaseKeys/
  FeatureImportSecureBootCertificate registry entries, needed by the
  provider-layer commits that follow.

Also adds a nil check after SecureBoot() calls in the existing
ResetSecureBootKeys/SetSecureBoot/GetSecureBoot path - gofish returns
nil,nil when the resource link is empty, which previously caused
silent success.

This intentionally leaves every provider on the old string-typed
ResetSecureBootKeys signature and without the new per-database
methods; each provider is wired up (and migrated to the typed
signature) in its own following commit, per review feedback on bmc-toolbox#460
to keep provider changes independently revertable from this core
layer.

Bumps gofish to a pseudo-version pinned to the AddCertificate/
AddSignature commit, ahead of the next tagged release.

Tests added at the bmc dispatch layer and the redfishwrapper layer
(new Dell SecureBootDatabases/db fixtures, named to match
virtualmedia_collection.json's <resource>_collection.json
convention), including a not-found case when the requested database
isn't present in the collection.
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 2, 2026
Adds SecureBootAction (enable/disable) and SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK) to bmc.Action, wired
into rufio's Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/
ResetSecureBootKeys (bmc-toolbox/bmclib#457, not yet merged).

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable
there once bmclib#457 lands - e.g. resetting a Dell node to SetupMode
right before the PXE boot attempt that provisioning depends on.

Verified via the existing fake-provider-backed TestTaskReconcile
harness (registrar dispatch through a real bmclib.Client, no live BMC
needed) - new cases cover success/failure for both actions. go.mod/
go.sum intentionally left uncommitted: they carry a local
replace directive pointing bmc-toolbox/bmclib/v2 at a local checkout
of the unmerged bmclib#457 branch, needed to build this locally before
that PR merges.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 3, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 3, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 11, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 24, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 29, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 29, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 29, 2026
Moves off the pseudo-version pinned when this PR was opened (before
bmc-toolbox/bmclib#457/tinkerbell#460 merged) to bmc-toolbox/bmclib's current HEAD, so
this PR's bmclib requirement matches the other open rufio BMC-action PRs
exactly and doesn't produce a go.mod/go.sum diff when they're combined.

Signed-off-by: Mickael Canevet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 30, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 30, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Sep 30, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
mcanevet added a commit to mcanevet/tinkerbell that referenced this pull request Oct 14, 2026
Adds SecureBootAction (enable/disable), SecureBootResetKeysAction
(ResetAllKeysToDefault/DeleteAllKeys/DeletePK), SecureBootDatabaseResetKeysAction
(reset a single key database, e.g. "db" or "KEK", without touching PK), and
SecureBootCertificateImportAction (import a certificate into a single key
database, referencing the PEM via a ConfigMap key rather than inlining it -
a certificate isn't secret, but is typically too large and too reused across
Workflows to put directly into an Action) to bmc.Action, wired into rufio's
Task reconciler via bmclib's GetSecureBoot/SetSecureBoot/ResetSecureBootKeys/
ResetSecureBootDatabaseKeys/ImportSecureBootCertificate.

Since bmc.Action is reused as Workflow.spec.bootOptions.custombootConfig's
preparingActions/postActions element type, this also becomes usable there
directly - e.g. resetting a node to Setup Mode right before the PXE boot
attempt that provisioning depends on, then re-enabling SecureBoot once the
OS install is done. That's the motivating use case: enrolling a SecureBoot
trust anchor at provisioning time, while the machine is still under
Tinkerbell's control, rather than relying on boot-time enrollment which
happens after the Workflow has already finished.

This depended on bmc-toolbox/bmclib#457 and tinkerbell#460, which add the underlying
support to bmclib itself. Both have since merged upstream, so go.mod/go.sum
now pin github.com/bmc-toolbox/bmclib/v2 to a pseudo-version of the merged
commit rather than a temporary fork replace - the same pattern already used
elsewhere in this project's go.mod (e.g. jaypipes/ghw, grpc-ecosystem/go-grpc-prometheus,
protobuf). This pin can be swapped for a tagged bmclib release once one is cut.

Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants