GithubHelp home page GithubHelp logo

tiamat-tech / cf-workers-audit-logs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eidam/cf-workers-audit-logs

0.0 1.0 0.0 349 KB

A Cloudflare Worker using KV and CRON trigger for checking and sending Audit Logs to Slack. ๐Ÿš€

License: MIT License

JavaScript 100.00%

cf-workers-audit-logs's Introduction

Cloudflare Worker - Audit Logs

A Cloudflare Worker using KV and CRON trigger for checking and sending Audit Logs to Slack. Using Cloudflare Workers, CRON Triggers, and KV storage. ๐Ÿš€

Slack notifications

Pre-requisites

You'll need a Cloudflare Workers account (Free Tier is enough)

Prepare the following secrets

  • Cloudflare API token with Account Logs:Read and Account Settings:Read permissions (yes, both needed)
  • Slack incoming webhook

Deploy with Cloudflare Deploy Button

Deploy to Cloudflare Workers

  1. Click the button and follow the instructions, you should end up with a clone of this repository

  2. Navigate to your new GitHub repository > Settings > Secrets and add the following secrets:

    - Name: CF_API_TOKEN (should be added automatically)
    
    - Name: CF_ACCOUNT_ID (should be added automatically)
    
    - Name: SECRET_CLOUDFLARE_API_TOKEN
    - Value: your-read-cloudflare-api-token
    
    - Name: SECRET_SLACK_WEBHOOK_URL
    - Value: your-slack-webhook-url
  3. Navigate to the Actions settings in your repository and enable them

  4. Trigger last GitHub action (or rerun failed) to deploy Workers ๐ŸŽ‰

Known issues

  • Max 10 message blocks in Slack message.

    It just might take a while to catch up with all the audit logs from a current day once you deploy the Worker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.