Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Readme

Overview

This repository contains some example Python code to help audit your Enterprise Slack. It is designed to be executed in an AWS Lambda function. The code will poll either the team.accessLogs api or the team.integrationLogs api and push any new logs to an S3 bucket.

Setup

You will need:

  1. An OAuth token with an admin scope. see here
  2. An S3 bucket and a KMS key.
  3. An IAM role that gives access to your bucket and the KMS key that can be applied ot the Lambda function.
  4. Create a Lambda function with the follow environment variables:
  • KMS_REGION = the region of your KMS key
  • SLACK_TOKEN = your admin token (encrypted with KMS)
  • BUCKET_NAME = the name of your log bucket

AWS Lambda help

Here are a few pointers to help people who are new to AWS Lambda to get started. You will need to bundle up the slackclient library with your code to run this. Pip can be used to install it to a directory:

pip install slackclient -t ./src/ --upgrade

Then use this bash script to upload to your Lambda job:

#!/bin/bash

echo "Bundling code and pushing to Lambda"
cd ./src/
zip -r bundle.zip *
aws lambda update-function-code --function-name $FUNCTIONNAME --region $REGION --zip-file fileb://bundle.zip
rm bundle.zip
cd ..
echo "Done"

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

For Auth0 related questions or support please use the Support Center.

Author

Auth0

License

This project is licensed under the MIT license.

About

Python scripts to be run in Lambda to help audit slack

Resources

License

Releases

No releases published

Packages

No packages published

Languages