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

Support SSL and AUTH for redis #717

Merged
merged 32 commits into from
Nov 22, 2024

Conversation

munishchouhan
Copy link
Member

This PR will add:

  1. enable ssl for redis rediss:// protocol
  2. and password if auth is enabled

Signed-off-by: munishchouhan <[email protected]>
@munishchouhan munishchouhan linked an issue Oct 24, 2024 that may be closed by this pull request
@munishchouhan munishchouhan self-assigned this Oct 24, 2024
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
@munishchouhan munishchouhan marked this pull request as draft October 24, 2024 08:59
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
@munishchouhan
Copy link
Member Author

Tested locally with ssl and auth and its working successfully
Testing now in dev

@munishchouhan
Copy link
Member Author

so after digging i found that, jedispool is working with ssl and auth, error is coming from SpillwayRateLimiter
I am looking into it

redis.clients.jedis.exceptions.JedisDataException: EXECABORT Transaction discarded because of: NOAUTH Authentication required.
	at redis.clients.jedis.Protocol.processError(Protocol.java:105)
	at redis.clients.jedis.Protocol.process(Protocol.java:162)
	at redis.clients.jedis.Protocol.read(Protocol.java:221)
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:351)
	at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:322)
	at redis.clients.jedis.TransactionBase.exec(TransactionBase.java:168)
	at redis.clients.jedis.Transaction.exec(Transaction.java:80)
	at com.coveo.spillway.storage.RedisStorage.addAndGet(RedisStorage.java:112)
	at com.coveo.spillway.Spillway.getExceededLimits(Spillway.java:215)
	at com.coveo.spillway.Spillway.tryCall(Spillway.java:154)
	at com.coveo.spillway.Spillway.tryCall(Spillway.java:142)
	at io.seqera.wave.ratelimit.impl.SpillwayRateLimiter.acquirePull(SpillwayRateLimiter.groovy:84)

@munishchouhan
Copy link
Member Author

munishchouhan commented Oct 24, 2024

so after digging i found that, jedispool is working with ssl and auth, error is coming from SpillwayRateLimiter I am looking into it

redis.clients.jedis.exceptions.JedisDataException: EXECABORT Transaction discarded because of: NOAUTH Authentication required.
	at redis.clients.jedis.Protocol.processError(Protocol.java:105)
	at redis.clients.jedis.Protocol.process(Protocol.java:162)
	at redis.clients.jedis.Protocol.read(Protocol.java:221)
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:351)
	at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:322)
	at redis.clients.jedis.TransactionBase.exec(TransactionBase.java:168)
	at redis.clients.jedis.Transaction.exec(Transaction.java:80)
	at com.coveo.spillway.storage.RedisStorage.addAndGet(RedisStorage.java:112)
	at com.coveo.spillway.Spillway.getExceededLimits(Spillway.java:215)
	at com.coveo.spillway.Spillway.tryCall(Spillway.java:154)
	at com.coveo.spillway.Spillway.tryCall(Spillway.java:142)
	at io.seqera.wave.ratelimit.impl.SpillwayRateLimiter.acquirePull(SpillwayRateLimiter.groovy:84)

solved it by injecting the JedisPool in SpillWayStorageFactory

@munishchouhan
Copy link
Member Author

Tested successfully with local redis and elasticcache redis with ssl and auth

Signed-off-by: munishchouhan <[email protected]>
@munishchouhan munishchouhan marked this pull request as ready for review October 24, 2024 16:52
@pditommaso
Copy link
Collaborator

Can be tested one more time, and merge?

@munishchouhan
Copy link
Member Author

Can be tested one more time, and merge?

ok sure

@munishchouhan
Copy link
Member Author

Tested successfully in Dev with 10 builds and transfers

Signed-off-by: munishchouhan <[email protected]>
@pditommaso
Copy link
Collaborator

@munishchouhan ok, let's update the configation.md docs and merge it

Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
@munishchouhan
Copy link
Member Author

@munishchouhan ok, let's update the configation.md docs and merge it

done

Signed-off-by: munishchouhan <[email protected]>
@pditommaso pditommaso merged commit bf63599 into master Nov 22, 2024
3 checks passed
@pditommaso pditommaso deleted the 713-enhancement-redis-support-encryption-in-transit branch November 22, 2024 13: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.

[Enhancement] - Redis Support encryption in transit
2 participants