legionio 1.6.13 → 1.6.14
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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/legion/compliance.rb +59 -3
- data/lib/legion/service.rb +10 -0
- data/lib/legion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc17927ba8bbaf31e26083ef2c3d550ccbd87abafa545714e094e1f899d7f543
|
|
4
|
+
data.tar.gz: e5bb743c58d92b8342874f360bd7e4d4099afb02f952c11cf082da71018dcba9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4974c363f4072d5320529dcd0f4682b0d929c8d52fad085cfa6ec703f93306db15fc4a6a79e18fb48e933a62d96ba5039aa30b820e6a18a2d79a90bf3e2ca284
|
|
7
|
+
data.tar.gz: d3f45ca33a851c1de50d5a4bc2ec6fbce83afec0d5e64733c93a46372d423a6f0a892ef4233aa735e0c502ad93a748c958d31fc843382b388abfa8e10364e2f1
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.6.14] - 2026-03-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `Legion::Compliance` module rewritten with DEFAULTS hash, `merge_settings` registration, and clean API
|
|
9
|
+
- `Compliance.setup` registers max-classification defaults: PHI, PCI, PII, FedRAMP all enabled by default
|
|
10
|
+
- `Compliance.enabled?`, `.phi_enabled?`, `.pci_enabled?`, `.pii_enabled?`, `.fedramp_enabled?` convenience methods
|
|
11
|
+
- `Compliance.classification_level` returns `'confidential'` by default (highest level)
|
|
12
|
+
- `Compliance.profile` returns a hash with all compliance flags for downstream consumers
|
|
13
|
+
- `setup_compliance` wired into Service boot sequence after settings load
|
|
14
|
+
- Compliance profile spec (8 examples)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- `Compliance.phi_enabled?` now uses `Settings.dig(:compliance, :phi_enabled)` instead of chaining `[]` calls
|
|
18
|
+
- Existing PhiTag and PhiAccessLog specs updated to use `merge_settings` instead of stubbing `Settings.[]`
|
|
19
|
+
|
|
5
20
|
## [1.6.13] - 2026-03-27
|
|
6
21
|
|
|
7
22
|
### Added
|
data/lib/legion/compliance.rb
CHANGED
|
@@ -6,13 +6,69 @@ require 'legion/compliance/phi_erasure'
|
|
|
6
6
|
|
|
7
7
|
module Legion
|
|
8
8
|
module Compliance
|
|
9
|
+
DEFAULTS = {
|
|
10
|
+
enabled: true,
|
|
11
|
+
classification_level: 'confidential',
|
|
12
|
+
phi_enabled: true,
|
|
13
|
+
pci_enabled: true,
|
|
14
|
+
pii_enabled: true,
|
|
15
|
+
fedramp_enabled: true,
|
|
16
|
+
log_redaction: true,
|
|
17
|
+
cache_phi_max_ttl: 3600
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
9
20
|
class << self
|
|
21
|
+
def setup
|
|
22
|
+
return unless defined?(Legion::Settings)
|
|
23
|
+
|
|
24
|
+
Legion::Settings.merge_settings(:compliance, DEFAULTS)
|
|
25
|
+
Legion::Logging.info('[Compliance] max-classification profile active') if defined?(Legion::Logging)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def enabled?
|
|
29
|
+
setting(:enabled) == true
|
|
30
|
+
end
|
|
31
|
+
|
|
10
32
|
def phi_enabled?
|
|
11
|
-
|
|
33
|
+
setting(:phi_enabled) == true
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def pci_enabled?
|
|
37
|
+
setting(:pci_enabled) == true
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def pii_enabled?
|
|
41
|
+
setting(:pii_enabled) == true
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def fedramp_enabled?
|
|
45
|
+
setting(:fedramp_enabled) == true
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def classification_level
|
|
49
|
+
setting(:classification_level) || 'confidential'
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def profile
|
|
53
|
+
{
|
|
54
|
+
classification_level: classification_level,
|
|
55
|
+
phi: phi_enabled?,
|
|
56
|
+
pci: pci_enabled?,
|
|
57
|
+
pii: pii_enabled?,
|
|
58
|
+
fedramp: fedramp_enabled?,
|
|
59
|
+
log_redaction: setting(:log_redaction) == true,
|
|
60
|
+
cache_phi_max_ttl: setting(:cache_phi_max_ttl) || 3600
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
private
|
|
65
|
+
|
|
66
|
+
def setting(key)
|
|
67
|
+
return nil unless defined?(Legion::Settings)
|
|
12
68
|
|
|
13
|
-
Legion::Settings
|
|
69
|
+
Legion::Settings.dig(:compliance, key)
|
|
14
70
|
rescue StandardError
|
|
15
|
-
|
|
71
|
+
nil
|
|
16
72
|
end
|
|
17
73
|
end
|
|
18
74
|
end
|
data/lib/legion/service.rb
CHANGED
|
@@ -31,6 +31,7 @@ module Legion
|
|
|
31
31
|
Legion::Logging.debug('Starting Legion::Service')
|
|
32
32
|
setup_settings
|
|
33
33
|
apply_cli_overrides(http_port: http_port)
|
|
34
|
+
setup_compliance
|
|
34
35
|
setup_local_mode
|
|
35
36
|
reconfigure_logging(log_level)
|
|
36
37
|
Legion::Logging.info("node name: #{Legion::Settings[:client][:name]}")
|
|
@@ -225,6 +226,15 @@ module Legion
|
|
|
225
226
|
self.class.log_privacy_mode_status
|
|
226
227
|
end
|
|
227
228
|
|
|
229
|
+
def setup_compliance
|
|
230
|
+
require 'legion/compliance'
|
|
231
|
+
Legion::Compliance.setup
|
|
232
|
+
rescue LoadError => e
|
|
233
|
+
Legion::Logging.debug "Compliance module not available: #{e.message}"
|
|
234
|
+
rescue StandardError => e
|
|
235
|
+
Legion::Logging.warn "Compliance setup failed: #{e.message}"
|
|
236
|
+
end
|
|
237
|
+
|
|
228
238
|
def apply_cli_overrides(http_port: nil)
|
|
229
239
|
return unless http_port
|
|
230
240
|
|
data/lib/legion/version.rb
CHANGED