1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

[SM-1433] Update SM Event Logs (#4759)

* SM-1433: Fix bug using cipherId instead of secretId

* SM-1433: Add secretId and serviceAccountId
This commit is contained in:
Colton Hurst 2024-09-16 12:30:23 -04:00 committed by GitHub
parent 459f37a4c6
commit a19fc6a2b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -27,6 +27,8 @@ public class EventResponseModel : IResponseModel
Device = ev.DeviceType; Device = ev.DeviceType;
IpAddress = ev.IpAddress; IpAddress = ev.IpAddress;
InstallationId = ev.InstallationId; InstallationId = ev.InstallationId;
SecretId = ev.SecretId;
ServiceAccountId = ev.ServiceAccountId;
} }
/// <summary> /// <summary>
@ -89,4 +91,14 @@ public class EventResponseModel : IResponseModel
/// </summary> /// </summary>
/// <example>172.16.254.1</example> /// <example>172.16.254.1</example>
public string IpAddress { get; set; } public string IpAddress { get; set; }
/// <summary>
/// The unique identifier of the related secret that the event describes.
/// </summary>
/// <example>e68b8629-85eb-4929-92c0-b84464976ba4</example>
public Guid? SecretId { get; set; }
/// <summary>
/// The unique identifier of the related service account that the event describes.
/// </summary>
/// <example>e68b8629-85eb-4929-92c0-b84464976ba4</example>
public Guid? ServiceAccountId { get; set; }
} }

View File

@ -211,7 +211,7 @@ public class EventTableEntity : IEvent
entities.Add(new EventTableEntity(e) entities.Add(new EventTableEntity(e)
{ {
PartitionKey = pKey, PartitionKey = pKey,
RowKey = $"SecretId={e.CipherId}__Date={dateKey}__Uniquifier={uniquifier}" RowKey = $"SecretId={e.SecretId}__Date={dateKey}__Uniquifier={uniquifier}"
}); });
} }