orfeas_pam_dsl 0.8.0 → 0.9.1

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: cbc7589ac5d89e024056bc8ba7c7cd24344accf0774d110841d7df67c063d12d
4
- data.tar.gz: 513b8a259f2f1b98802152f0358bfc4d0b615aa6175e83780fc92a42fd426bbe
3
+ metadata.gz: a5ab742d077c8ac7693718a33d39d1df44f1265e7e51aeb2a460b5727a4ffaeb
4
+ data.tar.gz: ba44447402ac1c4fa4cf3f50713daeb2e3db581de7586ca6808adecc3fa027a7
5
5
  SHA512:
6
- metadata.gz: 2f4205ae19ef26ca957a28104833d26e567b1ba5ed74623393eea7e5a9a80492b5378c7952a6159edeb4a2e06de5c2ee731a719002f169c131b52898c559e1be
7
- data.tar.gz: 58506a1d1c9e4106c570fcdb4513c7928b0b8f1207a97e5807f5f1b779eaf5e030c7aa78fe5d9a0093e0efffcd9a26a8f7437ca948254c862ce332ebd3e2f411
6
+ metadata.gz: 64829a41351d4b387954be3cdeb2815486d6dc0371f0aa0efcda428500ec5b8e3477abe9024cfddaafb2a84141aa9c41b832206db7e4bb74fdfc2ed767c24e6c
7
+ data.tar.gz: e66c6d11d9ae043fe589624d44ec873d70c67fe824365d61e666bfa9dde2b9fea5f5db6cccb8061cc0cc4d14e9f35cbcc901e46ab69e6ba0bc48a0e8bd4ecfe4
data/CHANGELOG.md CHANGED
@@ -4,6 +4,72 @@ All notable changes to PAM DSL will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.1] - 2026-11-02
8
+
9
+ ### Changed
10
+ - **The gem's description expands ORFEAS as the words its letters stand for**:
11
+ Object-Relational Framework for Event-Aware Systems. It read "Object-Relational to
12
+ Event-Sourcing Architecture", which has no F. No code changed since 0.9.0.
13
+
14
+ ## [0.9.0] - 2026-10-25
15
+
16
+ ### Added
17
+ - **`online_identifier` is a declarable field type** — the detector had a pattern by that name
18
+ but `Field::PII_TYPES` lacked it, so a policy could not declare such a field. It is a
19
+ non-special, non-sensitive type. (The detector still reports login-name columns as
20
+ `identifier`.)
21
+ - **The policy generators keep an existing policy file** — `generate:policy` and
22
+ `generate:from_models` raise `PolicyGenerator::FileExistsError` instead of overwriting
23
+ `config/initializers/pam_dsl_policy.rb`; `FORCE=1` on the rake tasks (`force: true` in Ruby)
24
+ replaces it.
25
+ - **Article 30 register from declarations, not placeholders** — `article_30_report` printed
26
+ "Internal staff" as every purpose's recipients, "No international transfers", a list of
27
+ asserted security measures (TLS, role-based access, PaperTrail), a per-purpose retention that
28
+ was always the default (it passed a field where a model name belongs), and a data-subject
29
+ rights section of "[Configure implementation path]" that Article 30 does not ask for. Purposes
30
+ now declare `data_subjects`, `recipients` and `transfer to:, safeguard:` (or `no_transfers!`),
31
+ and policies `security_measures` (Art. 30(1)(c), (d), (e), (g)); the register prints them, a
32
+ retention schedule from the policy's rules (Art. 30(1)(f)), and a completeness section listing
33
+ each undeclared item with its clause (`Policy#article_30_gaps`). The JSON export carries the
34
+ same, under `not_declared` for the gaps. Durations read "1 year", not "1 years".
35
+ - **One PII dictionary; detection fixed on a foreign codebase** — `PolicyGenerator` kept its own
36
+ exact-name patterns and exclusions, separate from `PIIDetector`'s; on Solidus 4.7 the
37
+ generator found 6 of 26 personal columns and flagged an order's state machine as an address.
38
+ The generator now detects with `PIIDetector` (its `PII_PATTERNS` and `EXCLUDE_PATTERNS` are
39
+ gone), scans each table's real columns (a column the model ignores is reported, and the
40
+ generated policy says the application cannot see or erase it), and counts a bare `name` only
41
+ in a model that holds other personal data (a product's or a payment plan's name is not a
42
+ person's). The detector gained `address1`/`address2`, `zipcode`/`postcode`, `state_name`, any
43
+ `*_ip`, `last_digits`/`last4`, `login`/`username` (an `:identifier`), `bic`/`swift`/account
44
+ numbers, `birth_date`, and a person's account and session tokens and credentials (password
45
+ hashes and salts, remember/confirmation/reset/unlock/guest tokens), which the `encrypted_` and
46
+ `_token` exclusions used to drop; names match name forms and the names of people in a role
47
+ (`debtor_name`, `approver_name`), not every `*_name`. New exclusions: foreign keys (`*_id`,
48
+ except identifiers such as `vat_id`, `customer_national_id`), `*_iso`, `*_message`, `*_reason`,
49
+ `*_notes`; a bare `state` and `rest_income_budget` are no longer personal. On Solidus: 24 of
50
+ 26; on the Aegean testbed: 29 fields (27 personal) where the old generator reported 18; on the
51
+ labelled evaluation dataset: recall 99.1% (was 97.4%), precision 98.3% (was 98.2%).
52
+ - **Access recorder** (`PamDsl.access_recorder`, `Enforcement::Access`): every
53
+ `validate_access!` call, whatever its outcome, is passed to the recorder before it returns or
54
+ raises, as an `Access` (policy, purpose, legal basis, fields, subject, outcome `:granted`,
55
+ `:audited` or `:denied`, the violations found, time). The recorder answers `record?(policy)`
56
+ and `call(access)`; an error it raises propagates, so an access it cannot record does not go
57
+ ahead. One per process, set by the host (Lyra's access log); `PamDsl.reset!` leaves it in place.
58
+ - **Enforcement modes** (`PamDsl.enforcement_mode`, `PamDsl::Enforcement`): `:strict`, the
59
+ default and the behaviour so far, blocks an invalid access by raising its typed exception;
60
+ `:audit` lets it through, records **every** violation found (not only the first), logs each
61
+ (`PamDsl.logger`: `Rails.logger` under Rails, standard error otherwise), passes each to the
62
+ `PamDsl.on_violation { |violation| ... }` handlers as an `Enforcement::Violation` (policy,
63
+ purpose, fields, subject, error class, message, time), and makes `validate_access!` return
64
+ `false`. A policy can override the global mode (`enforcement :audit` in its definition). In
65
+ strict mode the first violation raised is the same, in the same order, as before.
66
+ `Policy#access_violations` returns them all without raising. `PamDsl.reset!` also resets the
67
+ mode and the handlers.
68
+ ### Changed
69
+ - **Ruby 4.0 or later is required** (`required_ruby_version >= 4.0`; none was declared before).
70
+ ### Fixed
71
+ - `PamDsl.reporter` dropped the `output:` option, so reports always went to standard output.
72
+
7
73
  ## [0.8.0] - 2026-06-15
8
74
 
9
75
  The first release to RubyGems since 0.6.0, and the version the PAM article (Requirements