You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by Luke Cwik <lc...@google.com> on 2021/11/08 23:39:33 UTC

Re: Connect to Redis with SSL

-dev@beam.apache.org

It looks like Jedis relies on Java's default SSLSocketFactory[1] if ssl is
enabled in the RedisConnectionConfiguration[2].

Have you been able to update Java's default trust store with additional
certificate information?

You can use a JVM initializer to update a worker's properties at runtime.
See this stackoverflow question for a similar question[3] about SSL
handshake issues with Apache Beam and how they were overcome. There is
another similar issue with ElasticSearchIO[4] that has been asked in the
past as well about updating the truststore.

1:
https://github.com/redis/jedis/blob/253664ff1eac37fdab7ea3e5e738a11f34f8f410/src/main/java/redis/clients/jedis/DefaultJedisSocketFactory.java#L86
2:
https://github.com/apache/beam/blob/2f2e4fac9c9814ecba2e34d3700414fc4bc9c85d/sdks/java/io/redis/src/main/java/org/apache/beam/sdk/io/redis/RedisConnectionConfiguration.java#L48
3: https://stackoverflow.com/a/66822131
4: https://www.mail-archive.com/user@beam.apache.org/msg05523.html

On Mon, Nov 8, 2021 at 1:07 PM Sahil Modak <sm...@paloaltonetworks.com>
wrote:

> Hi,
>
> We have a beam pipeline in Java, which is supposed to read things from
> redis. I am trying to use RedisIO class :
> https://beam.apache.org/releases/javadoc/2.3.0/org/apache/beam/sdk/io/redis/RedisIO.html
>
> However, the challenge I am facing here is redis is TLS enabled and I need
> to pass some SSLContext (certificate information) to make sure that I am
> able to fetch stuff from redis. Currently, I see that the options available
> when applying the Ptransforms with RedisIO are endpoints, auth string,
> prefix information, etc. however I am unable to figure out a way to pass
> the certificate information. Is there a way I can do this ?
>
> Regards,
> Sahil
>