Add a Slash command to easily share secrets on Slack.
There are three components to using this Webtask
At RedisLabs setup an account (or use existing), then create a new Redis database (free tier should be more than enough).
Once setup, you'll need to grab the Endpoint
from the configuration. You'll also want to setup Access Control & Security
with a Redis Password
. You'll need both of these in the next step.
Setup a new Webtask. For secrets
configuration add the following:
REDIS_URL
: the URL from the endpoint in step 2, without the port.REDIS_PASSWORD
: the password you setup in step 2.
For meta
configuration add the following:
REDIS_PORT
: the port from the URL endpoint in step 2.SLECRET_LIFESPAN
: (optional) number of seconds to retain slecrets (defaults to300
)
Copy and paste the contents from slectret.js
into the Webtask editor.
In Slack, create a new Slash Command:
Command
:/slecret
URL
:<webtask-url>
Method
:POST
The other settings can be configured to your personal preferences.
Once setup, the command can be run in Slack like so:
/slecret <something-private>
This will generate an encrypted store of <something-private>
with the expiration set by SLECRET_LIFESPAN
(or default 300s/5m). A link will be sent back which you can then share.