Skip to content

fix(openid-connect): encrypt session.redis.password at rest#13389

Open
shreemaan-abhishek wants to merge 1 commit into
apache:masterfrom
shreemaan-abhishek:fix/openid-connect-redis-password-encrypt
Open

fix(openid-connect): encrypt session.redis.password at rest#13389
shreemaan-abhishek wants to merge 1 commit into
apache:masterfrom
shreemaan-abhishek:fix/openid-connect-redis-password-encrypt

Conversation

@shreemaan-abhishek
Copy link
Copy Markdown
Contributor

Description

The Redis-backed session storage introduced in 3.16.0 added a session.redis.password field on the openid-connect plugin schema. Unlike client_secret, this field was not part of encrypt_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.password under the same data-encryption path that already covers client_secret and client_rsa_private_key. No schema or API surface changes are required, only the encryption metadata.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes

  • apisix/plugins/openid-connect.lua: add "session.redis.password" to encrypt_fields.
  • t/plugin/openid-connect2.t: new TEST 21 that creates a route with session.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 for client_rsa_private_key).

Checklist

  • I have rebased to the latest master.
  • I have added tests to cover my changes.
  • I have updated the documentation (no user-facing doc changes; the field is unchanged from the user's perspective).

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`.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant