Skip to content

Adds TLS redis configuration support for encryption-at-rest enabled redis instances #88

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

Closed
wants to merge 1 commit into from

Conversation

validkeys
Copy link

What Changed & Why

For my deploy process I'm tunnelling through an EC2 instance to an elasticache redis cluster with encryption-at-rest enabled. In order to connect to ssl redis instances, i need to be able to specify the tls configuration options for ioredis.

PR Checklist

  • Add tests
  • Add documentation
  • Prefix documentation-only commits with [DOC]

@validkeys
Copy link
Author

The failed test above is due to yarn and node 4 having a conflict about "let". Appears unrelated to my code

Copy link
Contributor

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

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

Looks good to me. 👍

@ghedamat
Copy link
Contributor

@validkeys sorry for being so late here,
do you have a sec to look at the fail (even though is unrelated to your code?) if not I can tryt o make some time later this week

thanks again!

@dadamschi
Copy link

dadamschi commented Jan 31, 2020

@validkeys FWIW was not working for azure-redis using port 6380 or non-default port.

We forked https://github.com/validkeys/ember-cli-deploy-redis, updated ioredis to ^4.15.1 and added support for rediss and it works on port 6380.

@ghedamat @lukemelia

@lukemelia
Copy link
Contributor

@dadamschi @validkeys FYI, I've now upgraded this addon to the most recent ioredis release. If either of you are interested in adding TLS configuration support, feel free to revive this PR or open a new one.

@nbibler
Copy link

nbibler commented Nov 4, 2020

My understanding of ioredis seems to be that if the URL uses the rediss:// protocol, it will automatically setup and use TLS. If that's correct, then seemingly we can modify the Regex to allow for the additional s here:

var redisUrlRegexp = new RegExp('^redis://');
if (!this.pluginConfig.url.match(redisUrlRegexp)) {
throw new Error(`Your Redis URL appears to be missing the "redis://" protocol. Update your URL to: redis://${this.pluginConfig.url}`);
}

And that should pass through the desire to use a TLS connection to ioredis, right?

@lukemelia
Copy link
Contributor

I believe all the intended functionality of this PR has now been incorporated.

@lukemelia lukemelia closed this Oct 22, 2021
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.

5 participants