strongdm / accessbot

Manage access to strongDM resources via Slack
Apache License 2.0
23 stars 19 forks source link

Not able to Send Messages of Dedicated Slack Admin Channel. "sdm_admins_channel" #95

Closed hjdesai2 closed 3 years ago

hjdesai2 commented 3 years ago

Describe the bug

In my configuration, I am setting sdm_admins_channel: '#platform-access-requests' However, Access bot is not able to recognize the admin channel name where all approval messages should ideally go based on configuration & shoots a log No channel named platform-access-requests exists

NOTE: Channel is present and Bot has all permissions & even added to that channel.

To Reproduce Steps to reproduce the behavior:

  1. Just set your sdm_admins_channel config.
  2. Try to request an approval for any role or resource. It won't shoot anything on configured admin channel.

Expected behavior Ideal expectations is to get approval message on slack channel.

Screenshots No messages on admin slack channel, but I get personal notifications by Platform Access Bot

Screen Shot 2021-08-18 at 1 19 55 PM

Desktop (please complete the following information):

camposer commented 3 years ago

Hi @hjdesai2

Thanks for reaching out, could you please specify which version of accessbot you're using?

If you're using version 1.0.x the problem might be related to the type of channel. Is #platform-access-requests a private channel? In that case, please try to add the sope: usergroups:read to your bot. That's a typical issue documented here

Side note: It might be just a typo, but keep in mind that the variable name should be all capital case and passed at startup time to your docker container. Instead of sdm_admins_channel it should be SDM_ADMINS_CHANNEL.

If the error persists, could you please provide the output of the following command sent in a DM to PlatformAccessBot: plugin config AccessBot?

hjdesai2 commented 3 years ago

Hello @camposer ,

I am using accessbot version v1.1.0 & #platform-access-requests is not a private channel.

In addition, I have set the Environment Variable in Uppercase , as seen in below screenshot.

NOTE: Below is screenshot of my K8s Deployment file

Screen Shot 2021-08-18 at 11 03 17 PM

Attaching screenshot for plugin config AccessBot

Screen Shot 2021-08-18 at 11 12 15 PM

camposer commented 3 years ago

Hi @hjdesai2

Thank you very much for your quick reply! Definitively we'll need to investigate this. We've seen some problems with the new version (1.1) when there are many users or channels on a Slack Org.

A little bit of context, version 1.1.x uses the new Slack API (Bolt). Version 1.0.x uses the old Slack API (RTM). We've battle tested RTM, but Bolt is still being tested.

Could you please try to use version 1.0.x? In that case, you'll need to create a classic app. All code and docs live in this repo in a separate branch:

camposer commented 3 years ago

There are many things that can be causing this problem. We're currently trying to setup a large Slack Organization so we can test properly v1.1.x. Besides, some changes has been made into the Bolt Backend.

Two issues has been created in order to better manage this issue:

  1. Setup testing organization - #108
  2. Introduce pagination in Bolt Backend functions for getting users and channels - #109
camposer commented 3 years ago

We've finished #108 and #109. The next step is to generate a new release, once we do that, we'll close this bug.

camposer commented 3 years ago

Here's the release: https://github.com/strongdm/accessbot/releases/tag/1.1.2