This PR adds the ability to configure the audit log option using train and if the audit log is enabled it generates the audit log files in the default location.
This includes the following changes
By default audit log is disabled. Users can set the enable_audit_log option to true while creating train transport to enable it.
User can use audit_log_location and audit_log_size options to set the location and size of the audit log file
Currently we only do audit logging for commands executed using train connection object and logging file path that the user is trying to access or read. It also logs the file upload operations that are happening through train connection (Note currently audit log for file operations is not in a matured state so it will not work for transport which overrides the upload functionality or any other file related actions for example reading content of the file etc.).
Test using irb
bundle exec irb -I lib
require 'train'
t = Train.create("local")
c = t.connection
c.run_command("whoami")
audit_log_location is a required parameter so any library or plugin using train to pass the audit log location be they want to enable the audit log.
Pending: dev-docs
Related Issue
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New content (non-breaking change)
[ ] Breaking change (a content change which would break existing functionality or processes)
Description
This PR adds the ability to configure the audit log option using train and if the audit log is enabled it generates the audit log files in the default location.
This includes the following changes
enable_audit_log
option totrue
while creating train transport to enable it.Test using irb
audit_log_location is a required parameter so any library or plugin using train to pass the audit log location be they want to enable the audit log.
Pending: dev-docs
Related Issue
Types of changes
Checklist: