Skip to content

transit: warn when irreversible config flags cannot be disabled - #32075

Open
SashaMIT wants to merge 1 commit into
hashicorp:mainfrom
SashaMIT:fix/transit-warn-irreversible-config-flags
Open

transit: warn when irreversible config flags cannot be disabled#32075
SashaMIT wants to merge 1 commit into
hashicorp:mainfrom
SashaMIT:fix/transit-warn-irreversible-config-flags

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Summary

transit/keys/<name>/config documents that exportable and allow_plaintext_backup cannot be disabled once set. The write handler already enforces that (it never clears the flags), but a client that POSTs false still gets a successful response with no warning while the policy stays enabled.

An operator can believe they revoked key export or plaintext backup when nothing changed. That is a silent failure on a security-relevant setting, in the same class as ignored key_usages on this endpoint.

Fix

Emit warnings when a disable attempt is ignored:

exportable cannot be disabled once set; the supplied value was ignored
allow_plaintext_backup cannot be disabled once set; the supplied value was ignored

Behavior is unchanged: flags remain one-way. Only the response now surfaces the no-op.

Test plan

  • New test: disable attempts leave flags enabled and return both warnings
  • TestTransit_ConfigSettings, TestTransit_KeyUsagesInConfigResponse, TestTransit_UpdateKeyConfigWithAutorotation pass

Made with Cursor

keys/<name>/config documents that exportable and allow_plaintext_backup
cannot be disabled once set, but a write that supplies false still
returns success with no warning while leaving the flags enabled. An
operator can believe they revoked export or plaintext backup when
nothing changed.

Emit warnings on ignored disable attempts, matching the existing
config-write warning pattern for forced min-version adjustments.
@SashaMIT
SashaMIT requested a review from a team as a code owner August 8, 2026 06:43
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vault-ui Error Error Aug 8, 2026 6:43am

Request Review

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 8, 2026
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deployment failed for project vault-ui with the following error:

The `vercel.json` schema validation failed with the following message: should NOT have additional property `public`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

secret/transit size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant