-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ref(slack): Implement bot app switch #13184
Conversation
bc8cc13
to
ddb26f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we'd encourage users/ourselves to migrate back to a bot account now that workspace apps have been deprecated?
Ourselves, No:This is something we've been discussing with the folks over at Slack. Unfortunately because the workspace tokens and bot tokens are different, we would have to ask all of our users to re-authorize their application. The team over at Slack is working on a solution in the mid-term (I believe) to provide a migration path for workspace token apps back to bot apps. Users (onprem), Yes:We should document this change in the on-premise forum post for the slack integration. /cc @jessla |
@@ -141,3 +143,109 @@ def test_reassign_user(self): | |||
self.assert_setup_flow(authorizing_user_id='UXXXXXXX2') | |||
identity = Identity.objects.get() | |||
assert identity.external_id == 'UXXXXXXX2' | |||
|
|||
|
|||
class SlackIntegrationBotAppTest(IntegrationTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is almost identical to SlackIntegrationTest
, can this be abstracted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'll pull out a base class
Introduces as SLACK_INTEGRATION_USER_WST setting that can be enabled to use the legacy workspace token apps (which is what sentry.io uses). - When installing the integration we now use scopes depending on if the workspace token app setting is enabled. Otherwise we use bot tokens. NOTE that the WST app scopes have not changed. - When using bot tokens we must store the bot token _and_ user token to handle unfurling. - We can still pre-link the authorizing user, but we have to make a API request first to receive the users ID.
ddb26f8
to
1e2a63b
Compare
When will this fix make a release? |
Introduces as SLACK_INTEGRATION_USER_WST setting that can be enabled to use the legacy workspace token apps (which is what sentry.io uses). - When installing the integration we now use scopes depending on if the workspace token app setting is enabled. Otherwise we use bot tokens. NOTE that the WST app scopes have not changed. - When using bot tokens we must store the bot token _and_ user token to handle unfurling. - We can still pre-link the authorizing user, but we have to make a API request first to receive the users ID.
Introduces as SLACK_INTEGRATION_USER_WST setting that can be enabled to use the legacy workspace token apps (which is what sentry.io uses). - When installing the integration we now use scopes depending on if the workspace token app setting is enabled. Otherwise we use bot tokens. NOTE that the WST app scopes have not changed. - When using bot tokens we must store the bot token _and_ user token to handle unfurling. - We can still pre-link the authorizing user, but we have to make a API request first to receive the users ID.
Introduces as
SLACK_INTEGRATION_USER_WST
setting that can be enabled to use the legacy workspace token apps (which is what sentry.io uses).When installing the integration we now use appropriate scopes depending on if the workspace token app setting is enabled. Otherwise we use bot app scopes. NOTE that the WST app scopes have not changed.
When using bot tokens we must store the bot token and user token to handle unfurling, as unfurling cannot be done with just a bot token.
We can still pre-link the authorizing user, but we have to make a API request first to receive the users ID.
/cc @Roach @hwz
Fixes #9004
NOTE TO SELF: Do not merge until sentry.io has the associated WST configuration enabled: https://github.com/getsentry/getsentry/pull/2917