@oneuptime/common 12.0.15 → 12.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/Index.ts +10 -0
- package/Models/AnalyticsModels/LogCountBaseline.ts +174 -0
- package/Models/AnalyticsModels/SecurityEvent.ts +794 -0
- package/Models/AnalyticsModels/Span.ts +29 -1
- package/Models/AnalyticsModels/SpanCountBaseline.ts +198 -0
- package/Models/DatabaseModels/Alert.ts +42 -0
- package/Models/DatabaseModels/AlertMeasurement.ts +1114 -0
- package/Models/DatabaseModels/AlertMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/AlertStateTimeline.ts +10 -2
- package/Models/DatabaseModels/BillingPaymentMethod.ts +8 -10
- package/Models/DatabaseModels/DetectionRule.ts +487 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +382 -0
- package/Models/DatabaseModels/Incident.ts +42 -0
- package/Models/DatabaseModels/IncidentMeasurement.ts +1114 -0
- package/Models/DatabaseModels/IncidentMeasurementValue.ts +501 -0
- package/Models/DatabaseModels/IncidentStateTimeline.ts +10 -2
- package/Models/DatabaseModels/IncomingCallPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/IncomingCallPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Index.ts +20 -0
- package/Models/DatabaseModels/Label.ts +11 -0
- package/Models/DatabaseModels/LlmCostBudget.ts +655 -0
- package/Models/DatabaseModels/LlmModelPrice.ts +481 -0
- package/Models/DatabaseModels/LogSavedView.ts +87 -0
- package/Models/DatabaseModels/MarketingConversion.ts +210 -8
- package/Models/DatabaseModels/MetricSavedView.ts +59 -0
- package/Models/DatabaseModels/OnCallDutyPolicyLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.ts +42 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.ts +36 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.ts +42 -0
- package/Models/DatabaseModels/Probe.ts +21 -0
- package/Models/DatabaseModels/RunbookLabelRule.ts +36 -0
- package/Models/DatabaseModels/RunbookOwnerRule.ts +42 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.ts +1104 -0
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.ts +491 -0
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.ts +10 -2
- package/Models/DatabaseModels/StatusPageLabelRule.ts +36 -0
- package/Models/DatabaseModels/StatusPageOwnerRule.ts +42 -0
- package/Models/DatabaseModels/TableView.ts +15 -0
- package/Models/DatabaseModels/Team.ts +13 -0
- package/Models/DatabaseModels/TeamMember.ts +8 -0
- package/Models/DatabaseModels/TraceSavedView.ts +52 -0
- package/Models/DatabaseModels/WorkflowLabelRule.ts +36 -0
- package/Models/DatabaseModels/WorkflowOwnerRule.ts +42 -0
- package/Server/API/TelemetryAPI.ts +252 -6
- package/Server/API/UserAPI.ts +88 -0
- package/Server/EnvironmentConfig.ts +36 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.ts +88 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.ts +457 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.ts +97 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.ts +45 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.ts +105 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.ts +77 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +12 -0
- package/Server/Middleware/IdentityRateLimit.ts +672 -0
- package/Server/Services/AccessTokenService.ts +15 -2
- package/Server/Services/AlertMeasurementService.ts +302 -0
- package/Server/Services/AlertMeasurementValueService.ts +508 -0
- package/Server/Services/AlertService.ts +50 -0
- package/Server/Services/AlertStateTimelineService.ts +54 -0
- package/Server/Services/DetectionRuleService.ts +74 -0
- package/Server/Services/GoogleSecOpsConnectionService.ts +89 -0
- package/Server/Services/IncidentMeasurementService.ts +304 -0
- package/Server/Services/IncidentMeasurementValueService.ts +523 -0
- package/Server/Services/IncidentService.ts +51 -0
- package/Server/Services/IncidentStateTimelineService.ts +54 -0
- package/Server/Services/Index.ts +30 -0
- package/Server/Services/LlmCostBudgetService.ts +93 -0
- package/Server/Services/LlmModelPriceService.ts +202 -0
- package/Server/Services/LogAggregationService.ts +1106 -2
- package/Server/Services/LogCountBaselineService.ts +163 -0
- package/Server/Services/MutableMetricService.ts +30 -9
- package/Server/Services/ScheduledMaintenanceMeasurementService.ts +311 -0
- package/Server/Services/ScheduledMaintenanceMeasurementValueService.ts +546 -0
- package/Server/Services/ScheduledMaintenanceService.ts +53 -0
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +188 -1
- package/Server/Services/SecurityEventService.ts +104 -0
- package/Server/Services/SpanCountBaselineService.ts +173 -0
- package/Server/Services/StatusPageService.ts +4 -3
- package/Server/Services/TelemetryUsageBillingService.ts +17 -2
- package/Server/Services/UserService.ts +284 -51
- package/Server/Services/UserTotpAuthService.ts +27 -86
- package/Server/Services/UserWebAuthnService.ts +26 -86
- package/Server/Types/Billing/MeteredPlan/AllMeteredPlans.ts +14 -0
- package/Server/Types/Database/Permissions/TenantPermission.ts +10 -0
- package/Server/Types/Database/QueryHelper.ts +1 -1
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +1 -1
- package/Server/Utils/AI/Toolbox/Index.ts +6 -0
- package/Server/Utils/AI/Toolbox/SecurityEventTools.ts +349 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +13 -4
- package/Server/Utils/Attribution.ts +130 -34
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +98 -16
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +70 -7
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +54 -16
- package/Server/Utils/Marketing/Providers/Meta.ts +52 -18
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +37 -10
- package/Server/Utils/Marketing/Providers/Reddit.ts +45 -15
- package/Server/Utils/Measurement/MeasurementDefinitionValidator.ts +209 -0
- package/Server/Utils/Measurement/MeasurementMetricWriter.ts +189 -0
- package/Server/Utils/Monitor/Criteria/CountAnomaly.ts +182 -0
- package/Server/Utils/Monitor/Criteria/LogMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.ts +35 -0
- package/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.ts +132 -0
- package/Server/Utils/Monitor/DataToProcess.ts +2 -0
- package/Server/Utils/Monitor/MonitorCriteriaDataExtractor.ts +14 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -0
- package/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.ts +20 -0
- package/Server/Utils/Monitor/MonitorResource.ts +16 -0
- package/Server/Utils/Monitor/MonitorStepResourceIdentity.ts +1 -0
- package/Server/Utils/Monitor/MonitorStepsReferenceExtractor.ts +1 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +548 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.ts +262 -0
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +212 -0
- package/Server/Utils/SecurityEvent/SecurityEventRow.ts +101 -0
- package/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.ts +635 -0
- package/Server/Utils/Telemetry/LlmCostBudgetEvaluator.ts +379 -0
- package/Server/Utils/Telemetry/LlmSpan.ts +83 -4
- package/Server/Utils/Telemetry/LogErrorPatternSql.ts +136 -0
- package/Server/Utils/UserPermission/UserPermission.ts +57 -1
- package/Tests/App/Dashboard/AlertsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/CreatePageEntryPointPermissions.test.tsx +306 -0
- package/Tests/App/Dashboard/DangerZone.test.tsx +11 -0
- package/Tests/App/Dashboard/IncidentsSideMenu.test.tsx +4 -0
- package/Tests/App/Dashboard/LogMonitorAttributeOperatorPreview.test.tsx +459 -0
- package/Tests/App/Dashboard/OverviewCustomFields.test.tsx +24 -0
- package/Tests/App/Dashboard/ScheduledMaintenanceSideMenu.test.tsx +6 -0
- package/Tests/Models/DatabaseModels/DomainRoleTierCoverage.test.ts +323 -0
- package/Tests/Models/DatabaseModels/ProjectSharedResources.test.ts +386 -0
- package/Tests/Server/API/LogErrorPatternAPI.test.ts +811 -0
- package/Tests/Server/API/UserAuthenticationAPI.test.ts +11 -0
- package/Tests/Server/API/UserProjectsAPI.test.ts +11 -2
- package/Tests/Server/API/UserTwoFactorAuthAdminAPI.test.ts +918 -0
- package/Tests/Server/Infrastructure/LocalCache.test.ts +149 -0
- package/Tests/Server/Services/AccessTokenProjectUserGrant.test.ts +249 -0
- package/Tests/Server/Services/AlertMeasurementService.test.ts +665 -0
- package/Tests/Server/Services/AlertMeasurementValueService.test.ts +389 -0
- package/Tests/Server/Services/DetectionRuleService.test.ts +254 -0
- package/Tests/Server/Services/IncidentMeasurementService.test.ts +394 -0
- package/Tests/Server/Services/IncidentMeasurementValueService.test.ts +816 -0
- package/Tests/Server/Services/LlmCostBudgetService.test.ts +104 -0
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +405 -0
- package/Tests/Server/Services/LogErrorPatternAggregation.test.ts +804 -0
- package/Tests/Server/Services/MutableMetricNameRouting.test.ts +83 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementService.test.ts +750 -0
- package/Tests/Server/Services/ScheduledMaintenanceMeasurementValueService.test.ts +478 -0
- package/Tests/Server/Services/UserAuthenticationService.test.ts +216 -4
- package/Tests/Server/Services/UserTwoFactorAuthAdmin.test.ts +1190 -0
- package/Tests/Server/Types/Database/Permissions/ScopedRoleSharedResourceAccess.test.ts +466 -0
- package/Tests/Server/Types/Database/QueryHelperOperators.test.ts +265 -0
- package/Tests/Server/Types/Database/QueryHelperTextAndStructuralOperators.test.ts +206 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClusterAwareSchema.test.ts +6 -0
- package/Tests/Server/Utils/AnalyticsDatabase/FractionalAttributeThreshold.test.ts +224 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +172 -2
- package/Tests/Server/Utils/Attribution.test.ts +228 -1
- package/Tests/Server/Utils/Marketing/AdUploadableConversionTypes.test.ts +153 -92
- package/Tests/Server/Utils/Marketing/ConversionUploadProvider.test.ts +123 -6
- package/Tests/Server/Utils/Marketing/GoogleAds.test.ts +253 -1
- package/Tests/Server/Utils/Marketing/LinkedIn.test.ts +282 -0
- package/Tests/Server/Utils/Marketing/Meta.test.ts +304 -0
- package/Tests/Server/Utils/Marketing/MicrosoftAds.test.ts +263 -0
- package/Tests/Server/Utils/Marketing/Reddit.test.ts +259 -0
- package/Tests/Server/Utils/Measurement/MeasurementDefinitionValidator.test.ts +322 -0
- package/Tests/Server/Utils/Measurement/MeasurementMetricWriter.test.ts +373 -0
- package/Tests/Server/Utils/Monitor/Criteria/CountAnomaly.test.ts +221 -0
- package/Tests/Server/Utils/Monitor/Criteria/LogMonitorCriteria.test.ts +236 -0
- package/Tests/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.test.ts +147 -0
- package/Tests/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.test.ts +274 -0
- package/Tests/Server/Utils/Monitor/SecurityEventsMonitorDataExtractor.test.ts +93 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +660 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsClient.test.ts +308 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +271 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventRow.test.ts +272 -0
- package/Tests/Server/Utils/SecurityEvent/SigmaClickhouseCompiler.test.ts +511 -0
- package/Tests/Server/Utils/Telemetry/LlmCostBudgetEvaluator.test.ts +497 -0
- package/Tests/Server/Utils/Telemetry/LlmSpan.test.ts +380 -0
- package/Tests/Server/Utils/Telemetry/LogErrorPatternSql.test.ts +207 -0
- package/Tests/Server/Utils/UserPermission/ProjectUserGrant.test.ts +293 -0
- package/Tests/Types/Monitor/MonitorStepInfraMonitorUtils.test.ts +194 -0
- package/Tests/Types/Monitor/MonitorStepSecurityEventsMonitor.test.ts +201 -0
- package/Tests/Types/SecurityEvent/OcsfEventClass.test.ts +105 -0
- package/Tests/Types/SecurityEvent/OcsfSeverity.test.ts +111 -0
- package/Tests/Types/Telemetry/LlmCostCatalog.test.ts +516 -0
- package/Tests/UI/Components/ActiveFilterChipsOperatorValues.test.tsx +222 -0
- package/Tests/UI/Components/BulkActionPermissionGating.test.tsx +296 -0
- package/Tests/UI/Components/CardModelDetailPermissionGating.test.tsx +305 -0
- package/Tests/UI/Components/CustomFields/CustomFieldsDetail.test.tsx +23 -0
- package/Tests/UI/Components/DictionaryFilterOperatorDisplay.test.ts +239 -0
- package/Tests/UI/Components/DisabledButtonTooltip.test.tsx +267 -0
- package/Tests/UI/Components/DuplicateModel.test.tsx +37 -0
- package/Tests/UI/Components/ModelCardPermissionGating.test.tsx +348 -0
- package/Tests/UI/Components/ModelDelete.test.tsx +25 -1
- package/Tests/UI/Components/ModelFormCreatePermission.test.tsx +342 -0
- package/Tests/UI/Components/ModelTable/BaseModelTablePermissionGating.test.tsx +680 -0
- package/Tests/UI/Components/OrderedStatesListCreateGate.test.tsx +174 -0
- package/Tests/UI/Components/SavedViewsDropdownSearch.test.tsx +1127 -0
- package/Tests/UI/Components/SavedViewsFacetSection.test.tsx +958 -0
- package/Tests/UI/Components/SavedViewsList.test.ts +699 -0
- package/Tests/UI/Components/SavedViewsSidebarIntegration.test.tsx +640 -0
- package/Tests/UI/Components/SavedViewsSurfaceParity.test.tsx +679 -0
- package/Tests/UI/Components/TableViewLoadFailure.test.tsx +248 -0
- package/Tests/UI/Types/UseComponentOutsideClick.test.tsx +226 -0
- package/Tests/UI/Utils/PermissionGate.test.ts +467 -0
- package/Tests/Utils/Measurement/MeasurementEvaluator.test.ts +639 -0
- package/Tests/Utils/Monitor/MonitorSummarySnapshotUtil.test.ts +1 -0
- package/Tests/Utils/Monitor/NetworkDeviceLinkRuleUtil.test.ts +285 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +433 -0
- package/Tests/Utils/SecurityEvent/GenericNormalizer.test.ts +204 -0
- package/Tests/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.test.ts +252 -0
- package/Tests/Utils/SecurityEvent/NormalizerHelpers.test.ts +274 -0
- package/Tests/Utils/SecurityEvent/OcsfNormalizer.test.ts +208 -0
- package/Tests/Utils/SecurityEvent/SecurityEventNormalizer.test.ts +172 -0
- package/Tests/Utils/SecurityEvent/SigmaRuleParser.test.ts +471 -0
- package/Tests/Utils/SecurityEvent/UdmNormalizer.test.ts +361 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +82 -0
- package/Tests/Utils/Telemetry/LogErrorPattern.test.ts +463 -0
- package/Types/AI/AIChatTypes.ts +1 -0
- package/Types/Alerts/AlertMeasurementAnchorType.ts +14 -0
- package/Types/Alerts/AlertStateRole.ts +11 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +16 -0
- package/Types/Dashboard/Chart/ChartType.ts +1 -0
- package/Types/Dashboard/DashboardComponentType.ts +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.ts +18 -0
- package/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.ts +16 -0
- package/Types/Incident/IncidentMeasurementAnchorType.ts +34 -0
- package/Types/Incident/IncidentStateRole.ts +14 -0
- package/Types/Marketing/Attribution.ts +75 -0
- package/Types/Marketing/MarketingConversion.ts +37 -7
- package/Types/Measurement/MeasurementAggregationType.ts +43 -0
- package/Types/Measurement/MeasurementAnchorKind.ts +23 -0
- package/Types/Measurement/MeasurementOccurrence.ts +14 -0
- package/Types/Measurement/MeasurementStatus.ts +34 -0
- package/Types/MeteredPlan/ProductType.ts +1 -0
- package/Types/Monitor/CriteriaFilter.ts +3 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +64 -0
- package/Types/Monitor/MonitorStep.ts +28 -0
- package/Types/Monitor/MonitorStepSecurityEventsMonitor.ts +100 -0
- package/Types/Monitor/MonitorType.ts +20 -0
- package/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.ts +17 -0
- package/Types/Permission.ts +399 -2
- package/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.ts +20 -0
- package/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.ts +16 -0
- package/Types/SecurityEvent/NormalizedSecurityEvent.ts +92 -0
- package/Types/SecurityEvent/OcsfEventClass.ts +205 -0
- package/Types/SecurityEvent/OcsfSeverity.ts +88 -0
- package/Types/SecurityEvent/SecurityEventFormat.ts +23 -0
- package/Types/SecurityEvent/SigmaRule.ts +70 -0
- package/Types/Telemetry/LlmConventions.ts +20 -1
- package/Types/Telemetry/LlmCostCatalog.ts +557 -0
- package/Types/Telemetry/ServiceType.ts +1 -0
- package/Types/Telemetry/TelemetryRetentionConfig.ts +5 -1
- package/Types/Telemetry/TelemetryType.ts +1 -0
- package/Types/TwoFactorAuthStatus.ts +42 -0
- package/Types/UserAuthenticationStatus.ts +18 -0
- package/UI/Components/ActionButton/ActionButtonSchema.ts +7 -0
- package/UI/Components/BulkUpdate/BulkArchiveActions.tsx +35 -2
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +34 -1
- package/UI/Components/BulkUpdate/BulkOwnerActions.tsx +45 -1
- package/UI/Components/BulkUpdate/BulkUpdateForm.tsx +3 -0
- package/UI/Components/Button/Button.tsx +37 -2
- package/UI/Components/Card/Card.tsx +6 -0
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +24 -1
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +57 -0
- package/UI/Components/DuplicateModel/DuplicateModel.tsx +16 -0
- package/UI/Components/Forms/ModelForm.tsx +54 -2
- package/UI/Components/List/ListRow.tsx +6 -0
- package/UI/Components/LogsViewer/components/ActiveFilterChips.tsx +34 -7
- package/UI/Components/LogsViewer/components/LogsFacetSidebar.tsx +7 -40
- package/UI/Components/LogsViewer/components/SavedViewsDropdown.tsx +155 -3
- package/UI/Components/ModelDelete/ModelDelete.tsx +20 -0
- package/UI/Components/ModelDetail/CardModelDetail.tsx +36 -23
- package/UI/Components/ModelList/ModelList.tsx +21 -2
- package/UI/Components/ModelList/StaticModelList.tsx +11 -0
- package/UI/Components/ModelTable/BaseModelTable.tsx +168 -62
- package/UI/Components/ModelTable/ModelTable.tsx +16 -10
- package/UI/Components/ModelTable/TableView.tsx +36 -4
- package/UI/Components/MoreMenu/MoreMenuItem.tsx +36 -4
- package/UI/Components/OrderedStatesList/Item.tsx +6 -0
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +81 -47
- package/UI/Components/ResetObjectID/ResetObjectID.tsx +16 -0
- package/UI/Components/SavedViews/SavedViewsFacetSection.tsx +242 -0
- package/UI/Components/SavedViews/SavedViewsList.ts +168 -0
- package/UI/Components/SavedViews/SavedViewsSearchInput.tsx +46 -0
- package/UI/Components/SavedViews/SavedViewsShowMoreButton.tsx +44 -0
- package/UI/Components/Table/TableRow.tsx +12 -0
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +152 -2
- package/UI/Types/UseComponentOutsideClick.ts +47 -0
- package/UI/Utils/PermissionGate.ts +277 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.ts +84 -0
- package/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.ts +110 -0
- package/Utils/Dashboard/Components/Index.ts +14 -0
- package/Utils/Measurement/MeasurementEvaluator.ts +359 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.ts +1 -0
- package/Utils/Monitor/NetworkDeviceLinkRuleUtil.ts +93 -11
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +231 -0
- package/Utils/SecurityEvent/GenericNormalizer.ts +208 -0
- package/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.ts +206 -0
- package/Utils/SecurityEvent/NormalizerHelpers.ts +263 -0
- package/Utils/SecurityEvent/OcsfNormalizer.ts +194 -0
- package/Utils/SecurityEvent/SecurityEventNormalizer.ts +82 -0
- package/Utils/SecurityEvent/Sigma/SigmaRuleParser.ts +579 -0
- package/Utils/SecurityEvent/UdmNormalizer.ts +442 -0
- package/Utils/Telemetry/CrossSignalScope.ts +46 -9
- package/Utils/Telemetry/LogErrorPattern.ts +350 -0
- package/build/dist/Models/AnalyticsModels/Index.js +10 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js +159 -0
- package/build/dist/Models/AnalyticsModels/LogCountBaseline.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js +596 -0
- package/build/dist/Models/AnalyticsModels/SecurityEvent.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/Span.js +24 -1
- package/build/dist/Models/AnalyticsModels/Span.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js +181 -0
- package/build/dist/Models/AnalyticsModels/SpanCountBaseline.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Alert.js +43 -0
- package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/AlertMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/AlertStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js +10 -11
- package/build/dist/Models/DatabaseModels/BillingPaymentMethod.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +517 -0
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +410 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +43 -0
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js +1143 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js +523 -0
- package/build/dist/Models/DatabaseModels/IncidentMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/IncidentStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +20 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Label.js +11 -0
- package/build/dist/Models/DatabaseModels/Label.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js +681 -0
- package/build/dist/Models/DatabaseModels/LlmCostBudget.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js +503 -0
- package/build/dist/Models/DatabaseModels/LlmModelPrice.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js +87 -0
- package/build/dist/Models/DatabaseModels/LogSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +224 -8
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +59 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Probe.js +21 -0
- package/build/dist/Models/DatabaseModels/Probe.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/RunbookLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/RunbookOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +1133 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +515 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +9 -2
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/StatusPageLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/StatusPageOwnerRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TableView.js +15 -0
- package/build/dist/Models/DatabaseModels/TableView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Team.js +13 -0
- package/build/dist/Models/DatabaseModels/Team.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TeamMember.js +8 -0
- package/build/dist/Models/DatabaseModels/TeamMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TraceSavedView.js +52 -0
- package/build/dist/Models/DatabaseModels/TraceSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js +36 -0
- package/build/dist/Models/DatabaseModels/WorkflowLabelRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js +42 -0
- package/build/dist/Models/DatabaseModels/WorkflowOwnerRule.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +136 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserAPI.js +75 -2
- package/build/dist/Server/API/UserAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +29 -1
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js +36 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788000000000-AddDetectionRuleAndGoogleSecOpsConnection.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js +162 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788100000000-AddMeasurements.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js +40 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788200000000-AddLlmCostBudget.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788300000000-AddLlmModelPrice.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js +52 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788400000000-AddMarketingConversionAttribution.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1788500000000-RemoveLlmCostBudgetAlertColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +12 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +491 -0
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -0
- package/build/dist/Server/Services/AccessTokenService.js +13 -2
- package/build/dist/Server/Services/AccessTokenService.js.map +1 -1
- package/build/dist/Server/Services/AlertMeasurementService.js +250 -0
- package/build/dist/Server/Services/AlertMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js +400 -0
- package/build/dist/Server/Services/AlertMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/AlertService.js +37 -0
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/AlertStateTimelineService.js +48 -0
- package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/DetectionRuleService.js +50 -0
- package/build/dist/Server/Services/DetectionRuleService.js.map +1 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js +55 -0
- package/build/dist/Server/Services/GoogleSecOpsConnectionService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js +252 -0
- package/build/dist/Server/Services/IncidentMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js +413 -0
- package/build/dist/Server/Services/IncidentMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/IncidentService.js +41 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +50 -0
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +30 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmCostBudgetService.js +89 -0
- package/build/dist/Server/Services/LlmCostBudgetService.js.map +1 -0
- package/build/dist/Server/Services/LlmModelPriceService.js +163 -0
- package/build/dist/Server/Services/LlmModelPriceService.js.map +1 -0
- package/build/dist/Server/Services/LogAggregationService.js +709 -0
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/LogCountBaselineService.js +112 -0
- package/build/dist/Server/Services/LogCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/MutableMetricService.js +28 -9
- package/build/dist/Server/Services/MutableMetricService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js +254 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js +434 -0
- package/build/dist/Server/Services/ScheduledMaintenanceMeasurementValueService.js.map +1 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js +37 -0
- package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +134 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/SecurityEventService.js +64 -0
- package/build/dist/Server/Services/SecurityEventService.js.map +1 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js +122 -0
- package/build/dist/Server/Services/SpanCountBaselineService.js.map +1 -0
- package/build/dist/Server/Services/StatusPageService.js +4 -3
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryUsageBillingService.js +15 -3
- package/build/dist/Server/Services/TelemetryUsageBillingService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +262 -42
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTotpAuthService.js +0 -73
- package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -1
- package/build/dist/Server/Services/UserWebAuthnService.js +1 -73
- package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -1
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js +13 -0
- package/build/dist/Server/Types/Billing/MeteredPlan/AllMeteredPlans.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +10 -0
- package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +3 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js +257 -0
- package/build/dist/Server/Utils/AI/Toolbox/SecurityEventTools.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +13 -4
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +77 -33
- package/build/dist/Server/Utils/Attribution.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +46 -9
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +52 -8
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +41 -17
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +42 -18
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +24 -11
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +34 -15
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -1
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js +109 -0
- package/build/dist/Server/Utils/Measurement/MeasurementDefinitionValidator.js.map +1 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js +131 -0
- package/build/dist/Server/Utils/Measurement/MeasurementMetricWriter.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js +111 -0
- package/build/dist/Server/Utils/Monitor/Criteria/CountAnomaly.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/LogMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js +35 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SecurityEventsMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js +84 -1
- package/build/dist/Server/Utils/Monitor/Criteria/TraceMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js +7 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaDataExtractor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +12 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js +9 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaObservationBuilder.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +10 -0
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js +6 -5
- package/build/dist/Server/Utils/Monitor/MonitorStepResourceIdentity.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorStepsReferenceExtractor.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +404 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js +145 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +176 -0
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js +69 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventRow.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js +493 -0
- package/build/dist/Server/Utils/SecurityEvent/Sigma/SigmaClickhouseCompiler.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js +317 -0
- package/build/dist/Server/Utils/Telemetry/LlmCostBudgetEvaluator.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js +56 -4
- package/build/dist/Server/Utils/Telemetry/LlmSpan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js +112 -0
- package/build/dist/Server/Utils/Telemetry/LogErrorPatternSql.js.map +1 -0
- package/build/dist/Server/Utils/UserPermission/UserPermission.js +46 -1
- package/build/dist/Server/Utils/UserPermission/UserPermission.js.map +1 -1
- package/build/dist/Types/AI/AIChatTypes.js +1 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js +15 -0
- package/build/dist/Types/Alerts/AlertMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Alerts/AlertStateRole.js +12 -0
- package/build/dist/Types/Alerts/AlertStateRole.js.map +1 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +16 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/Dashboard/Chart/ChartType.js +1 -0
- package/build/dist/Types/Dashboard/Chart/ChartType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js +29 -0
- package/build/dist/Types/Incident/IncidentMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/Incident/IncidentStateRole.js +15 -0
- package/build/dist/Types/Incident/IncidentStateRole.js.map +1 -0
- package/build/dist/Types/Marketing/Attribution.js +68 -0
- package/build/dist/Types/Marketing/Attribution.js.map +1 -0
- package/build/dist/Types/Marketing/MarketingConversion.js +36 -7
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -1
- package/build/dist/Types/Measurement/MeasurementAggregationType.js +40 -0
- package/build/dist/Types/Measurement/MeasurementAggregationType.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js +22 -0
- package/build/dist/Types/Measurement/MeasurementAnchorKind.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js +15 -0
- package/build/dist/Types/Measurement/MeasurementOccurrence.js.map +1 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js +32 -0
- package/build/dist/Types/Measurement/MeasurementStatus.js.map +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js +1 -0
- package/build/dist/Types/MeteredPlan/ProductType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +2 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +59 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +17 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js +64 -0
- package/build/dist/Types/Monitor/MonitorStepSecurityEventsMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +19 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/SecurityEventsMonitor/SecurityEventsMonitorResponse.js.map +1 -0
- package/build/dist/Types/Permission.js +347 -2
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js +19 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceMeasurementAnchorType.js.map +1 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js +17 -0
- package/build/dist/Types/ScheduledMaintenance/ScheduledMaintenanceStateRole.js.map +1 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js +2 -0
- package/build/dist/Types/SecurityEvent/NormalizedSecurityEvent.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js +181 -0
- package/build/dist/Types/SecurityEvent/OcsfEventClass.js.map +1 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js +81 -0
- package/build/dist/Types/SecurityEvent/OcsfSeverity.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js +21 -0
- package/build/dist/Types/SecurityEvent/SecurityEventFormat.js.map +1 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js +16 -0
- package/build/dist/Types/SecurityEvent/SigmaRule.js.map +1 -0
- package/build/dist/Types/Telemetry/LlmConventions.js +19 -1
- package/build/dist/Types/Telemetry/LlmConventions.js.map +1 -1
- package/build/dist/Types/Telemetry/LlmCostCatalog.js +484 -0
- package/build/dist/Types/Telemetry/LlmCostCatalog.js.map +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js +1 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryRetentionConfig.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetryType.js +1 -0
- package/build/dist/Types/Telemetry/TelemetryType.js.map +1 -1
- package/build/dist/Types/TwoFactorAuthStatus.js +41 -0
- package/build/dist/Types/TwoFactorAuthStatus.js.map +1 -0
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js +16 -2
- package/build/dist/UI/Components/BulkUpdate/BulkArchiveActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +15 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js +20 -1
- package/build/dist/UI/Components/BulkUpdate/BulkOwnerActions.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkUpdateForm.js.map +1 -1
- package/build/dist/UI/Components/Button/Button.js +22 -1
- package/build/dist/UI/Components/Button/Button.js.map +1 -1
- package/build/dist/UI/Components/Card/Card.js +1 -1
- package/build/dist/UI/Components/Card/Card.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +14 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +47 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js +8 -0
- package/build/dist/UI/Components/DuplicateModel/DuplicateModel.js.map +1 -1
- package/build/dist/UI/Components/Forms/ModelForm.js +40 -1
- package/build/dist/UI/Components/Forms/ModelForm.js.map +1 -1
- package/build/dist/UI/Components/List/ListRow.js +4 -1
- package/build/dist/UI/Components/List/ListRow.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js +32 -7
- package/build/dist/UI/Components/LogsViewer/components/ActiveFilterChips.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js +2 -17
- package/build/dist/UI/Components/LogsViewer/components/LogsFacetSidebar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/LogsViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js +13 -0
- package/build/dist/UI/Components/ModelDelete/ModelDelete.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js +27 -11
- package/build/dist/UI/Components/ModelDetail/CardModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +13 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js +4 -1
- package/build/dist/UI/Components/ModelList/StaticModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +101 -40
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/ModelTable.js +9 -7
- package/build/dist/UI/Components/ModelTable/ModelTable.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/TableView.js +32 -4
- package/build/dist/UI/Components/ModelTable/TableView.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js +19 -2
- package/build/dist/UI/Components/MoreMenu/MoreMenuItem.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js +4 -1
- package/build/dist/UI/Components/OrderedStatesList/Item.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +33 -32
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js +8 -0
- package/build/dist/UI/Components/ResetObjectID/ResetObjectID.js.map +1 -1
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js +98 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsFacetSection.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js +99 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsList.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js +17 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsSearchInput.js.map +1 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js +15 -0
- package/build/dist/UI/Components/SavedViews/SavedViewsShowMoreButton.js.map +1 -0
- package/build/dist/UI/Components/Table/TableRow.js +8 -2
- package/build/dist/UI/Components/Table/TableRow.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +93 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Types/UseComponentOutsideClick.js +39 -0
- package/build/dist/UI/Types/UseComponentOutsideClick.js.map +1 -1
- package/build/dist/UI/Utils/PermissionGate.js +164 -0
- package/build/dist/UI/Utils/PermissionGate.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsFlowComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js +92 -0
- package/build/dist/Utils/Dashboard/Components/DashboardSecurityEventsListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +8 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js +210 -0
- package/build/dist/Utils/Measurement/MeasurementEvaluator.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js +1 -0
- package/build/dist/Utils/Monitor/MonitorSummarySnapshotUtil.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js +51 -10
- package/build/dist/Utils/Monitor/NetworkDeviceLinkRuleUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +108 -0
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js +176 -0
- package/build/dist/Utils/SecurityEvent/GenericNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js +146 -0
- package/build/dist/Utils/SecurityEvent/GoogleSecOpsAlertNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js +196 -0
- package/build/dist/Utils/SecurityEvent/NormalizerHelpers.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js +136 -0
- package/build/dist/Utils/SecurityEvent/OcsfNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js +64 -0
- package/build/dist/Utils/SecurityEvent/SecurityEventNormalizer.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js +388 -0
- package/build/dist/Utils/SecurityEvent/Sigma/SigmaRuleParser.js.map +1 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js +328 -0
- package/build/dist/Utils/SecurityEvent/UdmNormalizer.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +29 -7
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/build/dist/Utils/Telemetry/LogErrorPattern.js +284 -0
- package/build/dist/Utils/Telemetry/LogErrorPattern.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import Redis from "../Infrastructure/Redis";
|
|
2
|
+
import logger from "../Utils/Logger";
|
|
3
|
+
import resolveTrustedClientIp from "../Utils/ClientIp";
|
|
4
|
+
import Response from "../Utils/Response";
|
|
5
|
+
import ServiceUnavailableException from "../../Types/Exception/ServiceUnavailableException";
|
|
6
|
+
import TooManyRequestsException from "../../Types/Exception/TooManyRequestsException";
|
|
7
|
+
/*
|
|
8
|
+
* Attempt limiting for the anonymous identity routes that accept a
|
|
9
|
+
* credential: POST /login, POST /verify-totp-auth, POST /verify-webauthn-auth
|
|
10
|
+
* and POST /verify-totp-enrolment
|
|
11
|
+
* (App/FeatureSet/Identity/API/Authentication.ts).
|
|
12
|
+
*
|
|
13
|
+
* WHY THESE ROUTES NEED IT
|
|
14
|
+
*
|
|
15
|
+
* All three are unauthenticated by definition -- they are how a session is
|
|
16
|
+
* obtained -- so nothing upstream of them counts anything. Until this
|
|
17
|
+
* middleware existed a caller could submit credentials to them as fast as the
|
|
18
|
+
* process would answer.
|
|
19
|
+
*
|
|
20
|
+
* /verify-totp-auth is the sharpest case. It is reached with a valid password
|
|
21
|
+
* already in hand, and the only thing left to produce is a six digit code, so
|
|
22
|
+
* unthrottled it is an online guessing oracle against a 10^6 space. The space
|
|
23
|
+
* is not even 10^6 wide at any given instant: Common/Server/Utils/TotpAuth.ts
|
|
24
|
+
* accepts TotpValidationWindow = 3 steps either side of now (seven 30 second
|
|
25
|
+
* steps, +/- 90 seconds) across both entries in SupportedTotpAlgorithms, so
|
|
26
|
+
* fourteen distinct six digit strings are live at once and a single guess
|
|
27
|
+
* lands with probability ~1.4e-5. At a few thousand requests a second that is
|
|
28
|
+
* a bypassed second factor in minutes. Bounded to the budgets below it is
|
|
29
|
+
* years, and the account owner sees the failures.
|
|
30
|
+
*
|
|
31
|
+
* /login is the same shape one step earlier, against a password rather than a
|
|
32
|
+
* code.
|
|
33
|
+
*
|
|
34
|
+
* /verify-webauthn-auth and /verify-totp-enrolment are covered for a reason
|
|
35
|
+
* that holds whatever their own factor is worth. All four routes share one
|
|
36
|
+
* `login()` function and all of them run the same `verifyHashedColumnValue`
|
|
37
|
+
* before they reach their factor, so each is a password oracle in its own
|
|
38
|
+
* right. Leaving any one of them unlimited would not be an unguarded route so
|
|
39
|
+
* much as a hole in the fence: an attacker refused at /login points the same
|
|
40
|
+
* guesses at whichever sibling still answers. The enrolment route makes that
|
|
41
|
+
* concrete -- guessing its CODE is pointless, because /login hands the user
|
|
42
|
+
* the secret it is derived from, but guessing the PASSWORD it demands first is
|
|
43
|
+
* exactly as useful there as anywhere else.
|
|
44
|
+
*
|
|
45
|
+
* CAPTCHA IS NOT THIS
|
|
46
|
+
*
|
|
47
|
+
* /login already calls CaptchaUtil.verifyCaptcha, but that is not a
|
|
48
|
+
* substitute on either axis. CAPTCHA_ENABLED is off by default, so a
|
|
49
|
+
* self-hosted instance has nothing there at all; and an hCaptcha token is
|
|
50
|
+
* single use, which is exactly why the second step of a login cannot demand
|
|
51
|
+
* one -- /verify-totp-auth deliberately does not, and could not.
|
|
52
|
+
*
|
|
53
|
+
* THIS FAILS CLOSED
|
|
54
|
+
*
|
|
55
|
+
* With Redis unreachable these routes answer 503 rather than running
|
|
56
|
+
* unthrottled. That is the choice PublicDashboardRateLimit makes for
|
|
57
|
+
* /master-password and the opposite of the one VerificationCodeRateLimit
|
|
58
|
+
* makes, and the deciding question is the same in all three: is there another
|
|
59
|
+
* control still standing? Here there is not. Nothing in Postgres counts login
|
|
60
|
+
* attempts, so serving the route without the counter means serving the
|
|
61
|
+
* unlimited guessing oracle this middleware exists to close.
|
|
62
|
+
*
|
|
63
|
+
* It also costs nothing in availability that was not already lost. A
|
|
64
|
+
* successful login goes through AccessTokenService.refreshUserAllPermissions,
|
|
65
|
+
* which writes the user's permissions to GlobalCache, which throws
|
|
66
|
+
* DatabaseNotConnectedException when Redis is down. Logging in is already
|
|
67
|
+
* impossible in that state; the difference this makes is a 503 that says to
|
|
68
|
+
* come back shortly instead of a 500.
|
|
69
|
+
*/
|
|
70
|
+
/*
|
|
71
|
+
* Every request consumes TWO counters, and either one can reject it:
|
|
72
|
+
*
|
|
73
|
+
* - the account counter, keyed on the submitted email address AND the client
|
|
74
|
+
* address. This is the budget one person gets for one account.
|
|
75
|
+
*
|
|
76
|
+
* - the address counter, keyed on the client address alone. Without it the
|
|
77
|
+
* account counter is trivially bypassed: the email address is a field in
|
|
78
|
+
* the request body, so a caller who changes it on every request lands in a
|
|
79
|
+
* fresh bucket every time. Against /verify-totp-auth that matters
|
|
80
|
+
* enormously -- a code guessed against ANY account is a bypassed second
|
|
81
|
+
* factor, the attacker does not care whose. The address counter is the
|
|
82
|
+
* ceiling that survives email rotation.
|
|
83
|
+
*
|
|
84
|
+
* Deliberately NOT keyed on the email address alone. A bare per-account
|
|
85
|
+
* counter is a lockout weapon: anyone who knows a victim's email address
|
|
86
|
+
* could burn that account's whole budget from anywhere and keep the real
|
|
87
|
+
* owner out for as long as they cared to keep sending. Pairing the address
|
|
88
|
+
* in means an attacker can only spend their own bucket.
|
|
89
|
+
*
|
|
90
|
+
* The cost of that pairing, stated plainly: an attacker with many source
|
|
91
|
+
* addresses gets a fresh per-account budget from each one, so a distributed
|
|
92
|
+
* attack on a single account is bounded only by how many addresses they have.
|
|
93
|
+
* That is the standard trade and it is the right way round -- the alternative
|
|
94
|
+
* hands every user a remote lockout button, and the distributed case is what
|
|
95
|
+
* the account owner's own failed-login visibility and the network layer are
|
|
96
|
+
* for.
|
|
97
|
+
*
|
|
98
|
+
* Both counters are incremented on every request including a rejected one.
|
|
99
|
+
* That is standard fixed-window behaviour and it is deliberate: a caller who
|
|
100
|
+
* keeps hammering keeps their window pinned rather than being handed a fresh
|
|
101
|
+
* allowance for free.
|
|
102
|
+
*/
|
|
103
|
+
export var IdentityRateLimitBucket;
|
|
104
|
+
(function (IdentityRateLimitBucket) {
|
|
105
|
+
/* POST /login. Password guessing. */
|
|
106
|
+
IdentityRateLimitBucket["Login"] = "login";
|
|
107
|
+
/*
|
|
108
|
+
* POST /verify-totp-auth, POST /verify-webauthn-auth and
|
|
109
|
+
* POST /verify-totp-enrolment -- the second step, reached with a valid
|
|
110
|
+
* password already accepted.
|
|
111
|
+
*/
|
|
112
|
+
IdentityRateLimitBucket["TwoFactor"] = "two-factor";
|
|
113
|
+
})(IdentityRateLimitBucket || (IdentityRateLimitBucket = {}));
|
|
114
|
+
export var IdentityRateLimitScope;
|
|
115
|
+
(function (IdentityRateLimitScope) {
|
|
116
|
+
/* One email address, from one client address. */
|
|
117
|
+
IdentityRateLimitScope["Account"] = "account";
|
|
118
|
+
/* One client address, across every account. Survives email rotation. */
|
|
119
|
+
IdentityRateLimitScope["Ip"] = "ip";
|
|
120
|
+
})(IdentityRateLimitScope || (IdentityRateLimitScope = {}));
|
|
121
|
+
export var IdentityRateLimitOutcome;
|
|
122
|
+
(function (IdentityRateLimitOutcome) {
|
|
123
|
+
IdentityRateLimitOutcome["Allowed"] = "allowed";
|
|
124
|
+
IdentityRateLimitOutcome["RateLimited"] = "rate-limited";
|
|
125
|
+
/* Redis is unreachable, so no limit can be honoured either way. */
|
|
126
|
+
IdentityRateLimitOutcome["CounterUnavailable"] = "counter-unavailable";
|
|
127
|
+
})(IdentityRateLimitOutcome || (IdentityRateLimitOutcome = {}));
|
|
128
|
+
const parsePositiveIntFromEnv = (envKey, fallback) => {
|
|
129
|
+
const rawValue = process.env[envKey];
|
|
130
|
+
if (!rawValue) {
|
|
131
|
+
return fallback;
|
|
132
|
+
}
|
|
133
|
+
const parsedValue = parseInt(rawValue, 10);
|
|
134
|
+
if (!Number.isFinite(parsedValue) || parsedValue <= 0) {
|
|
135
|
+
return fallback;
|
|
136
|
+
}
|
|
137
|
+
return parsedValue;
|
|
138
|
+
};
|
|
139
|
+
/*
|
|
140
|
+
* Password budget.
|
|
141
|
+
*
|
|
142
|
+
* Ten attempts per quarter hour for one account from one address. A person
|
|
143
|
+
* who has forgotten which of their passwords this is tries three or four and
|
|
144
|
+
* then uses the reset link; ten is comfortably past that and still turns
|
|
145
|
+
* "as fast as the process answers" into forty an hour.
|
|
146
|
+
*
|
|
147
|
+
* The per-address ceiling is set for the honest worst case rather than the
|
|
148
|
+
* typical one, because a corporate NAT puts a whole office behind a single
|
|
149
|
+
* address and a morning sign-in surge must not be refused. 150 a quarter hour
|
|
150
|
+
* covers that while still bounding a caller who rotates email addresses to
|
|
151
|
+
* fifteen accounts' worth of attempts -- and it is the number an operator
|
|
152
|
+
* most likely wants to lower, which is what the environment variable is for.
|
|
153
|
+
* A limiter that fires on real users gets switched off, and a switched-off
|
|
154
|
+
* limiter bounds nothing.
|
|
155
|
+
*/
|
|
156
|
+
const LOGIN_BUCKET = {
|
|
157
|
+
windowSeconds: parsePositiveIntFromEnv("IDENTITY_LOGIN_RATE_LIMIT_WINDOW_SECONDS", 15 * 60),
|
|
158
|
+
perAccountLimit: parsePositiveIntFromEnv("IDENTITY_LOGIN_RATE_LIMIT_PER_ACCOUNT_PER_WINDOW", 10),
|
|
159
|
+
perIpLimit: parsePositiveIntFromEnv("IDENTITY_LOGIN_RATE_LIMIT_PER_IP_PER_WINDOW", 150),
|
|
160
|
+
};
|
|
161
|
+
/*
|
|
162
|
+
* Second step budget.
|
|
163
|
+
*
|
|
164
|
+
* Same shape as the password bucket, and the same numbers, for a different
|
|
165
|
+
* reason: the code is read off a screen rather than recalled, so ten wrong
|
|
166
|
+
* ones in a quarter hour is already well past anything a real user does --
|
|
167
|
+
* a phone whose clock has drifted past the +/- 90 second window fails every
|
|
168
|
+
* time, and no number of retries fixes that.
|
|
169
|
+
*
|
|
170
|
+
* Kept as a SEPARATE bucket from the password one rather than a shared pool,
|
|
171
|
+
* which does mean a caller gets both budgets in a window. That is the price of
|
|
172
|
+
* the property that matters more: a burst of /login noise must not be able to
|
|
173
|
+
* refuse a user who is midway through finishing a two factor login, and a user
|
|
174
|
+
* being marched through a mandated enrolment must not be locked out of it by
|
|
175
|
+
* the /login attempt that sent them there.
|
|
176
|
+
*
|
|
177
|
+
* What ten buys against guessing: fourteen of the 10^6 codes are live at any
|
|
178
|
+
* instant, so forty guesses an hour is a ~0.06% chance of landing one in a
|
|
179
|
+
* day and about a year to reach even odds -- against an attacker who holds
|
|
180
|
+
* the account's password for that entire year and generates a visible failed
|
|
181
|
+
* attempt every ninety seconds throughout.
|
|
182
|
+
*/
|
|
183
|
+
const TWO_FACTOR_BUCKET = {
|
|
184
|
+
windowSeconds: parsePositiveIntFromEnv("IDENTITY_TWO_FACTOR_RATE_LIMIT_WINDOW_SECONDS", 15 * 60),
|
|
185
|
+
perAccountLimit: parsePositiveIntFromEnv("IDENTITY_TWO_FACTOR_RATE_LIMIT_PER_ACCOUNT_PER_WINDOW", 10),
|
|
186
|
+
perIpLimit: parsePositiveIntFromEnv("IDENTITY_TWO_FACTOR_RATE_LIMIT_PER_IP_PER_WINDOW", 150),
|
|
187
|
+
};
|
|
188
|
+
const KEY_PREFIX = "identity:rl:";
|
|
189
|
+
/*
|
|
190
|
+
* Counter keys outlive their window by one full window, so a request landing
|
|
191
|
+
* on a boundary cannot read a key that was reclaimed mid-window.
|
|
192
|
+
*/
|
|
193
|
+
const TTL_MULTIPLIER = 2;
|
|
194
|
+
/* Bounds a Redis key built from caller-supplied values. */
|
|
195
|
+
const MAX_KEY_SEGMENT_LENGTH = 64;
|
|
196
|
+
/* How often the "counter unavailable" condition may be logged, per bucket. */
|
|
197
|
+
const COUNTER_UNAVAILABLE_LOG_INTERVAL_MS = 60 * 1000;
|
|
198
|
+
class IdentityRateLimit {
|
|
199
|
+
/*
|
|
200
|
+
* The client address to bill this request to.
|
|
201
|
+
*
|
|
202
|
+
* Delegates to the shared ClientIp helper, which reads X-Forwarded-For from
|
|
203
|
+
* the trusted (right-hand) end under the instance-wide TRUSTED_PROXY_HOPS
|
|
204
|
+
* setting. Deliberately NOT Express.getClientIp: that one takes the LEFTMOST
|
|
205
|
+
* entry, which any caller can set by sending its own X-Forwarded-For header,
|
|
206
|
+
* and for a rate limiter that is fatal -- a fresh spoofed value per request
|
|
207
|
+
* is a fresh bucket per request and therefore no limit at all.
|
|
208
|
+
*
|
|
209
|
+
* The helper also normalizes ports, brackets and IPv4-mapped IPv6, so one
|
|
210
|
+
* caller cannot land in two different buckets depending on the form their
|
|
211
|
+
* address arrives in.
|
|
212
|
+
*/
|
|
213
|
+
static resolveClientIp(req) {
|
|
214
|
+
const clientIp = resolveTrustedClientIp(req);
|
|
215
|
+
if (clientIp) {
|
|
216
|
+
return IdentityRateLimit.sanitizeKeySegment(clientIp);
|
|
217
|
+
}
|
|
218
|
+
/*
|
|
219
|
+
* Everything with no resolvable address shares one bucket. That is the
|
|
220
|
+
* conservative direction: an unidentifiable caller should not be handed a
|
|
221
|
+
* private allowance.
|
|
222
|
+
*/
|
|
223
|
+
return "unknown";
|
|
224
|
+
}
|
|
225
|
+
/*
|
|
226
|
+
* The account this request is trying to authenticate as, as a key segment.
|
|
227
|
+
*
|
|
228
|
+
* The login page posts everything nested under `data` (see
|
|
229
|
+
* App/FeatureSet/Accounts/src/Pages/Login.tsx), which is where all four
|
|
230
|
+
* routes read the credentials from; the top level is checked too so that a
|
|
231
|
+
* caller posting the flatter shape is still counted rather than silently
|
|
232
|
+
* sharing the "none" bucket with everybody else.
|
|
233
|
+
*
|
|
234
|
+
* `email` ARRIVES IN TWO SHAPES, AND BOTH ARE FIRST-PARTY
|
|
235
|
+
*
|
|
236
|
+
* A bare string, and the serialized SerializableObject envelope
|
|
237
|
+
* `{ _type: "Email", value: "..." }` that Email.toJSON produces. Which one
|
|
238
|
+
* turns up depends on how the caller was written, and the shipped clients
|
|
239
|
+
* disagree with each other on the very routes limited here:
|
|
240
|
+
*
|
|
241
|
+
* - POST /login from the dashboard goes through ModelForm, which hands the
|
|
242
|
+
* model to ModelAPI.createOrUpdate, which sends
|
|
243
|
+
* JSONFunctions.serialize(BaseModel.toJSON(...)) -- the ENVELOPE.
|
|
244
|
+
* - POST /login from the mobile app hand-builds the same envelope
|
|
245
|
+
* (MobileApp/src/api/auth.ts).
|
|
246
|
+
* - POST /verify-totp-auth, /verify-totp-enrolment and
|
|
247
|
+
* /verify-webauthn-auth from the dashboard spread the raw form values
|
|
248
|
+
* (`...initialValues`), so there `email` is a bare STRING.
|
|
249
|
+
*
|
|
250
|
+
* The handler does not care, because BaseModel.fromJSON resolves both to the
|
|
251
|
+
* same address -- so this must not care either. Reading only the string form
|
|
252
|
+
* would put every /login from every shipped client into the shared "none"
|
|
253
|
+
* bucket, which is not a small mistake in either direction: the per-account
|
|
254
|
+
* counter would degenerate into a SECOND per-address counter at the much
|
|
255
|
+
* tighter per-account limit, refusing a whole office (or a carrier NAT) after
|
|
256
|
+
* ten sign-ins rather than the hundred and fifty the per-address ceiling is
|
|
257
|
+
* deliberately sized for; and, because the two shapes would key differently,
|
|
258
|
+
* an attacker could take the per-account budget twice by alternating them.
|
|
259
|
+
*
|
|
260
|
+
* The unwrap is deliberately not gated on `_type` being exactly Email. Any
|
|
261
|
+
* object carrying a string `value` is keyed by that value, which is the safe
|
|
262
|
+
* direction: the worst case is counting a request the handler will reject
|
|
263
|
+
* anyway against the bucket it names, whereas gating narrowly leaves another
|
|
264
|
+
* shape sitting in "none" for someone to spend.
|
|
265
|
+
*
|
|
266
|
+
* Lower-cased, because otherwise Bob@example.com and bob@example.com are
|
|
267
|
+
* two buckets for one account and case alone buys a fresh allowance. No
|
|
268
|
+
* attempt is made to validate the address: a well-formed one that belongs
|
|
269
|
+
* to nobody is worth exactly as much to an attacker as a malformed one, so
|
|
270
|
+
* there is nothing for a format check to separate. Normalizing is the part
|
|
271
|
+
* that matters.
|
|
272
|
+
*/
|
|
273
|
+
static resolveAccountKey(req) {
|
|
274
|
+
var _a;
|
|
275
|
+
const body = req.body;
|
|
276
|
+
const data = body && typeof body["data"] === "object" && body["data"] !== null
|
|
277
|
+
? body["data"]
|
|
278
|
+
: undefined;
|
|
279
|
+
const field = (_a = data === null || data === void 0 ? void 0 : data["email"]) !== null && _a !== void 0 ? _a : body === null || body === void 0 ? void 0 : body["email"];
|
|
280
|
+
/*
|
|
281
|
+
* Arrays are typeof "object" too, and indexing one by "value" is
|
|
282
|
+
* undefined rather than a throw -- but excluding them keeps the intent
|
|
283
|
+
* legible and stops a caller smuggling anything odd through.
|
|
284
|
+
*/
|
|
285
|
+
const raw = field && typeof field === "object" && !Array.isArray(field)
|
|
286
|
+
? field["value"]
|
|
287
|
+
: field;
|
|
288
|
+
/*
|
|
289
|
+
* `email` is whatever JSON the caller sent, so it is only a string
|
|
290
|
+
* because they chose to make it one. A number, a nested object or a
|
|
291
|
+
* missing field must land in a bucket rather than throw.
|
|
292
|
+
*/
|
|
293
|
+
if (typeof raw !== "string" || raw.trim().length === 0) {
|
|
294
|
+
return "none";
|
|
295
|
+
}
|
|
296
|
+
return IdentityRateLimit.sanitizeKeySegment(raw.trim().toLowerCase());
|
|
297
|
+
}
|
|
298
|
+
static sanitizeKeySegment(value) {
|
|
299
|
+
return (value
|
|
300
|
+
.slice(0, MAX_KEY_SEGMENT_LENGTH)
|
|
301
|
+
/*
|
|
302
|
+
* Redis keys are binary safe, but a predictable charset keeps
|
|
303
|
+
* operational tooling (SCAN patterns, dashboards) sane.
|
|
304
|
+
*/
|
|
305
|
+
.replace(/[^a-zA-Z0-9._:%\-[\]@]/g, "_"));
|
|
306
|
+
}
|
|
307
|
+
static getBucketConfig(bucket) {
|
|
308
|
+
return bucket === IdentityRateLimitBucket.TwoFactor
|
|
309
|
+
? TWO_FACTOR_BUCKET
|
|
310
|
+
: LOGIN_BUCKET;
|
|
311
|
+
}
|
|
312
|
+
/*
|
|
313
|
+
* Increment both counters for this request and decide.
|
|
314
|
+
*
|
|
315
|
+
* Both INCRs go out in one pipeline so the common path costs a single round
|
|
316
|
+
* trip; the EXPIRE follow-ups only happen on the request that created a key.
|
|
317
|
+
*/
|
|
318
|
+
static async consume(data) {
|
|
319
|
+
const client = Redis.getClient();
|
|
320
|
+
if (!client || !Redis.isConnected()) {
|
|
321
|
+
return { outcome: IdentityRateLimitOutcome.CounterUnavailable };
|
|
322
|
+
}
|
|
323
|
+
const config = IdentityRateLimit.getBucketConfig(data.bucket);
|
|
324
|
+
const windowMs = config.windowSeconds * 1000;
|
|
325
|
+
const windowIndex = Math.floor(Date.now() / windowMs);
|
|
326
|
+
const accountCounterKey = `${KEY_PREFIX}${data.bucket}:a:${data.accountKey}:${data.clientIp}:${windowIndex}`;
|
|
327
|
+
const ipCounterKey = `${KEY_PREFIX}${data.bucket}:i:${data.clientIp}:${windowIndex}`;
|
|
328
|
+
try {
|
|
329
|
+
const pipelineResults = (await client
|
|
330
|
+
.pipeline()
|
|
331
|
+
.incr(accountCounterKey)
|
|
332
|
+
.incr(ipCounterKey)
|
|
333
|
+
.exec());
|
|
334
|
+
if (!pipelineResults || pipelineResults.length < 2) {
|
|
335
|
+
throw new Error("Rate limit pipeline returned no result");
|
|
336
|
+
}
|
|
337
|
+
const accountCount = IdentityRateLimit.readCounterResult(pipelineResults[0]);
|
|
338
|
+
const ipCount = IdentityRateLimit.readCounterResult(pipelineResults[1]);
|
|
339
|
+
/*
|
|
340
|
+
* Set the expiry only on the write that created the key. Re-issuing
|
|
341
|
+
* EXPIRE on every increment would slide the window forward for as long
|
|
342
|
+
* as the attempts continue, so the counter would never reset and a
|
|
343
|
+
* caller who tripped the limit once could never recover -- which on a
|
|
344
|
+
* login route is a permanent lockout, not a slowdown.
|
|
345
|
+
*/
|
|
346
|
+
const ttlSeconds = config.windowSeconds * TTL_MULTIPLIER;
|
|
347
|
+
const keysToExpire = [];
|
|
348
|
+
if (accountCount === 1) {
|
|
349
|
+
keysToExpire.push(accountCounterKey);
|
|
350
|
+
}
|
|
351
|
+
if (ipCount === 1) {
|
|
352
|
+
keysToExpire.push(ipCounterKey);
|
|
353
|
+
}
|
|
354
|
+
if (keysToExpire.length > 0) {
|
|
355
|
+
const expirePipeline = client.pipeline();
|
|
356
|
+
for (const key of keysToExpire) {
|
|
357
|
+
expirePipeline.expire(key, ttlSeconds);
|
|
358
|
+
}
|
|
359
|
+
await expirePipeline.exec();
|
|
360
|
+
}
|
|
361
|
+
const retryAfterSeconds = IdentityRateLimit.getSecondsUntilWindowEnd(config.windowSeconds);
|
|
362
|
+
/*
|
|
363
|
+
* The account counter is reported first when both are over, because it
|
|
364
|
+
* is the more specific of the two and the more useful thing to see in a
|
|
365
|
+
* log line.
|
|
366
|
+
*/
|
|
367
|
+
if (accountCount > config.perAccountLimit) {
|
|
368
|
+
return {
|
|
369
|
+
outcome: IdentityRateLimitOutcome.RateLimited,
|
|
370
|
+
retryAfterSeconds,
|
|
371
|
+
scope: IdentityRateLimitScope.Account,
|
|
372
|
+
isFirstRejectionInWindow: accountCount === config.perAccountLimit + 1,
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
if (ipCount > config.perIpLimit) {
|
|
376
|
+
return {
|
|
377
|
+
outcome: IdentityRateLimitOutcome.RateLimited,
|
|
378
|
+
retryAfterSeconds,
|
|
379
|
+
scope: IdentityRateLimitScope.Ip,
|
|
380
|
+
isFirstRejectionInWindow: ipCount === config.perIpLimit + 1,
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
return { outcome: IdentityRateLimitOutcome.Allowed };
|
|
384
|
+
}
|
|
385
|
+
catch (err) {
|
|
386
|
+
/*
|
|
387
|
+
* Throttled: whatever broke Redis is unlikely to have broken it for one
|
|
388
|
+
* request only, and a per-request log line buries the incident it is
|
|
389
|
+
* reporting.
|
|
390
|
+
*/
|
|
391
|
+
if (IdentityRateLimit.shouldLogCounterUnavailable(data.bucket)) {
|
|
392
|
+
logger.warn(`IdentityRateLimit: counter failed for ${data.bucket} request from ${data.clientIp}`);
|
|
393
|
+
logger.warn(err);
|
|
394
|
+
}
|
|
395
|
+
return { outcome: IdentityRateLimitOutcome.CounterUnavailable };
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
static readCounterResult(result) {
|
|
399
|
+
if (!result) {
|
|
400
|
+
throw new Error("Rate limit counter returned no result");
|
|
401
|
+
}
|
|
402
|
+
const [error, value] = result;
|
|
403
|
+
if (error) {
|
|
404
|
+
throw error;
|
|
405
|
+
}
|
|
406
|
+
if (typeof value !== "number") {
|
|
407
|
+
throw new Error("Rate limit counter returned a non-numeric value");
|
|
408
|
+
}
|
|
409
|
+
return value;
|
|
410
|
+
}
|
|
411
|
+
/*
|
|
412
|
+
* Remaining seconds in the current fixed window, so every rejected caller
|
|
413
|
+
* is told to come back when the window actually rolls rather than all
|
|
414
|
+
* backing off by the same constant and re-colliding.
|
|
415
|
+
*/
|
|
416
|
+
static getSecondsUntilWindowEnd(windowSeconds) {
|
|
417
|
+
const windowMs = windowSeconds * 1000;
|
|
418
|
+
const msIntoWindow = Date.now() % windowMs;
|
|
419
|
+
return Math.max(1, Math.ceil((windowMs - msIntoWindow) / 1000));
|
|
420
|
+
}
|
|
421
|
+
/*
|
|
422
|
+
* Express middleware. Registered as the first handler on each credential
|
|
423
|
+
* route, so a flood is refused before it costs a user lookup -- and, on the
|
|
424
|
+
* password routes, before it costs the bcrypt verify that makes each guess
|
|
425
|
+
* expensive for us as well as for the attacker.
|
|
426
|
+
*/
|
|
427
|
+
static getMiddleware(bucket) {
|
|
428
|
+
return async (req, res, next) => {
|
|
429
|
+
const accountKey = IdentityRateLimit.resolveAccountKey(req);
|
|
430
|
+
const clientIp = IdentityRateLimit.resolveClientIp(req);
|
|
431
|
+
const decision = await IdentityRateLimit.consume({
|
|
432
|
+
accountKey,
|
|
433
|
+
clientIp,
|
|
434
|
+
bucket,
|
|
435
|
+
});
|
|
436
|
+
if (decision.outcome === IdentityRateLimitOutcome.RateLimited) {
|
|
437
|
+
if (decision.retryAfterSeconds) {
|
|
438
|
+
IdentityRateLimit.setRetryAfterHeader(res, decision.retryAfterSeconds);
|
|
439
|
+
}
|
|
440
|
+
if (decision.isFirstRejectionInWindow) {
|
|
441
|
+
logger.warn(`IdentityRateLimit: rejected ${bucket} attempt for ${accountKey} from ${clientIp} (${decision.scope} limit)`);
|
|
442
|
+
}
|
|
443
|
+
/*
|
|
444
|
+
* The same message whichever counter fired, and whether or not the
|
|
445
|
+
* account exists. These routes are careful not to say which half of a
|
|
446
|
+
* credential was wrong; a limiter that answered differently for a real
|
|
447
|
+
* address than for an invented one would hand back the account
|
|
448
|
+
* enumeration the handlers withhold.
|
|
449
|
+
*/
|
|
450
|
+
return Response.sendErrorResponse(req, res, new TooManyRequestsException("Too many sign-in attempts. Please try again later."));
|
|
451
|
+
}
|
|
452
|
+
if (decision.outcome === IdentityRateLimitOutcome.CounterUnavailable) {
|
|
453
|
+
/*
|
|
454
|
+
* Fails closed. See the note at the top of this file: the counter is
|
|
455
|
+
* the only thing bounding guesses on these routes, and a login cannot
|
|
456
|
+
* complete without Redis anyway.
|
|
457
|
+
*/
|
|
458
|
+
if (IdentityRateLimit.shouldLogCounterUnavailable(bucket)) {
|
|
459
|
+
logger.error(`IdentityRateLimit: rate limit counter unavailable, refusing ${bucket} attempts`);
|
|
460
|
+
}
|
|
461
|
+
return Response.sendErrorResponse(req, res, new ServiceUnavailableException("Unable to sign you in right now. Please try again shortly."));
|
|
462
|
+
}
|
|
463
|
+
return next();
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/*
|
|
467
|
+
* A Redis outage means EVERY request takes the unavailable path, so an
|
|
468
|
+
* unguarded log line there is one per request for as long as the outage
|
|
469
|
+
* lasts -- the same log-flooding problem the crossing-only rejection log
|
|
470
|
+
* avoids, but continuous. One line per bucket per interval is enough to
|
|
471
|
+
* make the condition visible without burying everything else.
|
|
472
|
+
*/
|
|
473
|
+
static shouldLogCounterUnavailable(bucket) {
|
|
474
|
+
const now = Date.now();
|
|
475
|
+
const lastLoggedAt = IdentityRateLimit.counterUnavailableLastLoggedAt.get(bucket) || 0;
|
|
476
|
+
if (now - lastLoggedAt < COUNTER_UNAVAILABLE_LOG_INTERVAL_MS) {
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
IdentityRateLimit.counterUnavailableLastLoggedAt.set(bucket, now);
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
static setRetryAfterHeader(res, retryAfterSeconds) {
|
|
483
|
+
const setHeader = res["setHeader"];
|
|
484
|
+
if (typeof setHeader === "function") {
|
|
485
|
+
setHeader.call(res, "Retry-After", String(retryAfterSeconds));
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
IdentityRateLimit.counterUnavailableLastLoggedAt = new Map();
|
|
490
|
+
export default IdentityRateLimit;
|
|
491
|
+
//# sourceMappingURL=IdentityRateLimit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityRateLimit.js","sourceRoot":"","sources":["../../../../Server/Middleware/IdentityRateLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,yBAAyB,CAAC;AAM5D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,sBAA+C,MAAM,mBAAmB,CAAC;AAChF,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,2BAA2B,MAAM,mDAAmD,CAAC;AAC5F,OAAO,wBAAwB,MAAM,gDAAgD,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAN,IAAY,uBAUX;AAVD,WAAY,uBAAuB;IACjC,qCAAqC;IACrC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B,iBAAyB;QAEzB,MAAM,SAAS,GAAa,GAA0C,CACpE,WAAW,CACZ,CAAC;QAEF,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE,CAAC;YACnC,SAAmD,CAAC,IAAI,CACvD,GAAG,EACH,aAAa,EACb,MAAM,CAAC,iBAAiB,CAAC,CAC1B,CAAC;QACJ,CAAC;IACH,CAAC;;AApBc,gDAA8B,GAGzC,IAAI,GAAG,EAAE,CAAC;eAtYK,iBAAiB"}
|
|
@@ -150,8 +150,19 @@ export class AccessTokenService extends BaseService {
|
|
|
150
150
|
_type: "UserPermission",
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
const
|
|
154
|
-
|
|
153
|
+
const defaultPermission = UserPermissionUtil.getDefaultUserTenantAccessPermission(projectId);
|
|
154
|
+
defaultPermission.permissions =
|
|
155
|
+
defaultPermission.permissions.concat(userPermissions);
|
|
156
|
+
/*
|
|
157
|
+
* Reaching here means the user holds an accepted membership in at least one
|
|
158
|
+
* team of this project, so they are a project member whatever roles those
|
|
159
|
+
* teams carry - the empty-team case returned above. `ProjectUser` says
|
|
160
|
+
* exactly that, and shared workspace resources - saved table views, labels,
|
|
161
|
+
* teams, member rows - are read through it. Without it a user scoped to a
|
|
162
|
+
* single domain (Monitor Viewer and nothing else) cannot load the tables
|
|
163
|
+
* that role exists to give them.
|
|
164
|
+
*/
|
|
165
|
+
const permission = UserPermissionUtil.withProjectUserPermission(defaultPermission);
|
|
155
166
|
await GlobalCache.setJSON(PermissionNamespace.ProjectPermission, UserPermissionUtil.buildTenantPermissionCacheKey(userId, projectId), permission);
|
|
156
167
|
return permission;
|
|
157
168
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessTokenService.js","sourceRoot":"","sources":["../../../../Server/Services/AccessTokenService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,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BACtC,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAY,EAAE,EAAE;oBACnD,OAAO,KAAK,CAAC,EAAG,CAAC;gBACnB,CAAC,CAAC;gBACF,iBAAiB,EAAE,cAAc,CAAC,iBAAiB;gBACnD,KAAK,EAAE,cAAc,CAAC,KAAK;gBAC3B,KAAK,EAAE,gBAAgB;aACxB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,
|
|
1
|
+
{"version":3,"file":"AccessTokenService.js","sourceRoot":"","sources":["../../../../Server/Services/AccessTokenService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,SAAS,MAAM,+BAA+B,CAAC;AACtD,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,UAIN,MAAM,wBAAwB,CAAC;AAIhC,OAAO,kBAAkB,MAAM,wCAAwC,CAAC;AACxE,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAE1E,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAGY,AAAN,KAAK,CAAC,yBAAyB,CAAC,MAAgB;QACrD,MAAM,IAAI,CAAC,iCAAiC,CAAC,MAAM,CAAC,CAAC;QAErD,0CAA0C;QAC1C,IAAI,WAAW,GAAsB,MAAM,iBAAiB,CAAC,MAAM,CAAC;YAClE,KAAK,EAAE;gBACL,MAAM,EAAE,MAAM;gBACd,qBAAqB,EAAE,IAAI;aAC5B;YACD,MAAM,EAAE;gBACN,SAAS,EAAE,IAAI;aAChB;YACD,KAAK,EAAE,SAAS;YAChB,IA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