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 TLS profiles for easier configuration #1441

Merged
merged 1 commit into from
Oct 13, 2021
Merged

Add TLS profiles for easier configuration #1441

merged 1 commit into from
Oct 13, 2021

Conversation

GertSallaerts
Copy link
Contributor

@GertSallaerts GertSallaerts commented Oct 6, 2021

Inspired by seeing this in MySQL libraries (mysql and mysql2), this PR adds support for specifying a TLS profile that takes care of configuring for example redis.com's certificate authority.

@luin
Copy link
Collaborator

luin commented Oct 6, 2021

Thanks for the PR!

I subscribed to the flex plan and created a database. However, when I wanted to connect to it with the following code:

const client = new Redis({
  host: "redis-xxx.us-east-1-mz.ec2.cloud.rlrcp.com",
  password: "xxxxxx",
  port: 13342,
  tls: 'RedisCloudFlexible',
});

I got the following error:

Error: unable to get issuer certificate

Did I miss anything?

@GertSallaerts
Copy link
Contributor Author

I'm afraid I only have access to the fixed plan right now and can't reproduce your error on our databases on there. Looks like the flex plans are charged monthly, otherwise I'd make a quick test subscription myself 😅

@GertSallaerts
Copy link
Contributor Author

@luin I've been in contact with Redis.com and got a flexible suscription to test with. Turns out the flexible CA from their site was missing a part of the certificate chain. They've sent me the correct CA now and I've updated the PR with it. On my own flexible subscription it is working fine now.

@luin luin merged commit 4680211 into redis:master Oct 13, 2021
@luin
Copy link
Collaborator

luin commented Oct 13, 2021

Awesome! Thanks for the contribution 🥳

ioredis-robot pushed a commit that referenced this pull request Oct 13, 2021
# [4.28.0](v4.27.11...v4.28.0) (2021-10-13)

### Features

* **tls:** add TLS profiles for easier configuration ([#1441](#1441)) ([4680211](4680211))
@ioredis-robot
Copy link
Collaborator

🎉 This PR is included in version 4.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@GertSallaerts GertSallaerts deleted the feature/tls-profiles branch October 13, 2021 13:29
@silentroach
Copy link

silentroach commented Oct 13, 2021

but why?

looks like it is a bad idea to store certificates inside package, to maintain it and make the certificate list dependant on package version

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this pull request Mar 1, 2024
# [4.28.0](redis/ioredis@v4.27.11...v4.28.0) (2021-10-13)

### Features

* **tls:** add TLS profiles for easier configuration ([#1441](redis/ioredis#1441)) ([4680211](redis/ioredis@4680211))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants