Skip to content

fix(controller): create a missing signing key - #112

Merged
retr0h merged 1 commit into
mainfrom
fix/secret-create-missing-key
Nov 28, 2026
Merged

retr0h merged 1 commit into
mainfrom
fix/secret-create-missing-key

Conversation

@retr0h

@retr0h retr0h commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Depends: osapi-io/osapi#1708

Specs: osapi-io/specs#708

osapi#1708 (for osapi#1666) makes osapi client secret update of a key that is not there a 404, and adds osapi client secret create. The controller role's vault task wrote each signing key with update, also when the vault did not hold it. After #1708 that first write fails.

The task now runs create when reveal fails (the vault does not hold the key) and update when the vault holds a different value. A create of a key with a different value is 409, so it cannot be used for both.

Order: merge right after osapi#1708. Before it, secret create does not exist. After it, without this, a deploy after a teardown fails at the first write.

Checks: just test (ansible-lint production profile, 0 failures; packer fmt).

Not run on the lab yet: it runs after osapi#1708 merges, with just bump controller. A first write after a teardown needs just deploy; I will not run a teardown without the owner.

🤖 Generated with Claude Code

@retr0h retr0h added needs-standards-review The author asks for the independent standards review needs-code-review The author asks for the independent code review labels Nov 28, 2026
@retr0h

retr0h commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Standards review: changes requested.

1 violation.

  1. PR title is 63 characters: fix(controller): write a missing signing key with secret create. Rule: 50 or fewer (the squash merge uses the title). Fix: for example fix(controller): create a missing signing key.

The task, its comment and the Specs link (specs#708) otherwise pass. Note: it must merge right after osapi#1708, as its description says.

@retr0h retr0h removed the needs-standards-review The author asks for the independent standards review label Nov 28, 2026
osapi#1708 makes secret update of a key that is not there a 404, and adds
secret create. The vault task creates a key that the vault does not hold,
and updates a key with a different value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@retr0h retr0h changed the title fix(controller): write a missing signing key with secret create fix(controller): create a missing signing key Nov 28, 2026
@retr0h
retr0h force-pushed the fix/secret-create-missing-key branch from 2ce8b25 to 6701b74 Compare November 28, 2026 01:25
@retr0h retr0h added the needs-standards-review The author asks for the independent standards review label Nov 28, 2026
@retr0h

retr0h commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Standards review: approved. The title is now 45 characters; the task, its comment and the Specs link passed my earlier review.

@retr0h retr0h added standards-reviewed An independent reviewer checked this PR against the standards and removed needs-standards-review The author asks for the independent standards review labels Nov 28, 2026
@retr0h

retr0h commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Code review: approved

Checked: reveal failing (rc != 0) means the vault has no key, so create is right; a present key with a different value takes update (create of a different value is 409 in osapi#1708); the argv Jinja expression is valid; a failed reveal for another reason (controller down) fails the create loudly instead of silently. Depends on osapi#1708 (not merged), as the body says; merge right after it.

@retr0h retr0h added code-reviewed An independent reviewer checked correctness, bugs and edge cases needs-standards-review The author asks for the independent standards review needs-code-review The author asks for the independent code review standards-reviewed An independent reviewer checked this PR against the standards and removed needs-code-review The author asks for the independent code review standards-reviewed An independent reviewer checked this PR against the standards code-reviewed An independent reviewer checked correctness, bugs and edge cases needs-standards-review The author asks for the independent standards review labels Nov 28, 2026
@retr0h
retr0h merged commit 932ce02 into main Nov 28, 2026
7 checks passed
@retr0h
retr0h deleted the fix/secret-create-missing-key branch November 28, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-reviewed An independent reviewer checked correctness, bugs and edge cases kind/ansible kind/yaml standards-reviewed An independent reviewer checked this PR against the standards

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant