fix(openid-connect): encrypt session.redis.password at rest#13389
Open
shreemaan-abhishek wants to merge 1 commit into
Open
fix(openid-connect): encrypt session.redis.password at rest#13389shreemaan-abhishek wants to merge 1 commit into
shreemaan-abhishek wants to merge 1 commit into
Conversation
The Redis-backed session storage introduced in 3.16.0 added a `session.redis.password` field. Unlike `client_secret`, this field was not included in `encrypt_fields`, so the Redis password was persisted in plaintext in etcd and surfaced through backups, snapshots, and diagnostic exports. Add `session.redis.password` to `encrypt_fields` so it follows the same encryption path that already protects `client_secret` and `client_rsa_private_key`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Redis-backed session storage introduced in 3.16.0 added a
session.redis.passwordfield on theopenid-connectplugin schema. Unlikeclient_secret, this field was not part ofencrypt_fields, so the Redis password was persisted in plaintext in etcd. That value is also visible in etcd backups, snapshots, and diagnostic exports.This PR brings
session.redis.passwordunder the same data-encryption path that already coversclient_secretandclient_rsa_private_key. No schema or API surface changes are required, only the encryption metadata.Type of change
Changes
apisix/plugins/openid-connect.lua: add"session.redis.password"toencrypt_fields.t/plugin/openid-connect2.t: new TEST 21 that creates a route withsession.storage = "redis"and a Redis password, then asserts the value round-trips plaintext through the Admin API and is stored encrypted in etcd (parallel to the existing TEST 20 forclient_rsa_private_key).Checklist