Giter Site home page Giter Site logo

auditbot's Introduction

Welcome to AuditBot

made-with-csharp License: MIT

This is a small auditing package

The need for auditing already exists in projects, the requirement to log information to prove something happened, but also to capture who, what and when a business action happened.

AuditBot helps in generating tracking information about operations being executed. It gathers environmental information such as the caller user id, machine name, method name, exceptions, including execution time.

Fuel my efforts with a cup of Coffee.

Buy Me A Coffee

Get Started

This library is implemented as a Middleware class that can be configured to log requests that does not reach the action filter (i.e. unsolved routes, parsing errors, etc).

Features

Installation (Not Yet)

- Install-Package AuditBot
  • Once you have configured the AddAuditBot() service in the Startup.cs file,
  • Once you have configured the UseAuditBot() configure in the Startup.cs file, you're ready to define the AuditBotOptions in the app.settings.json.

Usage

The audit can only be enabled as Action Filter : Decorating the controllers/actions to be audited with following action filter attribute.

  1. [Auditor()]
    • EventType : Specify the type of event you want to audit
    • IncludeResponseBody : Enable response body to be audited
    • IncludeRequestBody : Enable request body to be audited
    • IncludeModelState : Enable state of the request body to be audited
    • MailIfError : Enable send email when something happends
  2. [IgnoreAuditor]
appsettings.json

Copy the below code to your project appsettings.

"AuditBotOption": {
    "ApplicationName": "auditbot-demo-api",
    "Source": "AuditBot.Demo.Api",
    "SubjectId": "sub",
    "SubjectClaim": "name",
    "IncludeFormVariables": false,
    "ClientIdClaim": "client_id",
    "Mail": {
      "Driver": "SMTP",
      "Host": "smtp.gmail.com",
      "Port": 587,
      "Username": "[email protected]",
      "Password": "PersolAudit@2021!",
      "From": {
        "Address": "[email protected]",
        "Name": "no-reply"
      }
    },
    "DataSource": {
      "Enabled": true,
      "SqlServer": {
        "ConnectionId" :  ""
      }
    }
  }

auditbot's People

Contributors

mkojoa avatar

Watchers

 avatar

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.