Skip to content

fix(ironic): tighten get:last_error and clean_steps policies - #2840

Merged
cardoe merged 2 commits into
mainfrom
ironic-policy-tighten
Dec 2, 2026
Merged

cardoe merged 2 commits into
mainfrom
ironic-policy-tighten

Conversation

@cardoe

@cardoe cardoe commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

What does this change do?

Follow-up to #2839, tightening two ironic policy overrides in components/ironic/values.yaml now that each override documents its upstream default.

  • baremetal:node:get:last_error is now the upstream default plus (role:reader and project_id:%(node.lessee)s), the same shape as inventory:get. Previously it allowed admin or service in any project, and any role in the owner or lessee project. Nova's ironic client is admin,service in the owning infra/baremetal project, so it is still covered by the owner clauses.
  • Remove the baremetal:node:set_provision_state:clean_steps override. The upstream default already lets members of the node owner project (the baremetal project the Argo workflow authenticates to) set clean steps, while the override also let an admin in any project do so. disable_cleaning is kept because upstream requires a system-scoped admin, which the workflow doesn't have yet.

Checked with oslo.policy from the 2026.2 image against a node owned by the baremetal project:

caller get:last_error clean_steps (upstream default)
nova (admin,service @ baremetal) allowed allowed
Argo workflow (admin @ baremetal) allowed allowed
lessee reader allowed denied
admin in an unrelated project denied (was allowed) denied (was allowed)

This relies on every node nova or the workflows touch being owned by the baremetal project.

Upgrade impact

  • This change requires operator action to upgrade. If checked, add the
    upgrade-impact label and a release note: run scriv create from the
    repository root and describe the required action in the generated
    changelog.d/ file. See RELEASING.md.

Operator action means anything a deployment has to do beyond a normal resync:
deploy repo or values changes, new or removed secrets, enabling or disabling a
component, or a manual one-time step.

Previously this allowed admin or service in any project, and any role in
the node owner or lessee project. Base it on the upstream default and only
add lessee readers. Nova's ironic client is admin,service in the owning
baremetal project, so it is still covered by the owner clauses.
The upstream default already lets members of the node owner project (the
baremetal project the Argo workflow authenticates to) set clean steps,
while the override also let an admin in any project do so.
disable_cleaning is kept since upstream requires a system-scoped admin.
@cardoe
cardoe added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 336e4d9 Dec 2, 2026
21 checks passed
@cardoe
cardoe deleted the ironic-policy-tighten branch December 2, 2026 15:51
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.

2 participants