-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 support for Redis with custom CA. #309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look sensible to me. One small nit and it should be good to merge.
Could you also add an entry to the CHANGELOG please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and congrats on your first contribution! 🎉
pkg/sessions/redis/redis_store.go
Outdated
} | ||
|
||
if opts.RedisCAPath != "" { | ||
rootCAs, _ := x509.SystemCertPool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not read the error here? I am generally against ignoring errors from external packages
Co-Authored-By: Joel Speed <Joel.speed@hotmail.co.uk>
pkg/apis/options/sessions.go
Outdated
@@ -27,4 +27,6 @@ type RedisStoreOptions struct { | |||
UseSentinel bool `flag:"redis-use-sentinel" cfg:"redis_use_sentinel" env:"OAUTH2_PROXY_REDIS_USE_SENTINEL"` | |||
SentinelMasterName string `flag:"redis-sentinel-master-name" cfg:"redis_sentinel_master_name" env:"OAUTH2_PROXY_REDIS_SENTINEL_MASTER_NAME"` | |||
SentinelConnectionURLs []string `flag:"redis-sentinel-connection-urls" cfg:"redis_sentinel_connection_urls" env:"OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS"` | |||
RedisCAPath string `flag:"redis-ca-path" cfg:"redis_ca_path" env:"OAUTH2_PROXY_REDIS_CA_PATH"` | |||
RedisInsecureTLS bool `flag:"redis-insecure-tls" cfg:"redis_insecure_tls" env:"OAUTH2_PROXY_REDIS_INSECURE_TLS"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had left a comment here, could I just get an ack that you saw it before I approve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment was about main.go, although you're right that both files should match :). Now it's fixed in here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thank you for changing that up, you are right, my comment was in the wrong place 🤦♂
I'm happy to merge now 😄 Thanks for your work on this @lleszczu
Description
This PR adds support for custom CA for connecting to Redis cache.
Motivation and Context
When running clusters with custom CA for issuing internal certificates redis certificate has to be added to oauth2_proxy, so it can connect to cache.
How Has This Been Tested?
Oauth2_proxy configured to connect to redis configured with custom ca.
Checklist: