Code Monkey home page Code Monkey logo

slack-secret's Introduction

slack-secret

Send secure messages in Slack

js-standard-style

Add to Slack

Description

A Slack slash command that sends a secure message in slack channels.

It uses sharelock.io to encrypt the message so that it can only be read by the people in the Slack channel that the message was posted in.

Screenshot

Tech

  • Slack api to create the slash command.
  • Webtask - Cool serverless architecture.
  • Sharelock - Uses an unofficial and undocumented api to create a link to a message that can only be read by the people in the slack channel the message was created in.
  • OAuth - Used to create the "Add to slack" button.

Use

You can just add the app to slack and use it right away in Slack:

/secret [some-secret]

Or you can host your own webtask instance and run this yourself. To do that, you first need to create a webtask account and use the webtask CLI to create a new app.

Then to push changes to the app you need to

$ npm run build
$ npm run deploy

The build step inlines all local files into the one entry file and also runs the code through Babel to make it work with the Node runtime version in webtask.

Note: there's a way to make webtask bundle other files in the project, but it bundles all external modules as well which results in a very big file that the webtask uploader rejects. See auth0/wt-cli#121

Once you deploy to webtask, there are also two secret variables that need to be set:

  1. SLACK_VERIFICATION - Slack verification code to match the incoming message.
  2. SLACK_SECRET - The app's secret. You can get them both from the Slack api dashboard.

Permissions

The app requests the following Slack permissions:

  1. commands - To be able to install itself in your team.
  2. channels:read - To get a list of users in the channel the message was posted in.
  3. groups:read - To get a list of users in the group the message was posted in.
  4. im:read - In case of direct message, get the other user.
  5. users:read - Get the email addresses of the users.
  6. users:read.email - Email needs to be asked explicitly.

slack-secret's People

Contributors

mderazon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

slack-secret's Issues

After authenticating, I am still being asked to authenticate

I'm receiving a nonsensical message:

You are logged in as Google user My Name with e-mail address [email protected] The creator of this sharelock restricted access to the data to select people with e-mails ending with @domain.com . Please choose an identity provider with which you registered a matching e-mail address.

Already signed in with an email that has a domain that matches the restricted list. Perhaps this is because I'm sharing a secret via a private message as opposed to a channel?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.