@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
|
@@ -156,12 +156,47 @@ export interface LinkRuleOutcome {
|
|
|
156
156
|
unsitedChildDeviceCount?: number | undefined;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
/*
|
|
160
|
+
* One failing site, as the banner lists it rather than as the resolver
|
|
161
|
+
* computed it. Deliberately not LinkRuleGroupFailure itself: this crosses the
|
|
162
|
+
* wire to the browser, so it carries the two numbers an operator acts on and
|
|
163
|
+
* nothing else.
|
|
164
|
+
*/
|
|
165
|
+
export interface LinkRuleWarningSite {
|
|
166
|
+
siteId: string;
|
|
167
|
+
siteName?: string | undefined;
|
|
168
|
+
reason: LinkRuleGroupSkipReason;
|
|
169
|
+
/*
|
|
170
|
+
* Devices in THIS site the rule wanted to place and could not — the damage
|
|
171
|
+
* count for one line of the list, which sums to the sentence's total.
|
|
172
|
+
*/
|
|
173
|
+
strandedDeviceCount: number;
|
|
174
|
+
// Devices in this site carrying the parent labels: 0, or >= 2 when ambiguous.
|
|
175
|
+
matchedParentCount: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
159
178
|
/** One bullet in the topology map's warning banner. At most one per rule. */
|
|
160
179
|
export interface LinkRuleWarning {
|
|
161
180
|
ruleId: string;
|
|
162
181
|
ruleName?: string | undefined;
|
|
163
182
|
reason: LinkRuleWarningReason;
|
|
164
183
|
message: string;
|
|
184
|
+
/*
|
|
185
|
+
* The failing sites themselves, in the same order the sentence names them,
|
|
186
|
+
* capped at MAX_LISTED_SITES. Present only for a site-scoped rule that
|
|
187
|
+
* failed somewhere.
|
|
188
|
+
*
|
|
189
|
+
* The sentence names three sites and then says "and 694 more", which is a
|
|
190
|
+
* blast radius and not something anybody can act on — issue #3321, where an
|
|
191
|
+
* operator with 949 sites had no way to find out WHICH of them were broken.
|
|
192
|
+
* The list is what turns that number back into work.
|
|
193
|
+
*/
|
|
194
|
+
sites?: Array<LinkRuleWarningSite> | undefined;
|
|
195
|
+
/*
|
|
196
|
+
* Exact number of failing sites, still exact when `sites` was capped. Always
|
|
197
|
+
* >= sites.length, so the UI can say how many it is not showing.
|
|
198
|
+
*/
|
|
199
|
+
siteCount?: number | undefined;
|
|
165
200
|
}
|
|
166
201
|
|
|
167
202
|
/*
|
|
@@ -204,6 +239,13 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
204
239
|
|
|
205
240
|
// Three names is enough to recognise a pattern; fourteen is a wall of text.
|
|
206
241
|
private static readonly MAX_NAMED_SITES: number = 3;
|
|
242
|
+
/*
|
|
243
|
+
* How many failing sites ride back on the warning for the operator to work
|
|
244
|
+
* through. Far more than the sentence names, because this is a list nobody
|
|
245
|
+
* reads until they open it — but still capped: a project with 949 broken
|
|
246
|
+
* sites must not turn a 60-second map poll into a megabyte of site names.
|
|
247
|
+
*/
|
|
248
|
+
public static readonly MAX_LISTED_SITES: number = 100;
|
|
207
249
|
// Site names are ShortText and can run to 100 characters.
|
|
208
250
|
private static readonly MAX_SITE_NAME_LENGTH: number = 40;
|
|
209
251
|
private static readonly UNNAMED_SITE: string = "an unnamed site";
|
|
@@ -530,18 +572,17 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
530
572
|
}
|
|
531
573
|
|
|
532
574
|
/*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
* are elided, so the operator always knows the true blast radius.
|
|
575
|
+
* By site name, then by id so equally-named (and unnamed) sites still have
|
|
576
|
+
* ONE order. Load-bearing rather than cosmetic: the live view refetches
|
|
577
|
+
* every sixty seconds and the device query has no ORDER BY, so an unsorted
|
|
578
|
+
* list would reshuffle the banner on every poll and read as a change that
|
|
579
|
+
* did not happen. The sentence and the site list share it so the three names
|
|
580
|
+
* the sentence gives are the first three rows of the list.
|
|
540
581
|
*/
|
|
541
|
-
private static
|
|
582
|
+
private static sortSiteFailures(
|
|
542
583
|
failures: Array<LinkRuleGroupFailure>,
|
|
543
|
-
):
|
|
544
|
-
|
|
584
|
+
): Array<LinkRuleGroupFailure> {
|
|
585
|
+
return [...failures].sort(
|
|
545
586
|
(a: LinkRuleGroupFailure, b: LinkRuleGroupFailure) => {
|
|
546
587
|
return (
|
|
547
588
|
(a.siteName || "").localeCompare(b.siteName || "") ||
|
|
@@ -549,6 +590,21 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
549
590
|
);
|
|
550
591
|
},
|
|
551
592
|
);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/*
|
|
596
|
+
* "Unit 4, Unit 9 and 2 more sites".
|
|
597
|
+
*
|
|
598
|
+
* Named in sortSiteFailures order, for the reasons given there. The count
|
|
599
|
+
* stays exact even when the names are elided, so the operator always knows
|
|
600
|
+
* the true blast radius — and `getWarning` sends the sites themselves
|
|
601
|
+
* alongside, because a blast radius is not a list of buildings.
|
|
602
|
+
*/
|
|
603
|
+
private static describeSiteList(
|
|
604
|
+
failures: Array<LinkRuleGroupFailure>,
|
|
605
|
+
): string {
|
|
606
|
+
const sorted: Array<LinkRuleGroupFailure> =
|
|
607
|
+
NetworkDeviceLinkRuleUtil.sortSiteFailures(failures);
|
|
552
608
|
|
|
553
609
|
const names: Array<string> = sorted
|
|
554
610
|
.slice(0, NetworkDeviceLinkRuleUtil.MAX_NAMED_SITES)
|
|
@@ -721,7 +777,7 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
721
777
|
);
|
|
722
778
|
}
|
|
723
779
|
|
|
724
|
-
|
|
780
|
+
const warning: LinkRuleWarning = {
|
|
725
781
|
ruleId: outcome.ruleId,
|
|
726
782
|
ruleName: outcome.ruleName,
|
|
727
783
|
// Highest-ranked condition present. Ambiguity outranks a missing parent.
|
|
@@ -733,5 +789,31 @@ export default class NetworkDeviceLinkRuleUtil {
|
|
|
733
789
|
: "devicesWithoutSite",
|
|
734
790
|
message: parts.join(" "),
|
|
735
791
|
};
|
|
792
|
+
|
|
793
|
+
/*
|
|
794
|
+
* The list, for the sentence the operator cannot act on. Written only when
|
|
795
|
+
* there are failing sites, so a warning that is purely about unsited
|
|
796
|
+
* devices — which names no site at all — keeps the exact shape it had.
|
|
797
|
+
*
|
|
798
|
+
* `siteCount` is the true total and `sites` may be shorter; a caller that
|
|
799
|
+
* reads sites.length as the number of broken sites is wrong at the cap,
|
|
800
|
+
* which is precisely the scale this exists for.
|
|
801
|
+
*/
|
|
802
|
+
if (failures.length > 0) {
|
|
803
|
+
warning.siteCount = failures.length;
|
|
804
|
+
warning.sites = NetworkDeviceLinkRuleUtil.sortSiteFailures(failures)
|
|
805
|
+
.slice(0, NetworkDeviceLinkRuleUtil.MAX_LISTED_SITES)
|
|
806
|
+
.map((failure: LinkRuleGroupFailure) => {
|
|
807
|
+
return {
|
|
808
|
+
siteId: failure.siteId,
|
|
809
|
+
siteName: failure.siteName,
|
|
810
|
+
reason: failure.reason,
|
|
811
|
+
strandedDeviceCount: failure.matchedChildCount,
|
|
812
|
+
matchedParentCount: failure.matchedParentCount,
|
|
813
|
+
};
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
return warning;
|
|
736
818
|
}
|
|
737
819
|
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import DeviceReachabilityUtil, {
|
|
2
|
+
NetworkDeviceReachability,
|
|
3
|
+
} from "./DeviceReachabilityUtil";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* The one place that decides how healthy a single NetworkDevice is, and how
|
|
7
|
+
* a pile of those verdicts rolls up into the counts a site card prints.
|
|
8
|
+
*
|
|
9
|
+
* The topology graph has always answered this question — a node is drawn
|
|
10
|
+
* red, amber or green — but it answered it inside the graph, from a
|
|
11
|
+
* NetworkTopologyNode that only exists once the whole map has been built.
|
|
12
|
+
* Issue #3320 needs the same verdict one level up, per SITE, so a franchise
|
|
13
|
+
* estate of 949 sites can say WHICH sites hold a device that needs
|
|
14
|
+
* attention without first drawing 21,700 device nodes.
|
|
15
|
+
*
|
|
16
|
+
* So the rule moves here, and both halves read it:
|
|
17
|
+
*
|
|
18
|
+
* status — a monitor-stamped status wins outright; otherwise the shared
|
|
19
|
+
* reachability rule (the OUTCOME of the last poll, never its
|
|
20
|
+
* age) decides, and a device nothing has ever polled is
|
|
21
|
+
* `unknown` rather than a failure.
|
|
22
|
+
* degraded — an up device with dark ports. A switch that answers every
|
|
23
|
+
* poll while three of its interfaces are down is not down, but
|
|
24
|
+
* it is exactly what somebody is looking for.
|
|
25
|
+
*
|
|
26
|
+
* This deliberately mirrors NetworkTopologyUtil.deviceStatus followed by
|
|
27
|
+
* TopologyHealthFilter.healthStateForNode, because a device that reads
|
|
28
|
+
* "degraded" on the map and "healthy" on the site card above it is the two
|
|
29
|
+
* halves of the product describing different networks.
|
|
30
|
+
*
|
|
31
|
+
* The ONE input the map has that a site rollup does not is the link layer:
|
|
32
|
+
* the map also degrades a node with an operationally-down link attached.
|
|
33
|
+
* That fact lives in the topology edges, which are built per-site and never
|
|
34
|
+
* exist at rollup time. The asymmetry is safe in the direction that matters
|
|
35
|
+
* — the device at the other end of a dead link reports its own dark port —
|
|
36
|
+
* but it is why a site's device counts can be very slightly kinder than the
|
|
37
|
+
* map you get when you drill into it, and never the reverse.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* How healthy one device is.
|
|
42
|
+
*
|
|
43
|
+
* "unknown" is a real answer and not a synonym for healthy: a device
|
|
44
|
+
* nothing has polled yet has never been judged, and counting it either way
|
|
45
|
+
* would put onboarding into an operator's attention list (or hide a real
|
|
46
|
+
* gap behind a green count).
|
|
47
|
+
*/
|
|
48
|
+
export type NetworkDeviceHealthState =
|
|
49
|
+
| "down"
|
|
50
|
+
| "degraded"
|
|
51
|
+
| "healthy"
|
|
52
|
+
| "unknown";
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The columns the classifier reads. Every caller selects exactly these.
|
|
56
|
+
*
|
|
57
|
+
* `monitorStatusIsOffline` is the OFFLINE end of the device's stamped
|
|
58
|
+
* MonitorStatus row — `undefined` when no monitor backs the device (the
|
|
59
|
+
* ordinary case for an SNMP-walked switch), which is what sends the
|
|
60
|
+
* decision down to reachability.
|
|
61
|
+
*
|
|
62
|
+
* The offline end and not the operational end, because MonitorStatus is a
|
|
63
|
+
* ladder rather than a pair: the seeded rows run Operational (1) ...
|
|
64
|
+
* Offline (3), and a "Degraded" row in between is NEITHER operational nor
|
|
65
|
+
* offline. The device map resolves that ladder with
|
|
66
|
+
* `isOfflineState ? "down" : "up"` (see NetworkDeviceTopology.ts), so a
|
|
67
|
+
* caller that passed the operational flag instead would count every
|
|
68
|
+
* degraded-but-reachable device as down — and the map you reach by
|
|
69
|
+
* clicking that card would draw the same device green.
|
|
70
|
+
*/
|
|
71
|
+
export interface DeviceHealthStateInput {
|
|
72
|
+
monitorStatusIsOffline?: boolean | null | undefined;
|
|
73
|
+
isReachable?: boolean | null | undefined;
|
|
74
|
+
lastPolledAt?: Date | string | null | undefined;
|
|
75
|
+
lastSeenAt?: Date | string | null | undefined;
|
|
76
|
+
pollingIntervalInMinutes?: number | null | undefined;
|
|
77
|
+
interfacesDown?: number | null | undefined;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* How many devices in some scope are in each state.
|
|
82
|
+
*
|
|
83
|
+
* `total` is carried rather than derived so a caller can print "4 of 128"
|
|
84
|
+
* without summing four fields, and so a partial rollup (see the
|
|
85
|
+
* truncation flags on the hierarchy endpoint) still reports an honest
|
|
86
|
+
* denominator.
|
|
87
|
+
*/
|
|
88
|
+
export interface DeviceHealthCounts {
|
|
89
|
+
total: number;
|
|
90
|
+
down: number;
|
|
91
|
+
degraded: number;
|
|
92
|
+
healthy: number;
|
|
93
|
+
unknown: number;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The state of one device.
|
|
98
|
+
*
|
|
99
|
+
* Order is load-bearing. A stamped monitor status is the operator's own
|
|
100
|
+
* system of record and beats everything; then hard-down beats everything
|
|
101
|
+
* else, because a device that does not answer has interface counts that
|
|
102
|
+
* are by definition stale; then — and only for a device known to be up —
|
|
103
|
+
* dark ports make it degraded.
|
|
104
|
+
*
|
|
105
|
+
* Note what this means for a device stamped "Degraded": the ladder does not
|
|
106
|
+
* call it offline, so it is up, and it lands in "degraded" only if it also
|
|
107
|
+
* reports dark ports. That is the device map's rule, reproduced exactly.
|
|
108
|
+
* Diverging from it here — however reasonable the divergence — would put a
|
|
109
|
+
* site card and the map it opens into disagreement, which is the one
|
|
110
|
+
* outcome this module exists to make impossible.
|
|
111
|
+
*/
|
|
112
|
+
export function deviceHealthState(
|
|
113
|
+
device: DeviceHealthStateInput | null | undefined,
|
|
114
|
+
now?: Date | undefined,
|
|
115
|
+
): NetworkDeviceHealthState {
|
|
116
|
+
if (!device) {
|
|
117
|
+
return "unknown";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
let isUp: boolean;
|
|
121
|
+
|
|
122
|
+
if (
|
|
123
|
+
device.monitorStatusIsOffline === true ||
|
|
124
|
+
device.monitorStatusIsOffline === false
|
|
125
|
+
) {
|
|
126
|
+
// Anything the ladder does not call OFFLINE is up. See the input docs.
|
|
127
|
+
isUp = !device.monitorStatusIsOffline;
|
|
128
|
+
} else {
|
|
129
|
+
const reachability: NetworkDeviceReachability =
|
|
130
|
+
DeviceReachabilityUtil.getStatus(
|
|
131
|
+
{
|
|
132
|
+
isReachable: device.isReachable,
|
|
133
|
+
lastPolledAt: device.lastPolledAt,
|
|
134
|
+
lastSeenAt: device.lastSeenAt,
|
|
135
|
+
pollingIntervalInMinutes: device.pollingIntervalInMinutes,
|
|
136
|
+
},
|
|
137
|
+
now,
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
if (reachability === NetworkDeviceReachability.Pending) {
|
|
141
|
+
return "unknown";
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
isUp = reachability === NetworkDeviceReachability.Up;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (!isUp) {
|
|
148
|
+
return "down";
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (
|
|
152
|
+
typeof device.interfacesDown === "number" &&
|
|
153
|
+
Number.isFinite(device.interfacesDown) &&
|
|
154
|
+
device.interfacesDown > 0
|
|
155
|
+
) {
|
|
156
|
+
return "degraded";
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return "healthy";
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** A fresh, all-zero tally. */
|
|
163
|
+
export function emptyDeviceHealthCounts(): DeviceHealthCounts {
|
|
164
|
+
return {
|
|
165
|
+
total: 0,
|
|
166
|
+
down: 0,
|
|
167
|
+
degraded: 0,
|
|
168
|
+
healthy: 0,
|
|
169
|
+
unknown: 0,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Add one device's verdict to a tally, in place.
|
|
175
|
+
*
|
|
176
|
+
* Mutating on purpose: the hierarchy aggregator walks tens of thousands of
|
|
177
|
+
* devices into a few hundred buckets in one pass, and allocating a fresh
|
|
178
|
+
* five-field object per device is the whole cost of that pass.
|
|
179
|
+
*/
|
|
180
|
+
export function addDeviceHealth(
|
|
181
|
+
counts: DeviceHealthCounts,
|
|
182
|
+
state: NetworkDeviceHealthState,
|
|
183
|
+
): void {
|
|
184
|
+
counts.total += 1;
|
|
185
|
+
counts[state] += 1;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** The sum of two tallies, as a new object. */
|
|
189
|
+
export function mergeDeviceHealthCounts(
|
|
190
|
+
first: DeviceHealthCounts,
|
|
191
|
+
second: DeviceHealthCounts,
|
|
192
|
+
): DeviceHealthCounts {
|
|
193
|
+
return {
|
|
194
|
+
total: first.total + second.total,
|
|
195
|
+
down: first.down + second.down,
|
|
196
|
+
degraded: first.degraded + second.degraded,
|
|
197
|
+
healthy: first.healthy + second.healthy,
|
|
198
|
+
unknown: first.unknown + second.unknown,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* How many devices in this tally need somebody to look at them — the union
|
|
204
|
+
* of down and degraded, which is what every "needs attention" control in
|
|
205
|
+
* the product means by the phrase.
|
|
206
|
+
*/
|
|
207
|
+
export function deviceAttentionCount(counts: DeviceHealthCounts): number {
|
|
208
|
+
return counts.down + counts.degraded;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The worst state present in a tally, or "unknown" for an empty one.
|
|
213
|
+
*
|
|
214
|
+
* Used to color a site by its devices: one dark switch in a store of forty
|
|
215
|
+
* makes the store's device rollup read "down", the same worst-of rule
|
|
216
|
+
* SiteStatusRollupUtil applies to the site's own MonitorStatus.
|
|
217
|
+
*/
|
|
218
|
+
export function worstDeviceHealthState(
|
|
219
|
+
counts: DeviceHealthCounts,
|
|
220
|
+
): NetworkDeviceHealthState {
|
|
221
|
+
if (counts.down > 0) {
|
|
222
|
+
return "down";
|
|
223
|
+
}
|
|
224
|
+
if (counts.degraded > 0) {
|
|
225
|
+
return "degraded";
|
|
226
|
+
}
|
|
227
|
+
if (counts.healthy > 0) {
|
|
228
|
+
return "healthy";
|
|
229
|
+
}
|
|
230
|
+
return "unknown";
|
|
231
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { JSONObject } from "../../Types/JSON";
|
|
2
|
+
import NormalizedSecurityEvent from "../../Types/SecurityEvent/NormalizedSecurityEvent";
|
|
3
|
+
import OcsfSeverity, {
|
|
4
|
+
OcsfSeverityId,
|
|
5
|
+
normalizeOcsfSeverity,
|
|
6
|
+
} from "../../Types/SecurityEvent/OcsfSeverity";
|
|
7
|
+
import {
|
|
8
|
+
buildObservables,
|
|
9
|
+
contentHashEventUid,
|
|
10
|
+
flattenPayload,
|
|
11
|
+
parseEventTime,
|
|
12
|
+
readString,
|
|
13
|
+
readValue,
|
|
14
|
+
} from "./NormalizerHelpers";
|
|
15
|
+
import { prettifyUdmEventType } from "./UdmNormalizer";
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Best-effort normalizer for security events that are neither OCSF nor
|
|
19
|
+
* UDM — arbitrary vendor JSON forwarded from a SIEM, a webhook, or a
|
|
20
|
+
* custom script. Field lookup walks common aliases; anything not
|
|
21
|
+
* recognized still lands in `attributes`, so nothing is lost.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
const MESSAGE_FIELDS: Array<string> = [
|
|
25
|
+
"message",
|
|
26
|
+
"msg",
|
|
27
|
+
"summary",
|
|
28
|
+
"description",
|
|
29
|
+
"title",
|
|
30
|
+
"alert_name",
|
|
31
|
+
"alertName",
|
|
32
|
+
"name",
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
const SEVERITY_FIELDS: Array<string> = [
|
|
36
|
+
"severity",
|
|
37
|
+
"severity_name",
|
|
38
|
+
"level",
|
|
39
|
+
"priority",
|
|
40
|
+
"risk_level",
|
|
41
|
+
"riskLevel",
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const TIME_FIELDS: Array<string> = [
|
|
45
|
+
"timestamp",
|
|
46
|
+
"time",
|
|
47
|
+
"@timestamp",
|
|
48
|
+
"event_time",
|
|
49
|
+
"eventTime",
|
|
50
|
+
"created_at",
|
|
51
|
+
"createdAt",
|
|
52
|
+
"date",
|
|
53
|
+
"detected_at",
|
|
54
|
+
"detectedAt",
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const USER_FIELDS: Array<string> = [
|
|
58
|
+
"user",
|
|
59
|
+
"username",
|
|
60
|
+
"user_name",
|
|
61
|
+
"userName",
|
|
62
|
+
"account",
|
|
63
|
+
"principal",
|
|
64
|
+
"actor",
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const HOST_FIELDS: Array<string> = [
|
|
68
|
+
"host",
|
|
69
|
+
"hostname",
|
|
70
|
+
"host_name",
|
|
71
|
+
"computer",
|
|
72
|
+
"computer_name",
|
|
73
|
+
"device",
|
|
74
|
+
"device_name",
|
|
75
|
+
"machine",
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
const SOURCE_IP_FIELDS: Array<string> = [
|
|
79
|
+
"source_ip",
|
|
80
|
+
"src_ip",
|
|
81
|
+
"sourceIp",
|
|
82
|
+
"srcIp",
|
|
83
|
+
"client_ip",
|
|
84
|
+
"clientIp",
|
|
85
|
+
"ip",
|
|
86
|
+
"ip_address",
|
|
87
|
+
"ipAddress",
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
const TARGET_IP_FIELDS: Array<string> = [
|
|
91
|
+
"destination_ip",
|
|
92
|
+
"dest_ip",
|
|
93
|
+
"dst_ip",
|
|
94
|
+
"destinationIp",
|
|
95
|
+
"target_ip",
|
|
96
|
+
"targetIp",
|
|
97
|
+
"server_ip",
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
const TYPE_FIELDS: Array<string> = [
|
|
101
|
+
"event_type",
|
|
102
|
+
"eventType",
|
|
103
|
+
"category",
|
|
104
|
+
"type",
|
|
105
|
+
"action",
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
const VENDOR_FIELDS: Array<string> = ["vendor", "vendor_name", "vendorName"];
|
|
109
|
+
|
|
110
|
+
const PRODUCT_FIELDS: Array<string> = [
|
|
111
|
+
"product",
|
|
112
|
+
"product_name",
|
|
113
|
+
"productName",
|
|
114
|
+
"source",
|
|
115
|
+
"log_source",
|
|
116
|
+
"logSource",
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
const RULE_NAME_FIELDS: Array<string> = [
|
|
120
|
+
"rule",
|
|
121
|
+
"rule_name",
|
|
122
|
+
"ruleName",
|
|
123
|
+
"signature",
|
|
124
|
+
"detection",
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
const ID_FIELDS: Array<string> = [
|
|
128
|
+
"id",
|
|
129
|
+
"uid",
|
|
130
|
+
"uuid",
|
|
131
|
+
"event_id",
|
|
132
|
+
"eventId",
|
|
133
|
+
"alert_id",
|
|
134
|
+
"alertId",
|
|
135
|
+
];
|
|
136
|
+
|
|
137
|
+
function readFirst(payload: JSONObject, fields: Array<string>): string {
|
|
138
|
+
for (const field of fields) {
|
|
139
|
+
const value: string = readString(payload, field);
|
|
140
|
+
if (value) {
|
|
141
|
+
return value;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return "";
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export default class GenericNormalizer {
|
|
149
|
+
public static normalize(payload: JSONObject): NormalizedSecurityEvent {
|
|
150
|
+
const severityName: OcsfSeverity =
|
|
151
|
+
normalizeOcsfSeverity(readFirst(payload, SEVERITY_FIELDS)) ||
|
|
152
|
+
OcsfSeverity.Unknown;
|
|
153
|
+
|
|
154
|
+
let time: Date | null = null;
|
|
155
|
+
for (const field of TIME_FIELDS) {
|
|
156
|
+
time = parseEventTime(readValue(payload, field));
|
|
157
|
+
if (time) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const typeText: string = readFirst(payload, TYPE_FIELDS);
|
|
163
|
+
const className: string = typeText
|
|
164
|
+
? prettifyUdmEventType(typeText.replace(/[\s.-]+/g, "_"))
|
|
165
|
+
: "Base Event";
|
|
166
|
+
|
|
167
|
+
const principalUser: string = readFirst(payload, USER_FIELDS);
|
|
168
|
+
const principalHost: string = readFirst(payload, HOST_FIELDS);
|
|
169
|
+
const principalIp: string = readFirst(payload, SOURCE_IP_FIELDS);
|
|
170
|
+
const targetIp: string = readFirst(payload, TARGET_IP_FIELDS);
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
time: time || new Date(),
|
|
174
|
+
eventUid: readFirst(payload, ID_FIELDS) || contentHashEventUid(payload),
|
|
175
|
+
categoryUid: 0,
|
|
176
|
+
categoryName: "Uncategorized",
|
|
177
|
+
classUid: 0,
|
|
178
|
+
className,
|
|
179
|
+
activityName: "",
|
|
180
|
+
severityId: OcsfSeverityId[severityName],
|
|
181
|
+
severityName,
|
|
182
|
+
statusName: readString(payload, "status"),
|
|
183
|
+
message: readFirst(payload, MESSAGE_FIELDS) || "Security event",
|
|
184
|
+
vendorName: readFirst(payload, VENDOR_FIELDS),
|
|
185
|
+
productName: readFirst(payload, PRODUCT_FIELDS),
|
|
186
|
+
ruleId: readString(payload, "rule_id") || readString(payload, "ruleId"),
|
|
187
|
+
ruleName: readFirst(payload, RULE_NAME_FIELDS),
|
|
188
|
+
mitreTactics: [],
|
|
189
|
+
mitreTechniques: [],
|
|
190
|
+
principalUser,
|
|
191
|
+
principalHost,
|
|
192
|
+
principalIp,
|
|
193
|
+
principalProcess: readString(payload, "process"),
|
|
194
|
+
targetUser: readString(payload, "target_user"),
|
|
195
|
+
targetHost: readString(payload, "target_host"),
|
|
196
|
+
targetIp,
|
|
197
|
+
targetPort: 0,
|
|
198
|
+
targetResource: readString(payload, "target"),
|
|
199
|
+
observables: buildObservables([
|
|
200
|
+
principalUser,
|
|
201
|
+
principalHost,
|
|
202
|
+
principalIp,
|
|
203
|
+
targetIp,
|
|
204
|
+
]),
|
|
205
|
+
attributes: flattenPayload(payload),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|