Skip to content

Cache decrypted gateway OAuth secrets per backend - #47413

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/91fa03655f5e233d1649f4c2571c5465dfe57f35
Sep 23, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/91fa03655f5e233d1649f4c2571c5465dfe57f35

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Cache decrypted gateway OAuth secrets per backend

Why

Repeated gateway OAuth credential reads decrypt and deserialize the same unchanged secrets file each time.

What changed

Add a single-entry cache shared by clones of LocalSecretsBackend for GatewayOAuth. Reuse decrypted secrets only when the file path, ciphertext hash, and keyring passphrase hash match, and invalidate the cache after writes. Omit cached credentials from the backend's Debug output.

## Why

Repeated gateway OAuth credential reads decrypt and deserialize the same unchanged secrets file each time.

## What changed

Add a single-entry cache shared by clones of `LocalSecretsBackend` for `GatewayOAuth`. Reuse decrypted secrets only when the file path, ciphertext hash, and keyring passphrase hash match, and invalidate the cache after writes. Omit cached credentials from the backend's `Debug` output.

GitOrigin-RevId: 91fa03655f5e233d1649f4c2571c5465dfe57f35
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/91fa03655f5e233d1649f4c2571c5465dfe57f35 branch from 9a5e540 to 53486e5 Compare September 23, 2026 00:56
@copyberry
copyberry Bot merged commit 53486e5 into main Sep 23, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/91fa03655f5e233d1649f4c2571c5465dfe57f35 branch September 23, 2026 00:56
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant