Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • A Ahad Mobile
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • holatech
  • Ahad Mobile
  • Merge requests
  • !78

feat(be): connect to redis over tls when REDIS_TLS is true

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Khanh Pham requested to merge feat/be-redis-tls into develop Sep 25, 2026
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 5

Summary

B1 from the infra plan: let be/ reach Redis over TLS, which prod ElastiCache requires (transit_encryption_enabled + AUTH token in infra/modules/app-stack/elasticache.tf).

  • New env REDIS_TLS. true adds tls: {} to the cache client (RedisModule in app.module.ts) and the BullMQ connection (bull.config.ts). Those are the only two production Redis connections.
  • Unset or anything other than true keeps plain TCP, so local, CI and staging (LocalStack Redis has no TLS) are unchanged.

Verification

  • redis.config.spec.ts: switch on/off for both configs; mutation-checked.
  • Live check against a local redis:7 with TLS-only + requirepass: with REDIS_TLS=true the cache client PINGs and BullMQ adds a job; without it both fail with "Connection is closed".
  • tsc/eslint clean on touched files.
  • Codex adversarial review: 2 rounds. Round 1 flagged the opt-in *.postgres.spec.ts suites' direct ioredis clients; rebutted (local-only tests, never pointed at ElastiCache) and accepted in round 2.

Deploy note

Prod app-env secret must set REDIS_TLS=true and REDIS_PASSWORD = the ElastiCache AUTH token. Staging needs nothing.

🤖 Generated with Claude Code

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feat/be-redis-tls