Implement slack usergroups management in release-tools
With the rollout of https://gitlab.com/gitlab-com/business-technology/it-operations/projects-and-initiatives/it-operations-stories/-/issues/106 we are not entirely sure if slack-wrapper will still be working.
That software was built before the introduction of the granular scopes. Ad that point in time the only way to alter a user group was to utilize and admin token. According to the structure of the tokens we are using those classify as legacy tokens.
To avoid spreading admin tokens, slack-wrapper was develop as a way to restrict the token usage to only the features implemented in that software.
What will happens to legacy admin tokens during the upgrade described in https://gitlab.com/gitlab-com/business-technology/it-operations/projects-and-initiatives/it-operations-stories/-/issues/106?
Our slack-wrapper client only performs two API calls:
-
usergroups.users.list
-> scopeusergroups:read
-
usergroups.users.update
-> scopeusergroups:write
I think that the best way forward is to decommission slack-wrapper
and develop our own application as the API calls we need only requires usergroups:write
and usergroups:read
scopes.
plan of action
-
SlackApp: add the new scopes to our app - usergroups:read
andusergroups:write
-
SlackApp: open an access request like https://gitlab.com/gitlab-com/team-member-epics/access-requests/-/issues/14409 to have it re-installed: https://gitlab.com/gitlab-com/team-member-epics/access-requests/-/issues/18532 -
After the Slack admin approves the app with new scope, reinstall the app in the GitLab workspace. -
ReleaseTools: implement the above API calls in release-tools replacing SlackWrapperClient
It is important to note that this work can be done before the slack grid migration