mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-02 12:26:47 +02:00
Add HTTP auth and policy revocation audit events (#7919)
This commit is contained in:
4 files changed
+17
-8
No files matched your search
@@ -214,8 +214,8 @@ async fn post_events_collect(data: Json<Vec<EventCollection>>, headers: Headers,
|
|||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Client-side cipher events (viewed, copied, toggled, autofilled).
|
// Client-side cipher events (viewed, copied, toggled, autofilled, HTTP auth).
|
||||||
1107..=1114 | 1117 | 1119..=1132 => {
|
1107..=1114 | 1117 | 1119..=1133 => {
|
||||||
// The cipher determines the organization the event is logged to, so make sure the
|
// The cipher determines the organization the event is logged to, so make sure the
|
||||||
// user can actually access it instead of trusting the provided cipher uuid.
|
// user can actually access it instead of trusting the provided cipher uuid.
|
||||||
if let Some(cipher_uuid) = &event.cipher_id
|
if let Some(cipher_uuid) = &event.cipher_id
|
||||||
|
|||||||
@@ -2165,7 +2165,7 @@ async fn put_policy(
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_event(
|
log_event(
|
||||||
EventType::OrganizationUserRemoved,
|
EventType::OrganizationUserRevokedSingleOrganizationNonCompliance,
|
||||||
&member.uuid,
|
&member.uuid,
|
||||||
&org_id,
|
&org_id,
|
||||||
&headers.user.uuid,
|
&headers.user.uuid,
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ pub async fn enforce_2fa_policy(
|
|||||||
member.save(conn).await?;
|
member.save(conn).await?;
|
||||||
|
|
||||||
log_event(
|
log_event(
|
||||||
EventType::OrganizationUserRevoked,
|
EventType::OrganizationUserRevokedTwoFactorNonCompliance,
|
||||||
&member.uuid,
|
&member.uuid,
|
||||||
&member.org_uuid,
|
&member.org_uuid,
|
||||||
act_user_id,
|
act_user_id,
|
||||||
@@ -185,8 +185,16 @@ pub async fn enforce_2fa_policy_for_org(
|
|||||||
member.revoke();
|
member.revoke();
|
||||||
member.save(conn).await?;
|
member.save(conn).await?;
|
||||||
|
|
||||||
log_event(EventType::OrganizationUserRevoked, &member.uuid, org_id, act_user_id, device_type, ip, conn)
|
log_event(
|
||||||
.await;
|
EventType::OrganizationUserRevokedTwoFactorNonCompliance,
|
||||||
|
&member.uuid,
|
||||||
|
org_id,
|
||||||
|
act_user_id,
|
||||||
|
device_type,
|
||||||
|
ip,
|
||||||
|
conn,
|
||||||
|
)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ pub enum EventType {
|
|||||||
CipherSoftDeleted = 1115,
|
CipherSoftDeleted = 1115,
|
||||||
CipherRestored = 1116,
|
CipherRestored = 1116,
|
||||||
CipherClientToggledCardNumberVisible = 1117,
|
CipherClientToggledCardNumberVisible = 1117,
|
||||||
|
CipherClientHttpAuthReleased = 1133,
|
||||||
|
|
||||||
// Collection
|
// Collection
|
||||||
CollectionCreated = 1300,
|
CollectionCreated = 1300,
|
||||||
@@ -111,8 +112,8 @@ pub enum EventType {
|
|||||||
// OrganizationUserAutomaticallyConfirmed = 1517,
|
// OrganizationUserAutomaticallyConfirmed = 1517,
|
||||||
// OrganizationUserSelfRevoked = 1518, // User self-revoked due to declining organization data ownership policy
|
// OrganizationUserSelfRevoked = 1518, // User self-revoked due to declining organization data ownership policy
|
||||||
OrganizationUserAdminResetTwoFactor = 1519,
|
OrganizationUserAdminResetTwoFactor = 1519,
|
||||||
// OrganizationUserRevoked_TwoFactorNonCompliance = 1520,
|
OrganizationUserRevokedTwoFactorNonCompliance = 1520,
|
||||||
// OrganizationUserRevoked_SingleOrganizationNonCompliance = 1521,
|
OrganizationUserRevokedSingleOrganizationNonCompliance = 1521,
|
||||||
OrganizationUserNotificationBannerActionClicked = 1522,
|
OrganizationUserNotificationBannerActionClicked = 1522,
|
||||||
|
|
||||||
// Organization
|
// Organization
|
||||||
|
|||||||
Reference in new issue
Block a user