From a19fc6a2b0f0337caa3f059994e54ff1eb66c6a0 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Mon, 16 Sep 2024 12:30:23 -0400 Subject: [PATCH] [SM-1433] Update SM Event Logs (#4759) * SM-1433: Fix bug using cipherId instead of secretId * SM-1433: Add secretId and serviceAccountId --- .../Public/Models/Response/EventResponseModel.cs | 12 ++++++++++++ .../AdminConsole/Models/Data/EventTableEntity.cs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Api/AdminConsole/Public/Models/Response/EventResponseModel.cs b/src/Api/AdminConsole/Public/Models/Response/EventResponseModel.cs index bc8b77e49..0609a4d78 100644 --- a/src/Api/AdminConsole/Public/Models/Response/EventResponseModel.cs +++ b/src/Api/AdminConsole/Public/Models/Response/EventResponseModel.cs @@ -27,6 +27,8 @@ public class EventResponseModel : IResponseModel Device = ev.DeviceType; IpAddress = ev.IpAddress; InstallationId = ev.InstallationId; + SecretId = ev.SecretId; + ServiceAccountId = ev.ServiceAccountId; } /// @@ -89,4 +91,14 @@ public class EventResponseModel : IResponseModel /// /// 172.16.254.1 public string IpAddress { get; set; } + /// + /// The unique identifier of the related secret that the event describes. + /// + /// e68b8629-85eb-4929-92c0-b84464976ba4 + public Guid? SecretId { get; set; } + /// + /// The unique identifier of the related service account that the event describes. + /// + /// e68b8629-85eb-4929-92c0-b84464976ba4 + public Guid? ServiceAccountId { get; set; } } diff --git a/src/Core/AdminConsole/Models/Data/EventTableEntity.cs b/src/Core/AdminConsole/Models/Data/EventTableEntity.cs index 69365f412..7e863b128 100644 --- a/src/Core/AdminConsole/Models/Data/EventTableEntity.cs +++ b/src/Core/AdminConsole/Models/Data/EventTableEntity.cs @@ -211,7 +211,7 @@ public class EventTableEntity : IEvent entities.Add(new EventTableEntity(e) { PartitionKey = pKey, - RowKey = $"SecretId={e.CipherId}__Date={dateKey}__Uniquifier={uniquifier}" + RowKey = $"SecretId={e.SecretId}__Date={dateKey}__Uniquifier={uniquifier}" }); }