Repository navigation
PM-6691: connect identity caches to encrypted Valkey - #64
Merged
Merged
Conversation
jmgasper
marked this pull request as ready for review
November 9, 2026 02:14
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.
Dev identity's authorization store still targets unencrypted Redis OSS 6.2.6
apicache. The Nest cache also supplies the legacystoreoption, which Nest cache manager v3 ignores. This change makes both use a sharedREDIS_URLconfiguration, supports verified TLS throughrediss://, and replaces the obsolete cache adapter with the supported Keyv Redis store.REDIS_URLtakes precedence over legacy host/port. TLS verifies certificates/hostnames and requires TLS 1.2 or later. The Nest cache checks connectivity at startup; authorization keys, JSON values, and the 90-day TTL are preserved. Cache-manager entries use millisecond TTLs and are now shared across tasks.Dev preparation completed
identity-api-v6-dev-cache: Valkey 9.1, onecache.t4g.micro, cluster mode disabled, encryption at rest, required TLS, and seven-day backups.pm-6691-apicache-20261109. A disposable VPC validation task verified TLS PING, synthetic write/read/TTL/delete, and plaintext rejection; 12 keys remained before/after./config/identity-api-v6/appvar/REDIS_URLversion 1 pointing torediss://master.identity-api-v6-dev-cache.056cmt.use1.cache.amazonaws.com:6379.identity-api-v6:150, retaining the exact current image digest. The binding rollout completed with one healthy task and HTTP 200 from the public identity health check. That image ignoresREDIS_URLand continues using the unchanged legacy host/port.Deployment gate
Draft: do not merge until the final state check and cutover window are ready. Merging to
developdeploys automatically. A restored snapshot does not replicate subsequent writes or revocations. Pause authorization mutations, verify/refresh the replacement state, drain old writers during deployment, then test the identity flows. Rolling back after new writes also requires reconciling state; simply returning to the old cache can resurrect revoked sessions.See the migration runbook for cutover, validation, and rollback. Deleting the old cache is a later step.
Validation
All PR checks pass: CircleCI build #206, CodeQL, and Trivy.
26 Redis configuration/auth-store unit tests pass.
Disposable Redis integration: four plaintext cases and five TLS cases pass, including cross-instance sharing, millisecond expiry, authorization TTLs, unavailable-cache startup failure, and rejection of a wrong-hostname certificate by both clients.
Authorization service/controller and email-change suites: 63 tests pass.
Build, changed-file ESLint/Prettier, and five dependency compatibility tests pass.
Broader checks have existing failures reproduced on unchanged
develop: the same 19 auth-flow test failures, identical TypeScript diagnostics, and the same 6,723 repository-wide lint errors. No new diagnostics were introduced.Tracks PM-6691.