heroku/heroku-buildpack-redis

Add compatibility w/ interactive commands (e.g. `rails console`)

rofreg opened this issue · 4 comments

The current buildpack appears to be incompatible with interactive commands like bin/start-stunnel rails console. I'd love to add support for this via an optional flag or environment variable, so that you can have secure interactive sessions when accessing a production environment.

I'll probably take a swing at this later and try to submit a PR – just wanted to open an issue first in case I was missing something :)

Does anyone know if there is an environment variable that could be used to detect this state? I hacked this together in my fork by adding a bin/run-stunnel command but running heroku run bin/run-stunnel COMMAND seems awkward

I'm very interested in this, encrypting traffic while inspecting production data via rails console is a critical function.

I didn't see a pull request and I took a look a the fork by @webandtech but didn't see any code for this there as alluded to above. While adding a separate bin/run-stunnel may be a bit awkward code-wise, I think the solution is elegant enough for the few times you need it. This, combined with a custom process in your Procfile (console: bin/run-stunnel bundle exec rails console) would make connecting and encrypting the irb traffic really easy (heroku run console).

I'm not a stunnel expert by any stretch, anyone have an idea of the easiest way to get a preliminary PR together?

Hello,

We have implemented our own wrapper script, with-stunnel, based on the start-stunnel script. You can use it with the buildpack. See the script here- https://gist.github.com/kjkuan/5c9af5b2592048551654bf0c35d48616

I believe our wrapper solves this issue and #13 as well.
Although behavior-wise it might not be backward-compatible with start-stunnel, would there be any interest in adopting this implementation for the buildpack?