Skip to content

fix: key the Secrets Manager cache by the username and password JSON keys - #259

Merged
aaron-congo merged 1 commit into
mainfrom
fix/secrets-cache-key-json-keys
Dec 2, 2026
Merged

aaron-congo merged 1 commit into
mainfrom
fix/secrets-cache-key-json-keys

Conversation

@aaron-congo

Copy link
Copy Markdown
Contributor

Summary

Problem

The Secrets Manager plugin caches the username and password it reads from a secret, keyed by the secret ID, region, endpoint and AWS credentials. The cached entry holds the fields picked with secret_username_key and secret_password_key, but those two settings were not part of the key.

Description

Change

  • SecretsManagerPlugin.cache_key now includes the username and password JSON key names. The cached entry and the in-flight fetch are both looked up by this key.
  • The key is now a frozen array instead of a colon-joined string. Secret ARNs, endpoint URLs and JSON key names can contain colons, so joining them could make two different keys equal. Each part is a frozen copy, so later changes to a configured string cannot change a stored key.
  • Updated the cache key description in the configuration-assistant skill.

Behavior change

  • Configurations that read the same secret with different JSON keys now each fetch and cache their own entry.
  • Configurations with identical settings still share one entry and one fetch.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…keys

A cached secret entry holds the username and password picked with one
configuration's secret_username_key and secret_password_key, but the cache
key left them out. Two configurations reading different users from the same
secret (for example an app user and a migration user) shared one entry, so
the second connected as the first's database user. They also shared an
in-flight fetch.

The cache key now includes both JSON key names. It is also built as a frozen
array of frozen strings instead of a colon-joined string, so values that
contain a colon (ARNs, endpoint URLs, JSON key names) can no longer make two
different keys equal.
@aaron-congo
aaron-congo requested a review from a team as a code owner December 2, 2026 20:44
@aaron-congo
aaron-congo merged commit 3452ded into main Dec 2, 2026
23 checks passed
@aaron-congo
aaron-congo deleted the fix/secrets-cache-key-json-keys branch December 2, 2026 22:35
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