Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Authentication to Redis #2222

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Add Authentication to Redis #2222

merged 2 commits into from
Jan 6, 2025

Conversation

PooyaRaki
Copy link
Contributor

Summary

This PR adds authentication support for Redis in the application. It configures Redis connections to include authentication credentials, ensuring secure access to the Redis instance

Changes

  • Updating the Redis client configuration to include user and pass.
  • Adding environment variables to manage Redis authentication securely.
  • Refactoring the Redis service for compatibility with the new authentication mechanism.

@PooyaRaki PooyaRaki marked this pull request as ready for review December 24, 2024 14:13
@PooyaRaki PooyaRaki requested a review from a team as a code owner December 24, 2024 14:13
@PooyaRaki PooyaRaki linked an issue Dec 24, 2024 that may be closed by this pull request
Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also be setting these values in Docker/the CI?

What do you think about also including them in the example file?

Comment on lines 310 to 311
user: process.env.REDIS_USER || undefined,
pass: process.env.REDIS_PASS || undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are undefined by default.

Suggested change
user: process.env.REDIS_USER || undefined,
pass: process.env.REDIS_PASS || undefined,
user: process.env.REDIS_USER,
pass: process.env.REDIS_PASS,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done
9e76bd1

Comment on lines 6 to 7
REDIS_USER = undefined,
REDIS_PASS = undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are undefined by default.

Suggested change
REDIS_USER = undefined,
REDIS_PASS = undefined,
REDIS_USER,
REDIS_PASS,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done
9e76bd1

Comment on lines 207 to 208
user: process.env.REDIS_USER || undefined,
pass: process.env.REDIS_PASS || undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are undefined by default.

Suggested change
user: process.env.REDIS_USER || undefined,
pass: process.env.REDIS_PASS || undefined,
user: process.env.REDIS_USER,
pass: process.env.REDIS_PASS,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done
9e76bd1

@PooyaRaki
Copy link
Contributor Author

PooyaRaki commented Jan 3, 2025

Should we also be setting these values in Docker/the CI?

What do you think about also including them in the example file?

@iamacook Well, since we haven't decided to enable authentication I haven't included them in the compose file yet.
I’ll add them to the sample file, thanks for pointing this out!

Edit: Sample file updated
9e76bd1

@PooyaRaki PooyaRaki requested a review from iamacook January 6, 2025 09:24
@PooyaRaki PooyaRaki merged commit efdf651 into main Jan 6, 2025
20 checks passed
@PooyaRaki PooyaRaki deleted the redisAuth branch January 6, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Redis Authentication mechanism
2 participants