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

check-redis.sh script does not account for "rediss://" scheme #248

Closed
irh-hdh opened this issue Oct 19, 2024 · 1 comment
Closed

check-redis.sh script does not account for "rediss://" scheme #248

irh-hdh opened this issue Oct 19, 2024 · 1 comment

Comments

@irh-hdh
Copy link
Contributor

irh-hdh commented Oct 19, 2024

OAuth2-Proxy Version

helm chart version 7.7.27

Setup

Oauth2-proxy with redis session storage using the subchart. TLS enabled.

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: true
  tls:
    enabled: true
    authClients: false
sessionStorage:
  type: redis
  redis:
    existingSecret: "secret-name"
    passwordKey: "redis-password"
    clientType: "standalone"
    standalone:
      connectionUrl: "rediss://${release_name}-redis-master.${release_namespace}.svc:6379"

The connectionUrl parameter defaults to a redis:// scheme and must be overridden when using TLS in order to avoid Error accepting a client connection: error:0A00010B:SSL routines::wrong version number in redis.

Expected Behaviour

The wait-for-redis container should detect the redis instance.

Current Behaviour

If using TLS, the wait-for-redis container does not detect the redis instance, because the function parsing the URL on which the nc command is executed currently accounts for redis:// scheme only:

parse_and_check() {
    url=$1
    clean_url=${url#redis://}
    host=$(echo $clean_url | cut -d':' -f1)
    port=$(echo $clean_url | cut -d':' -f2)
    check_redis $host $port
}
@pierluigilenoci
Copy link
Contributor

Fixed by #249

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

No branches or pull requests

2 participants