From ed338634c03c9a836961190577196101f04ce6c8 Mon Sep 17 00:00:00 2001 From: Anders Revsgaard Date: Fri, 3 Nov 2023 14:58:35 +0100 Subject: [PATCH] Increase Partition IDs maximum lengths in relation to tenant and track names lengths. Control API return usage log count with one decimal. Resolve Incorrect formatted log property bug. --- .../Controllers/Tracks/TTrackLogController.cs | 4 +-- src/FoxIDs.Control/FoxIDs.Control.csproj | 2 +- src/FoxIDs.Control/Logic/UsageLogLogic.cs | 2 +- .../FoxIDs.ControlClient.csproj | 2 +- .../FoxIDs.ControlShared.csproj | 2 +- src/FoxIDs.Shared/FoxIDs.Shared.csproj | 2 +- src/FoxIDs.SharedBase/Constants.cs | 32 +++++++++---------- .../FoxIDs.SharedBase.csproj | 2 +- src/FoxIDs/FoxIDs.csproj | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/FoxIDs.Control/Controllers/Tracks/TTrackLogController.cs b/src/FoxIDs.Control/Controllers/Tracks/TTrackLogController.cs index 71a7cabe6..78b8291a9 100644 --- a/src/FoxIDs.Control/Controllers/Tracks/TTrackLogController.cs +++ b/src/FoxIDs.Control/Controllers/Tracks/TTrackLogController.cs @@ -326,7 +326,7 @@ private string GetGeneralQueryExtend() => @$"| extend {Constants.Logs.DownPartyId} = Properties.{Constants.Logs.DownPartyId} | extend {Constants.Logs.UpPartyId} = Properties.{Constants.Logs.UpPartyId} | extend {Constants.Logs.SessionId} = Properties.{Constants.Logs.SessionId} -| extend {Constants.Logs.ExternalSequenceId} = Properties.{Constants.Logs.ExternalSequenceId} +| extend {Constants.Logs.ExternalSessionId} = Properties.{Constants.Logs.ExternalSessionId} | extend {Constants.Logs.UserId} = Properties.{Constants.Logs.UserId} | extend {Constants.Logs.Email} = Properties.{Constants.Logs.Email} | extend {Constants.Logs.UserAgent} = Properties.{Constants.Logs.UserAgent}"; @@ -337,7 +337,7 @@ private string GetGeneralQueryWhere(string filter) => {Constants.Logs.UpPartyId} contains '{filter}' or {Constants.Logs.SequenceId} contains '{filter}' or {Constants.Logs.SessionId} contains '{filter}' or -{Constants.Logs.ExternalSequenceId} contains '{filter}' or +{Constants.Logs.ExternalSessionId} contains '{filter}' or {Constants.Logs.UserId} contains '{filter}' or {Constants.Logs.Email} contains '{filter}' or {Constants.Logs.UserAgent} contains '{filter}'"; diff --git a/src/FoxIDs.Control/FoxIDs.Control.csproj b/src/FoxIDs.Control/FoxIDs.Control.csproj index 8bc2d74c3..016293bb5 100644 --- a/src/FoxIDs.Control/FoxIDs.Control.csproj +++ b/src/FoxIDs.Control/FoxIDs.Control.csproj @@ -2,7 +2,7 @@ net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs Anders Revsgaard ITfoxtec diff --git a/src/FoxIDs.Control/Logic/UsageLogLogic.cs b/src/FoxIDs.Control/Logic/UsageLogLogic.cs index b9ba6384a..307a07358 100644 --- a/src/FoxIDs.Control/Logic/UsageLogLogic.cs +++ b/src/FoxIDs.Control/Logic/UsageLogLogic.cs @@ -292,7 +292,7 @@ private double GetCount(LogsTableRow row, Api.UsageLogTypes logType) { count += row.GetDouble("UsageAddRating"); } - return count.HasValue ? count.Value : 0; + return Math.Round(count.HasValue ? count.Value : 0, 1); } private DateTime GetDate(LogsTableRow row) diff --git a/src/FoxIDs.ControlClient/FoxIDs.ControlClient.csproj b/src/FoxIDs.ControlClient/FoxIDs.ControlClient.csproj index d8c95558d..39d50a29d 100644 --- a/src/FoxIDs.ControlClient/FoxIDs.ControlClient.csproj +++ b/src/FoxIDs.ControlClient/FoxIDs.ControlClient.csproj @@ -2,7 +2,7 @@ net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs.Client Anders Revsgaard ITfoxtec diff --git a/src/FoxIDs.ControlShared/FoxIDs.ControlShared.csproj b/src/FoxIDs.ControlShared/FoxIDs.ControlShared.csproj index cbbe3abd5..b7f6ad49b 100644 --- a/src/FoxIDs.ControlShared/FoxIDs.ControlShared.csproj +++ b/src/FoxIDs.ControlShared/FoxIDs.ControlShared.csproj @@ -2,7 +2,7 @@ net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs Anders Revsgaard ITfoxtec diff --git a/src/FoxIDs.Shared/FoxIDs.Shared.csproj b/src/FoxIDs.Shared/FoxIDs.Shared.csproj index 51a12c827..d0499d7e2 100644 --- a/src/FoxIDs.Shared/FoxIDs.Shared.csproj +++ b/src/FoxIDs.Shared/FoxIDs.Shared.csproj @@ -2,7 +2,7 @@ net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs Anders Revsgaard ITfoxtec diff --git a/src/FoxIDs.SharedBase/Constants.cs b/src/FoxIDs.SharedBase/Constants.cs index 30e10a024..a81d012c8 100644 --- a/src/FoxIDs.SharedBase/Constants.cs +++ b/src/FoxIDs.SharedBase/Constants.cs @@ -65,22 +65,22 @@ public static class Logs public const string TrackName = "f_TrackName"; public const string GrantType = "f_GrantType"; public const string Domain = "f_Domain"; - public const string UserAgent = "{Constants.Logs.UserAgent}"; - public const string UpPartyId = "{Constants.Logs.UpPartyId}"; + public const string UserAgent = "f_UserAgent"; + public const string UpPartyId = "f_UpPartyId"; public const string UpPartyClientId = "f_UpPartyClientId"; public const string UpPartyStatus = "f_UpPartyStatus"; - public const string DownPartyId = "{Constants.Logs.DownPartyId}"; + public const string DownPartyId = "f_DownPartyId"; public const string DownPartyClientId = "f_DownPartyClientId"; - public const string SequenceId = "{Constants.Logs.SequenceId}"; - public const string ExternalSequenceId = "f_ExternalSequenceId"; - public const string AccountAction = "f_AccountAction"; + public const string SequenceId = "f_SequenceId"; + public const string ExternalSequenceId = "f_ExternalSequenceId"; + public const string AccountAction = "f_AccountAction"; public const string SequenceCulture = "f_SequenceCulture"; public const string Issuer = "f_Issuer"; public const string Status = "f_Status"; - public const string SessionId = "{Constants.Logs.SessionId}"; - public const string ExternalSessionId = "{Constants.Logs.ExternalSequenceId}"; - public const string UserId = "{Constants.Logs.UserId}"; - public const string Email = "{Constants.Logs.Email}"; + public const string SessionId = "f_SessionId"; + public const string ExternalSessionId = "f_ExternalSessionId"; + public const string UserId = "f_UserId"; + public const string Email = "f_Email"; public const string Type = "f_Type"; public const string FailingLoginCount = "f_FailingLoginCount"; public const string UsageType = "f_UsageType"; @@ -115,7 +115,7 @@ public static class Models public const int MasterPartitionIdLength = 30; public const string MasterPartitionIdExPattern = @"^[\w:@]*$"; - public const int DocumentPartitionIdLength = 70; + public const int DocumentPartitionIdLength = 110; public const string DocumentPartitionIdExPattern = @"^[\w:\-]*$"; public static class Master @@ -188,7 +188,7 @@ public static class Resource public static class Tenant { - public const int IdLength = 50; + public const int IdLength = 70; public const string IdRegExPattern = @"^[a-z0-9_:-]*$"; public const int NameLength = 50; public const string NameRegExPattern = @"^\w[\w\-]*$"; @@ -199,7 +199,7 @@ public static class Tenant public static class Track { - public const int IdLength = 80; + public const int IdLength = 120; public const string IdRegExPattern = @"^[a-z0-9_:-]*$"; public const int NameLength = 50; public const string NameRegExPattern = @"^[\w\-]*$"; @@ -258,7 +258,7 @@ public static class Logging public static class User { - public const int IdLength = 140; + public const int IdLength = 180; public const string IdRegExPattern = @"^[\w:\-.+@]*$"; public const int UserIdLength = 40; public const int ClaimsMin = 0; @@ -312,7 +312,7 @@ public static class Party { public const int NameLength = 50; public const string NameRegExPattern = @"^[\w\-]*$"; - public const int IdLength = 110; + public const int IdLength = 170; public const string IdRegExPattern = @"^[\w:\-]*$"; public const int NoteLength = 200; @@ -352,7 +352,7 @@ public static class Client public const int RedirectUrisMin = 0; public const int RedirectUrisMax = 200; public const int RedirectUriLength = 500; - public const int RedirectUriSumLength = 20000; + public const int RedirectUriSumLength = 25000; public const int SecretsMin = 0; public const int SecretsMax = 10; public const int ClientKeysMin = 0; diff --git a/src/FoxIDs.SharedBase/FoxIDs.SharedBase.csproj b/src/FoxIDs.SharedBase/FoxIDs.SharedBase.csproj index 779df1f44..054987623 100644 --- a/src/FoxIDs.SharedBase/FoxIDs.SharedBase.csproj +++ b/src/FoxIDs.SharedBase/FoxIDs.SharedBase.csproj @@ -2,7 +2,7 @@ net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs Anders Revsgaard ITfoxtec diff --git a/src/FoxIDs/FoxIDs.csproj b/src/FoxIDs/FoxIDs.csproj index 3e45c856d..1cfe28a7b 100644 --- a/src/FoxIDs/FoxIDs.csproj +++ b/src/FoxIDs/FoxIDs.csproj @@ -1,7 +1,7 @@  net7.0 - 1.1.2.0 + 1.1.3.0 FoxIDs Anders Revsgaard ITfoxtec