aboutsummaryrefslogtreecommitdiff
path: root/src/api/core/mod.rs
diff options
context:
space:
mode:
authorBlackDex <[email protected]>2022-11-20 19:15:45 +0100
committerBlackDex <[email protected]>2022-11-27 23:36:34 +0100
commit2ea9b669438cdff048d74cb49c9f6777e9018371 (patch)
treee297b122f0f473ddf2750e964aa43926fab5a01b /src/api/core/mod.rs
parentf3beaea9e95ff7fff679289916232c95621b517c (diff)
downloadvaultwarden-2ea9b669438cdff048d74cb49c9f6777e9018371.tar.gz
vaultwarden-2ea9b669438cdff048d74cb49c9f6777e9018371.zip
Add Organizational event logging feature
This PR adds event/audit logging support for organizations. By default this feature is disabled, since it does log a lot and adds extra database transactions. All events are touched except a few, since we do not support those features (yet), like SSO for example. This feature is tested with multiple clients and all database types. Fixes #229
Diffstat (limited to 'src/api/core/mod.rs')
-rw-r--r--src/api/core/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs
index 0df9a9dc..885fae81 100644
--- a/src/api/core/mod.rs
+++ b/src/api/core/mod.rs
@@ -1,6 +1,7 @@
pub mod accounts;
mod ciphers;
mod emergency_access;
+mod events;
mod folders;
mod organizations;
mod sends;
@@ -9,6 +10,7 @@ pub mod two_factor;
pub use ciphers::purge_trashed_ciphers;
pub use ciphers::{CipherSyncData, CipherSyncType};
pub use emergency_access::{emergency_notification_reminder_job, emergency_request_timeout_job};
+pub use events::{event_cleanup_job, log_event, log_user_event};
pub use sends::purge_sends;
pub use two_factor::send_incomplete_2fa_notifications;
@@ -22,6 +24,7 @@ pub fn routes() -> Vec<Route> {
routes.append(&mut accounts::routes());
routes.append(&mut ciphers::routes());
routes.append(&mut emergency_access::routes());
+ routes.append(&mut events::routes());
routes.append(&mut folders::routes());
routes.append(&mut organizations::routes());
routes.append(&mut two_factor::routes());
@@ -34,6 +37,13 @@ pub fn routes() -> Vec<Route> {
routes
}
+pub fn events_routes() -> Vec<Route> {
+ let mut routes = Vec::new();
+ routes.append(&mut events::main_routes());
+
+ routes
+}
+
//
// Move this somewhere else
//