Make GitLab for Slack app support "socket mode" to allow air-gapped instances to use slash commands / chatops
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=416491) </details> <!--IssueSummary end--> ### Problem Many self-hosted instances of GitLab are not publicly exposed on the web. As such slash commands cannot be used as there is no way for Slack to reach the internal instance. ### Proposal However with the move to using the new slack app it would be possible to enable "socket mode" which opens a connection to slack which slack can send requests over. This would mean having a process / thread running keeping the socket open and responding / routing requests from slack. From https://api.slack.com/apis/connections/socket: > Socket Mode allows your app to use the Events API and interactive features—without exposing a public HTTP Request URL. This would also help testing of slack app integrations on developer machines as a socket can be opened to slack from the developer machine. ### Limitations - From the [Slack docs](https://api.slack.com/apis/connections/socket): "Apps using Socket Mode are not currently allowed in the public Slack App Directory", which means this feature would be limited self managed and dedicated instances only Note, the air-gapped GitLab instance will need to allow _outgoing_ requests to `slack.com` due to the [OAuth 2.0 exchange with `slack.com`](https://gitlab.com/gitlab-org/gitlab/-/blob/adcc9c44cc2e590363a1edbf3dfd238694c47093/app/services/integrations/slack_installation/base_service.rb#L76-85) required to set up the integration for a project.
issue