Skip to content

ADR 0015: Keep the salt fallback, and generate a key at install - #14

Merged
ericmann merged 1 commit into
mainfrom
salt-fallback-adr
Oct 28, 2026
Merged

ericmann merged 1 commit into
mainfrom
salt-fallback-adr

Conversation

@ericmann

Copy link
Copy Markdown
Owner

Records the decision behind the reply on #66187 comment:23 and comment:24: rotating the salts makes every secret unreadable on a site that derives its key from LOGGED_IN_KEY and LOGGED_IN_SALT.

What it guarantees

Nothing in src/ changes. The ADR settles what the plugin and core do about the fallback, so the next reviewer who asks to remove it gets the reasoning:

  • The fallback stays. Removing it makes wp_set_secret() return WP_Error on nearly every 7.2 site, and consumers would store the credential as a plaintext option instead.
  • New installs get a dedicated key. setup-config.php writes a base64-encoded random 32-byte WP_SECRETS_KEY after the salts, outside their "change these at any time" docblock group. Core ticket: #66399.
  • wp-config-sample.php gets no placeholder. The keyring hashes any WP_SECRETS_KEY string, so a placeholder would become a public key on every hand-edited install that left it alone.
  • No CSPRNG, no key. The site falls back to the salts rather than a weaker key.
  • Site Health is handled by #66380 (PR 14847), which the plugin takes from core once it lands.

The consequences section names what remains: existing sites and other installers keep the fallback, wp secret rotate is the only way off it until core has a public path in 7.3, and the dev note has to warn about salt rotation.

Testing

  • npm run build in site/ renders /decisions/0015-…/.

Rotating the salts locks every secret on a site that derives its key from
LOGGED_IN_KEY and LOGGED_IN_SALT, as #66187 comment:23 raised and
comment:24 confirmed on 7.2-beta2. ADR 0015 keeps the fallback, since
removing it pushes consumers back to plaintext options, and records the
fix for new installs: setup-config.php writes a dedicated WP_SECRETS_KEY,
proposed in core as #66399. It also records why wp-config-sample.php gets
no placeholder, and how an existing site moves off the fallback with
wp secret rotate.
@ericmann
ericmann merged commit 9b8e0f9 into main Oct 28, 2026
17 checks passed
@ericmann
ericmann deleted the salt-fallback-adr branch October 28, 2026 18:18
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.

1 participant