console1984 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68e6cdce847f11b0872e12826a4fd65b7e31e267461de5b6e85582a692310e0a
|
|
4
|
+
data.tar.gz: aac2138d6008c87076de90b8944bf246584b47cd061a160c54f0138345491f6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0388bba4469870ce2616845c31ee6ea34e08e6af1bb3d39e239a87cd4c3c7ee4ec7602f0e928904ae256e0bbc17554e694724067e529026f9d5cae9dff83bc0f'
|
|
7
|
+
data.tar.gz: 2a96eaa2ecd586694a12d0bbf9dc717ef4a9585ebd277a1b538d5e589495742c63cb6d2b8c9918db9b55f07d9c1338416e4d18365628daf7286757d953cdc316
|
data/README.md
CHANGED
|
@@ -35,6 +35,9 @@ By default, console1984 is only enabled in `production`. You can configure the t
|
|
|
35
35
|
config.console1984.protected_environments = %i[ production staging ]
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
Finally, you need to [configure Active Record Encryption](https://edgeguides.rubyonrails.org/active_record_encryption.html#setup) in your
|
|
39
|
+
project. This is because the library stores the tracked console commands encrypted.
|
|
40
|
+
|
|
38
41
|
## How it works
|
|
39
42
|
|
|
40
43
|
### Session activity logging
|
|
@@ -5,7 +5,7 @@ module Console1984::Ext::ActiveRecord::ProtectedAuditableTables
|
|
|
5
5
|
%i[ execute exec_query exec_insert exec_delete exec_update exec_insert_all ].each do |method|
|
|
6
6
|
define_method method do |*args, **kwargs|
|
|
7
7
|
sql = args.first
|
|
8
|
-
if Console1984.command_executor.executing_user_command? && sql =~ auditable_tables_regexp
|
|
8
|
+
if Console1984.command_executor.executing_user_command? && sql.b =~ auditable_tables_regexp
|
|
9
9
|
raise Console1984::Errors::ForbiddenCommandAttempted, "#{sql}"
|
|
10
10
|
else
|
|
11
11
|
super(*args, **kwargs)
|
data/lib/console1984/shield.rb
CHANGED
data/lib/console1984/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: console1984
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jorge Manrubia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-09-
|
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colorize
|