slackapi/node-tasks-app

[FEATURE] Org-aware app

Opened this issue · 4 comments

Description

As a
Developer

I want to
Make my app aware of Slack Enterprise Grid

So that I can
Deploy it across my whole organisation

Languages

This feature is now implemented in:

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

I'm thinking about skipping regular OAuth and going direct to an Organisation wide install, since I believe the code would be able to support both a Grid install and a single workspace install on a single code path.

We've probably got two options in terms of table structure. A pair of tables - installations and tokens with a relationship, or just a single table that keeps it all to a single row, keyed off enterprise_id.

Any suggestions on the better approach @seratch @stevengill ?

My comments in the past may be helpful for thinking about the database table design.

In a nutshell,

  • If we operate the app in production, all the installation history should be kept
    • For easier troubleshooting and system operations
    • For storing all the incoming webhook URLs (and other properties)
  • Even after revoking all the user installations, bot token must still exist
    • This is one of the major improvements in GBP
    • Python / Java SDK have bots table for this purpose

It's fine to have a bit different table design in this app but the above points should be taken in consideration.

Those are great thanks.

I think we should develop this app with the assumption it would be deployed to production, so I'll go with your suggestions.

Of course, if we considered this as an app to be deployed only on a single grid / workspace, then we could upgrade all the various call sites to pass team_id, store the org level token as a environment variable, then forgo any extra tables at all right?