Coder Social home page Coder Social logo

audits1984's Introduction

Build Status

Audits1984

A simple auditing tool for console1984.

Installation

Add it to your Gemfile:

gem 'audits1984'

Create tables to store audits in the database:

rails audits1984:install:migrations
rails db:migrate

Mount the engine in your routes.rb:

mount Audits1984::Engine => "/console"

Authenticate auditors

By default, the library controllers will inherit from the host application's ApplicationController. To authenticate auditors, you need to implement a method #find_current_auditor in your ApplicationController. This method must return a record representing the auditing user. It can be any model but it has to respond to #name.

For example, Imagine all the staff in your company can audit console sessions:

def find_current_auditor
  Current.user if Current.user&.staff?
end

Usage

The main screen lists the registered console sessions. It includes a form to filter sessions by date, and also to only show that contains sensitive accesses.

Main screen listing the registered console sessions with a filter form

You can click on a session to see its commands and choose whether it was an appropiate console usage or not.

Audit session screen

After making a decision on the session, you will be redirected to the next pending session, based on the filter configured in the main screen.

That is. I said it was simple.

Configuration

These config options are namespaced in config.audits1984:

Name Description
auditor_class The name of the auditor class. By default it's ::User.
auditor_name_attribute The attribute on the auditor class that returns the auditor's name. By default it's :name.
base_controller_class The host application base class that will be the parent of audit1984 controllers. By default it's ::ApplicationController.

audits1984's People

Contributors

jorgemanrubia avatar olivier-thatch avatar dependabot[bot] avatar dhh 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.