0.01
No commit activity in last 3 years
No release in over 3 years
Track all commands exected in an IRB console and correlate the actions to the users executed them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1.4
~> 0.16.0
~> 12.0
~> 3.0
~> 0.75.1

Runtime

~> 0.16.0
 Project Readme

IRBTracker

IRBTracker is a tool that helps in tracking and correlating all commands exected in the IRB console. the gem supports the following features. 

  • Authenticate IRB console users using LDAP.
  • Collect IRB command logs into a local file.
  • Forward Logs to a centralized server using fluent-logger.

Installation

Add this line to your application's Gemfile:

gem 'irb_tracker'

And then execute:

$ bundle

Usage

Console

In your bin/rails file you should add following

#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'irb_tracker'
require 'irb'
require 'io/console'

RAILS_USER = STDIN.getpass("Email:")
if (IRBTracker::LDAPLogin.authenticate(RAILS_USER, STDIN.getpass("Password:")))
  IRB::Context.prepend(IRBTracker::IRBLoggable.new("MyRailsApp"))
  require 'rails/commands'
else
  puts "Invalid email and user"
end

LDAP Environment Variables

LDAP_HOST
LDAP_PORT
LDAP_BASE
LDAP_ADMIN_USER
LDAP_ADMIN_PASSWORD

FluentD Environment Variables

FLUENTD_LOGGING_ENABLED
FLUENTD_LOG_HOST
FLUENTD_LOG_HOST_PORT