Skip to content

Commit

Permalink
Updated docs to reflect new token changes and permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
klairecodes committed Jan 13, 2024
1 parent 9651cff commit 9913c9f
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,38 @@ Slack
- `message.groups`
- `message.im`
- `message.mpim`
- User and App token Scopes.
- A user bot token (starts with `xoxp-`, typically longer than nonuser) with the following OAuth Scopes:
- App, User and Bot token Scopes.
- A Slack app token (starts with `xapp-`) with the following OAuth Scopes:
- `channels:history`
- `channels:manage`
- `channels:read`
- `channels:write`
- `chat:write`
- `groups_history`
- `groups:read`
- `groups_write`
- `im:history`
- `groups:write`
- `im:write`
- `mpim:history`
- `mpim:read`
- `mpim:write`
- `users.profile:read`
- `users:read`
- `chat:write.customize`
- A Slack app token (starts with `xapp-`)with the following OAuth Scopes:
- A User token (starts with `xoxp-`, typically longer than nonuser) with the following OAuth Scopes:
- `channels:history`
- `channels:manage`
- `channels:read`
- `channels:write`
- `chat:write`
- `groups_history`
- `groups:read`
- `groups:write`
- `groups_write`
- `im:history`
- `im:write`
- `mpim:history`
- `mpim:read`
- `mpim:write`
- `users.profile:read`
- `users:read`
- A Bot token (starts with `xoxb-`, typically longer than nonuser) with the following OAuth Scopes:
- `chat:write.customize`
- If any of these are missing, Kevlar will complain in `stdout` and tell you which scope was required for the failed API call.
- If any of these are redundant (not the minimum required) please let me know by creating an Issue!
- A user service account with administrator privileges. This will be the account the bot acts as.
- A user service account with administrator privileges. This will be the account the bot acts as, and should have permission to delete other users' messages.


## Development
Expand All @@ -99,6 +100,7 @@ pip install -r requirements.txt
5. Set the following environment variables to the tokens you created in your Slack Application:
```bash
export SLACK_APP_TOKEN=<your-app-token>
export SLACK_USER_TOKEN=<your-user-token>
export SLACK_BOT_TOKEN=<your-bot-token>
```

Expand All @@ -123,13 +125,14 @@ podman build -t kevlar .
2. Set the following environment variables to the tokens you created in your Slack Application:
```bash
export SLACK_APP_TOKEN=<your-app-token>
export SLACK_USER_TOKEN=<your-user-token>
export SLACK_BOT_TOKEN=<your-bot-token>
```
These can be found under `OAuth&Permissions -> OAuth Tokens for Your Workspace` in the Slack Admin portal.

3. Run the container with environment variables specified:
```bash
podman run -e SLACK_APP_TOKEN=$SLACK_APP_TOKEN -e SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN kevlar:latest
podman run -e SLACK_APP_TOKEN=$SLACK_APP_TOKEN -e SLACK_USER_TOKEN=$SLACK_USER_TOKEN -e SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN kevlar:latest
```


Expand All @@ -149,9 +152,11 @@ In the `Developer` view:
6. Click `Create`
3. Create a ConfigMap
1. Name it something like "slack-env"
2. Add two key/value pairs
2. Add three key/value pairs
- Key: `SLACK_APP_TOKEN`
- Value: `<your-app-token>`
- Key: `SLACK_USER_TOKEN`
- Value: `<your-user-token>`
- Key: `SLACK_BOT_TOKEN`
- Value: `<your-bot-token>`
3. Click `Save`
Expand Down

0 comments on commit 9913c9f

Please sign in to comment.