Skip to content

key rotation: fix scope of the NetBox step - #1154

Merged
berendt merged 1 commit into
mainfrom
docs/key-rotation-netbox-scope
Nov 24, 2026
Merged

berendt merged 1 commit into
mainfrom
docs/key-rotation-netbox-scope

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

The section "Rotating the key in the NetBox (MetalBox)" of the operator key rotation guide says that replacing operator_authorized_keys in a device's local context "only affects systems that are newly provisioned via the MetalBox afterwards" and can be performed at any time.

That is not the case today. The inventory reconciler exports each device's rendered config_context, into which NetBox merges local_context_data, as host variables:

So the key is also the operator_authorized_keys host variable of every such device, and a later osism apply operator uses it unless the configuration repository sets the variable with higher precedence.

This change says so, makes the "at any time" statement conditional on the configuration repository setting the variable, and names the NetBox field correctly (local_context_data, not local_context).

🤖 Generated with Claude Code

The section "Rotating the key in the NetBox (MetalBox)" said that
replacing operator_authorized_keys in a device's local context "only
affects systems that are newly provisioned via the MetalBox afterwards"
and can be performed at any time.

That is not the case. The inventory reconciler exports each device's
rendered config_context, into which NetBox merges local_context_data,
as host variables. The key is therefore also the
operator_authorized_keys host variable of every such device, and a
later osism apply operator uses it unless the configuration repository
sets the variable with higher precedence.

Say so, and make the "at any time" statement conditional on the
configuration repository setting the variable. Also name the NetBox
field correctly (local_context_data, not local_context).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.07s
✅ JSON jsonlint 4 0 0 0.13s
✅ JSON prettier 4 0 0 0.35s
✅ JSON v8r 4 0 0 9.23s
✅ MARKDOWN markdownlint 184 0 0 2.91s
✅ MARKDOWN markdown-table-formatter 184 0 0 0.39s
✅ REPOSITORY betterleaks yes no no 0.8s
✅ REPOSITORY checkov yes no no 17.86s
✅ REPOSITORY git_diff yes no no 0.07s
✅ REPOSITORY secretlint yes no no 1.36s
✅ REPOSITORY trufflehog yes no no 3.4s
✅ SPELL codespell 194 0 0 0.63s
⚠️ SPELL lychee 190 1 0 12.93s
✅ YAML prettier 6 0 0 0.31s
✅ YAML v8r 6 0 0 6.88s
✅ YAML yamllint 6 0 0 0.44s

Detailed Issues

⚠️ SPELL / lychee - 1 error
📝 Summary
---------------------
🔍 Total.........1304
🔗 Unique.........957
✅ Successful....1187
⏳ Timeouts.........0
🔀 Redirected.......1
👻 Excluded.......116
❓ Unknown..........0
🚫 Errors...........1
⛔ Unsupported......1

Errors in docs/guides/developer-guide/style-guide.md
[ERROR] https://wiki.openstack.org/wiki/GitCommitMessages (at 79:1) | Network unreachable. Check internet connection or VPN settings

Hint: Followed 1 redirect. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.2.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,SPELL_CODESPELL,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@ideaship
ideaship marked this pull request as ready for review November 24, 2026 03:10
@ideaship ideaship self-assigned this Nov 24, 2026
@ideaship
ideaship requested a review from berendt November 24, 2026 03:10
@berendt
berendt merged commit 1c10891 into main Nov 24, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Nov 24, 2026
@berendt
berendt deleted the docs/key-rotation-netbox-scope branch November 24, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants