analytics/lib/plausible/audit
Adam Rutkowski adf39ca7a8
Audit trail for SSO (#5560)
* 

* wip

* wip

* Moduledoc false

* wip

* Update extra/lib/plausible/auth/sso/saml_config.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Include only data keys present in changes

* Improve audit logging for SSO domain verification

Make it more compact and hopefully more readable to CS

* Harden existing tests

* Use consistent naming

* Update audit entries migration: use UUIDs for primary keys

* Fix up tests

* Format

* Only test audit for EE

* Remove temporary String.Chars implementation

* Always log keys as per `derive` directive; include changes for inserts

* Write `actor_type` to audit entries

* Extract Audit.Repo functions

* Moduledocs

* Include change in audited deletions

* Make audit available only in EE build

A bit clunky? cc @zoldar

* Put test behind ee compilation flag

* Pin user e-mail in test

* Ensure encoder opts are passed for nested calls

* Carry `__allow_not_loaded__` even if no extractor defined

* Turn `actor_type` into an ecto enum type

* Remove unused function

* s/sso_forced/sso_force_mode_changed

* Unwrap single item list for protocol implementation

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Migration: audit entries (#5581)

* Migration: audit entries

* Put migration behind EE conditional

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2025-07-22 10:53:24 +00:00
..
repo.ex Audit trail for SSO (#5560) 2025-07-22 10:53:24 +00:00