# Support for SSL configuration in cable.yml

**URL:** <https://discuss.rubyonrails.org/t/support-for-ssl-configuration-in-cable-yml/72669>\
**Category:** rubyonrails-core\
**Created:** [July 31, 2017, 10:49am UTC](https://discuss.rubyonrails.org/t/support-for-ssl-configuration-in-cable-yml/72669 "2017-07-31T10:49:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pw1](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@pw1](https://discuss.rubyonrails.org/u/pw1)\
**Post date:** [July 31, 2017, 10:49am UTC](https://discuss.rubyonrails.org/t/support-for-ssl-configuration-in-cable-yml/72669/1 "2017-07-31T10:49:58Z")

</div>

Hello,

AFAIK when you intend to run a **redis connection via SSL** you have to overwrite

`ActionCable::SubscriptionAdapter::Redis.redis_connector`. My current solution

looks something like:

```ruby

cert = File.read config[:ssl_params][:cert]

key = File.read config[:ssl_params][:key]

config = config.merge(

  ssl_params: {

    ca_file: config[:ssl_params][:ca_file],

    cert: OpenSSL::X509::Certificate.new(cert),

    key: OpenSSL::PKey::RSA.new(key)

  }

)

```

which lives in an initializer.

I’m wondering if a change to the redis subscription adapter, which would allow a cable.yml configurations like:

```ruby

production:

  adapter: redis

  url: rediss://redis-cluster

  ssl_params:

    ca_file: /certs/ca.pem

    cert: /certs/cert.pem

    key: /certs/key.pem

```

would be a welcome addition to the rails/action-cable? If that’s the case I’d be happy to start on a patch. If this is more

of an edge case and the change is not welcome, I understand but would appreciate some feedback on my current approach

and would like to submit a patch to at least mention this option in the [documentation](http://edgeguides.rubyonrails.org/action_cable_overview.html).

Thanks for your time,

Have a great week.
