@oneuptime/common 12.0.25 → 12.0.27
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 +2 -0
- package/Models/AnalyticsModels/ThreatIntelIndicator.ts +413 -0
- package/Models/DatabaseModels/AlertSeverity.ts +4 -1
- package/Models/DatabaseModels/CephClusterFeed.ts +625 -0
- package/Models/DatabaseModels/CloudResourceFeed.ts +625 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.ts +13 -0
- package/Models/DatabaseModels/DetectionRule.ts +9 -3
- package/Models/DatabaseModels/DockerHostFeed.ts +625 -0
- package/Models/DatabaseModels/DockerSwarmClusterFeed.ts +628 -0
- package/Models/DatabaseModels/GoogleSecOpsConnection.ts +9 -3
- package/Models/DatabaseModels/HostFeed.ts +625 -0
- package/Models/DatabaseModels/IncidentSeverity.ts +4 -1
- package/Models/DatabaseModels/Index.ts +22 -0
- package/Models/DatabaseModels/KubernetesClusterFeed.ts +628 -0
- package/Models/DatabaseModels/Monitor.ts +87 -0
- package/Models/DatabaseModels/NetworkDevice.ts +96 -5
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.ts +92 -6
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +301 -31
- package/Models/DatabaseModels/NetworkSite.ts +120 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +1 -0
- package/Models/DatabaseModels/PodmanHostFeed.ts +625 -0
- package/Models/DatabaseModels/ProxmoxClusterFeed.ts +626 -0
- package/Models/DatabaseModels/ScheduledMaintenance.ts +67 -0
- package/Models/DatabaseModels/ServiceFeed.ts +625 -0
- package/Models/DatabaseModels/TelemetrySourceMap.ts +474 -0
- package/Models/DatabaseModels/ThreatIntelFeed.ts +758 -0
- package/Models/DatabaseModels/UserOnCallLog.ts +1 -0
- package/Models/DatabaseModels/UserTotpAuth.ts +1 -0
- package/Models/DatabaseModels/UserWebAuthn.ts +1 -0
- package/Server/API/AlertAPI.ts +23 -1
- package/Server/API/BaseAPI.ts +14 -3
- package/Server/API/IncidentAPI.ts +41 -1
- package/Server/API/IncidentEpisodeAPI.ts +23 -1
- package/Server/API/MicrosoftTeamsAPI.ts +31 -2
- package/Server/API/ScheduledMaintenanceAPI.ts +23 -1
- package/Server/API/SlackAPI.ts +48 -0
- package/Server/API/TelemetryAPI.ts +167 -42
- package/Server/API/UserOnCallLogTimelineAPI.ts +75 -61
- package/Server/API/UserTotpAuthAPI.ts +67 -1
- package/Server/API/UserWebAuthnAPI.ts +44 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.ts +57 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.ts +129 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.ts +54 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.ts +64 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.ts +72 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.ts +489 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +18 -0
- package/Server/Middleware/IdentityRateLimit.ts +53 -3
- package/Server/Services/AIService.ts +181 -41
- package/Server/Services/CephClusterFeedService.ts +99 -0
- package/Server/Services/CephClusterLabelRuleEngineService.ts +29 -0
- package/Server/Services/CephClusterOwnerRuleEngineService.ts +23 -0
- package/Server/Services/CephClusterOwnerTeamService.ts +129 -0
- package/Server/Services/CephClusterOwnerUserService.ts +123 -0
- package/Server/Services/CephClusterService.ts +223 -2
- package/Server/Services/CloudResourceFeedService.ts +99 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +30 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +33 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +129 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +123 -0
- package/Server/Services/CloudResourceService.ts +227 -2
- package/Server/Services/DatabaseService.ts +265 -0
- package/Server/Services/DockerHostFeedService.ts +99 -0
- package/Server/Services/DockerHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/DockerHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/DockerHostOwnerTeamService.ts +129 -0
- package/Server/Services/DockerHostOwnerUserService.ts +123 -0
- package/Server/Services/DockerHostService.ts +227 -2
- package/Server/Services/DockerSwarmClusterFeedService.ts +102 -0
- package/Server/Services/DockerSwarmClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/DockerSwarmClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/DockerSwarmClusterOwnerTeamService.ts +133 -0
- package/Server/Services/DockerSwarmClusterOwnerUserService.ts +127 -0
- package/Server/Services/DockerSwarmClusterService.ts +229 -2
- package/Server/Services/EnterpriseLicenseService.ts +15 -7
- package/Server/Services/ExceptionAggregationService.ts +12 -2
- package/Server/Services/HostFeedService.ts +99 -0
- package/Server/Services/HostLabelRuleEngineService.ts +29 -0
- package/Server/Services/HostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/HostOwnerTeamService.ts +129 -0
- package/Server/Services/HostOwnerUserService.ts +123 -0
- package/Server/Services/HostService.ts +215 -2
- package/Server/Services/IncidentService.ts +11 -0
- package/Server/Services/Index.ts +24 -0
- package/Server/Services/KubernetesClusterFeedService.ts +99 -0
- package/Server/Services/KubernetesClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/KubernetesClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/KubernetesClusterOwnerTeamService.ts +133 -0
- package/Server/Services/KubernetesClusterOwnerUserService.ts +127 -0
- package/Server/Services/KubernetesClusterService.ts +231 -2
- package/Server/Services/LogAggregationService.ts +23 -280
- package/Server/Services/MetricAggregationService.ts +98 -1
- package/Server/Services/MonitorService.ts +177 -13
- package/Server/Services/MonitorTemplateService.ts +111 -0
- package/Server/Services/NetworkDeviceAutoImportRuleEngineService.ts +777 -86
- package/Server/Services/NetworkDeviceAutoImportRuleService.ts +199 -16
- package/Server/Services/NetworkDeviceDiscoveryScanService.ts +1055 -14
- package/Server/Services/NetworkDeviceService.ts +750 -4
- package/Server/Services/NetworkInterfaceService.ts +415 -0
- package/Server/Services/NetworkSiteService.ts +485 -52
- package/Server/Services/PodmanHostFeedService.ts +99 -0
- package/Server/Services/PodmanHostLabelRuleEngineService.ts +29 -0
- package/Server/Services/PodmanHostOwnerRuleEngineService.ts +23 -0
- package/Server/Services/PodmanHostOwnerTeamService.ts +129 -0
- package/Server/Services/PodmanHostOwnerUserService.ts +123 -0
- package/Server/Services/PodmanHostService.ts +227 -2
- package/Server/Services/ProjectService.ts +16 -10
- package/Server/Services/ProxmoxClusterFeedService.ts +99 -0
- package/Server/Services/ProxmoxClusterLabelRuleEngineService.ts +30 -0
- package/Server/Services/ProxmoxClusterOwnerRuleEngineService.ts +24 -0
- package/Server/Services/ProxmoxClusterOwnerTeamService.ts +131 -0
- package/Server/Services/ProxmoxClusterOwnerUserService.ts +124 -0
- package/Server/Services/ProxmoxClusterService.ts +225 -2
- package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +61 -0
- package/Server/Services/ServiceFeedService.ts +99 -0
- package/Server/Services/ServiceLabelRuleEngineService.ts +29 -0
- package/Server/Services/ServiceOwnerRuleEngineService.ts +26 -0
- package/Server/Services/ServiceOwnerTeamService.ts +129 -0
- package/Server/Services/ServiceOwnerUserService.ts +123 -0
- package/Server/Services/ServiceService.ts +227 -3
- package/Server/Services/StatusPageSubscriberService.ts +7 -0
- package/Server/Services/TelemetryAttributeService.ts +13 -3
- package/Server/Services/TelemetrySourceMapService.ts +307 -0
- package/Server/Services/ThreatIntelFeedService.ts +222 -0
- package/Server/Services/ThreatIntelIndicatorService.ts +428 -0
- package/Server/Services/TraceAggregationService.ts +101 -11
- package/Server/Services/UserService.ts +13 -6
- package/Server/Services/UserTwoFactorBackupCodeService.ts +127 -0
- package/Server/Services/UserWebhookService.ts +11 -2
- package/Server/Static/Brand/README.md +38 -0
- package/Server/Static/Brand/favicons/apple-touch-icon.png +0 -0
- package/Server/Static/Brand/favicons/favicon-16x16.png +0 -0
- package/Server/Static/Brand/favicons/favicon-32x32.png +0 -0
- package/Server/Static/Brand/favicons/favicon.ico +0 -0
- package/Server/Static/Brand/favicons/safari-pinned-tab.svg +31 -0
- package/Server/Static/Brand/hou-wb.svg +1 -0
- package/Server/Static/Brand/oneuptime-logo.svg +1 -0
- package/Server/Static/Brand/ou-wb.svg +1 -0
- package/Server/Static/Vendor/README.md +4 -0
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +13 -3
- package/Server/Types/Database/AggregateBy.ts +83 -0
- package/Server/Types/Database/AggregateResultUtil.ts +126 -0
- package/Server/Types/Database/JSONColumnQuery.ts +18 -0
- package/Server/Types/Database/QueryHelper.ts +40 -0
- package/Server/Types/Database/QueryUtil.ts +26 -0
- package/Server/Types/Workflow/Components/API/Utils.ts +10 -1
- package/Server/Types/Workflow/Components/JavaScript.ts +8 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +9 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +18 -0
- package/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.ts +422 -0
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +176 -0
- package/Server/Utils/DataSource/HttpFetch.ts +18 -0
- package/Server/Utils/Database/RelationIdUtil.ts +42 -0
- package/Server/Utils/Marketing/MarketingEventUtil.ts +38 -9
- package/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.ts +34 -3
- package/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.ts +9 -1
- package/Server/Utils/Monitor/Criteria/SyntheticMonitor.ts +28 -10
- package/Server/Utils/Monitor/MonitorAlert.ts +541 -332
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +330 -64
- package/Server/Utils/Monitor/MonitorIncident.ts +640 -434
- package/Server/Utils/Monitor/MonitorResource.ts +226 -49
- package/Server/Utils/Monitor/NetworkDeviceWalkUtil.ts +46 -3
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +23 -102
- package/Server/Utils/Monitor/PerEntityCriteriaFanOut.ts +329 -0
- package/Server/Utils/NetworkDevice/DeviceHealthAggregation.ts +427 -0
- package/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.ts +310 -0
- package/Server/Utils/OnCallNotificationContext.ts +686 -0
- package/Server/Utils/PrivateNetworkWebhookConfig.ts +549 -0
- package/Server/Utils/ResourceFeed/ResourceFeedUtil.ts +139 -0
- package/Server/Utils/Response.ts +11 -1
- package/Server/Utils/SSRFProtection.ts +230 -60
- package/Server/Utils/SecurityEvent/ConnectorErrorMessage.ts +106 -0
- package/Server/Utils/SecurityEvent/DetectionRuleEvaluator.ts +84 -284
- package/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.ts +47 -20
- package/Server/Utils/SecurityEvent/SecurityEventAlerting.ts +318 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.ts +199 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.ts +252 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.ts +739 -0
- package/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.ts +533 -0
- package/Server/Utils/StartServer.ts +83 -56
- package/Server/Utils/StatusPageSubscriberWebhook.ts +3 -0
- package/Server/Utils/Telemetry/SourceMapResolver.ts +480 -0
- package/Server/Utils/TwoFactorBackupCodeNotification.ts +106 -0
- package/Server/Utils/VM/VMAPI.ts +3 -0
- package/Server/Utils/VM/VMRunner.ts +27 -1
- package/Server/Utils/VendorAssets.ts +42 -0
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +136 -6
- package/Server/Views/AcknowledgeUserOnCallNotification.ejs +11 -9
- package/Server/Views/Partials/Head.ejs +9 -9
- package/Server/Views/Partials/OnCallNotificationDetails.ejs +48 -0
- package/Server/Views/ViewMessage.ejs +11 -9
- package/Tests/App/Accounts/LoginTwoFactorRecovery.test.tsx +972 -0
- package/Tests/App/Dashboard/AddNeighborToMonitoringModal.test.tsx +401 -0
- package/Tests/App/Dashboard/DiscoveryScanEditForm.test.tsx +707 -0
- package/Tests/App/Dashboard/DiscoveryScanWizardValidation.test.tsx +1908 -18
- package/Tests/App/Dashboard/ResourceFeed.test.tsx +230 -0
- package/Tests/App/Dashboard/ResourceFeedPageWiring.test.ts +216 -0
- package/Tests/App/Dashboard/TopologyAddToMonitoring.test.tsx +192 -0
- package/Tests/App/Dashboard/WorkspaceNotificationRuleConditions.test.tsx +439 -0
- package/Tests/Models/DatabaseModels/DateColumnDeserialization.test.ts +182 -0
- package/Tests/Models/DatabaseModels/RelationColumnModelTypeCoverage.test.ts +82 -0
- package/Tests/Models/DatabaseModels/ResourceFeedModels.test.ts +398 -0
- package/Tests/Models/DiscoveryScanNameColumn.test.ts +151 -16
- package/Tests/Models/DiscoveryScanSnmpEnabledColumn.test.ts +593 -0
- package/Tests/Models/NetworkDeviceCreateContract.test.ts +102 -0
- package/Tests/Server/API/AIGenerationProjectAIToggle.test.ts +607 -0
- package/Tests/Server/API/AIGenerationRequestBudget.test.ts +355 -0
- package/Tests/Server/API/AIKillSwitchBackstop.test.ts +602 -0
- package/Tests/Server/API/BaseAPIUpdateDateColumns.test.ts +154 -0
- package/Tests/Server/API/MicrosoftTeamsBotTestEndpoint.test.ts +335 -0
- package/Tests/Server/API/UserOnCallLogTimelineAcknowledgePage.test.ts +611 -0
- package/Tests/Server/API/UserTotpAuthAPI.test.ts +498 -4
- package/Tests/Server/API/UserWebAuthnBackupCodeMinting.test.ts +682 -0
- package/Tests/Server/Infrastructure/ExampleDockerfiles.test.ts +595 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +9 -0
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +6 -0
- package/Tests/Server/Services/AutoImportScanCredentialSelect.test.ts +18 -0
- package/Tests/Server/Services/DatabaseServiceAggregateBy.test.ts +590 -0
- package/Tests/Server/Services/DatabaseServiceUpdateWriteRouting.test.ts +12 -0
- package/Tests/Server/Services/DiscoveryScanClaimHookFreeSafety.test.ts +162 -26
- package/Tests/Server/Services/EnterpriseLicenseServiceCreate.test.ts +292 -0
- package/Tests/Server/Services/FeedRetentionConsistency.test.ts +119 -12
- package/Tests/Server/Services/LogAggregationAttributeOperators.test.ts +109 -0
- package/Tests/Server/Services/MetricAggregationAttributeOperators.test.ts +170 -0
- package/Tests/Server/Services/MonitorTemplateServiceNetworkDeviceSync.test.ts +383 -0
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleEngineService.test.ts +997 -3
- package/Tests/Server/Services/NetworkDeviceAutoImportRuleService.test.ts +830 -0
- package/Tests/Server/Services/NetworkDeviceAutoMonitorLifecycle.test.ts +528 -0
- package/Tests/Server/Services/NetworkDeviceDiscoveryScanService.test.ts +3141 -1
- package/Tests/Server/Services/NetworkDeviceRegisteredHostnames.test.ts +1023 -0
- package/Tests/Server/Services/NetworkDeviceSiteAssignmentRuleSkip.test.ts +728 -0
- package/Tests/Server/Services/NetworkInterfaceServiceUpsert.test.ts +795 -0
- package/Tests/Server/Services/NetworkSiteRollupPolicyAndMaintenance.test.ts +903 -0
- package/Tests/Server/Services/NetworkSiteService.test.ts +165 -24
- package/Tests/Server/Services/ProjectServiceChangePlan.test.ts +5 -3
- package/Tests/Server/Services/ProjectServiceCreateSubscriptionStarted.test.ts +5 -2
- package/Tests/Server/Services/ResourceCreationFeedWrites.test.ts +304 -0
- package/Tests/Server/Services/ResourceFeedServices.test.ts +269 -0
- package/Tests/Server/Services/ResourceOwnerFeedWrites.test.ts +245 -0
- package/Tests/Server/Services/SecurityEventLastErrorColumnWidth.test.ts +792 -0
- package/Tests/Server/Services/TelemetrySourceMapService.test.ts +483 -0
- package/Tests/Server/Services/ThreatIntelFeedService.test.ts +351 -0
- package/Tests/Server/Services/ThreatIntelIndicatorService.test.ts +366 -0
- package/Tests/Server/Services/TraceAggregationAttributeOperators.test.ts +507 -0
- package/Tests/Server/Services/UserTwoFactorBackupCodeGenerateIfNone.test.ts +705 -0
- package/Tests/Server/Services/WorkspaceNotificationRuleOnCallDutyPolicy.test.ts +306 -0
- package/Tests/Server/Types/Database/AggregateResultUtil.test.ts +386 -0
- package/Tests/Server/Types/Database/Permissions/SelectRejectionMessageContract.test.ts +424 -0
- package/Tests/Server/Types/Database/QueryHelperWildcard.test.ts +142 -0
- package/Tests/Server/Types/Workflow/Components/ApiComponentPrivateNetwork.test.ts +163 -0
- package/Tests/Server/Types/Workflow/Components/JavaScriptPrivateNetwork.test.ts +124 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +5 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +39 -1
- package/Tests/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.test.ts +338 -0
- package/Tests/Server/Utils/AnalyticsDatabase/StatementGeneratorWildcard.test.ts +383 -0
- package/Tests/Server/Utils/Marketing/EmittedMarketingEvent.ts +23 -0
- package/Tests/Server/Utils/Marketing/MarketingEventUtil.test.ts +51 -0
- package/Tests/Server/Utils/Monitor/Criteria/SyntheticMonitorCriteria.test.ts +259 -0
- package/Tests/Server/Utils/Monitor/MonitorCriteriaEvaluatorPerSeriesFanout.test.ts +557 -0
- package/Tests/Server/Utils/Monitor/MonitorDependencySuppressionCreatorSkip.test.ts +12 -2
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkLogWritePath.test.ts +404 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceWalkUtil.test.ts +8 -2
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +125 -98
- package/Tests/Server/Utils/Monitor/PerEntityCriteriaFanOut.test.ts +444 -0
- package/Tests/Server/Utils/Monitor/PerSeriesSecondEntityAlerting.test.ts +1112 -0
- package/Tests/Server/Utils/NetworkDevice/DeviceHealthAggregation.test.ts +717 -0
- package/Tests/Server/Utils/NetworkDevice/RulePatternValidator.test.ts +78 -0
- package/Tests/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.test.ts +363 -0
- package/Tests/Server/Utils/OfflineAssetHygiene.test.ts +35 -0
- package/Tests/Server/Utils/OnCallNotificationContext.test.ts +908 -0
- package/Tests/Server/Utils/PrivateNetworkWebhookConfig.test.ts +423 -0
- package/Tests/Server/Utils/ResourceFeed/ResourceFeedUtil.test.ts +191 -0
- package/Tests/Server/Utils/SSRFProtectionPrivateNetwork.test.ts +597 -0
- package/Tests/Server/Utils/SecurityEvent/ConnectorErrorMessage.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/DetectionRuleEvaluator.test.ts +381 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPoller.test.ts +417 -0
- package/Tests/Server/Utils/SecurityEvent/GoogleSecOpsPollerFailureTaxonomy.test.ts +819 -0
- package/Tests/Server/Utils/SecurityEvent/SecurityEventAlerting.test.ts +246 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.test.ts +282 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.test.ts +312 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.test.ts +854 -0
- package/Tests/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.test.ts +437 -0
- package/Tests/Server/Utils/StartServerErrorStatus.test.ts +225 -0
- package/Tests/Server/Utils/StatusPage/MonitorRulePatternValidator.test.ts +62 -0
- package/Tests/Server/Utils/StatusPageSubscriberWebhookPrivateNetwork.test.ts +119 -0
- package/Tests/Server/Utils/Telemetry/SourceMapResolver.test.ts +542 -0
- package/Tests/Server/Utils/TwoFactorBackupCodeNotification.test.ts +272 -0
- package/Tests/Server/Utils/VM/VMRunnerPrivateNetworkWiring.test.ts +111 -0
- package/Tests/Server/Utils/VendorAssets.test.ts +117 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsChannelSend.test.ts +101 -4
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsInstallStateDiagnostics.test.ts +922 -0
- package/Tests/Server/Utils/Workspace/MicrosoftTeamsRosterDiagnosticMessages.test.ts +642 -0
- package/Tests/Server/Views/OnCallAcknowledgePage.test.ts +430 -0
- package/Tests/Types/API/HostnameAuthorityParsing.test.ts +1 -0
- package/Tests/Types/API/URLMailtoQueryString.test.ts +439 -0
- package/Tests/Types/API/URLQueryString.test.ts +481 -0
- package/Tests/Types/API/URLRouteQuerySeparation.test.ts +491 -0
- package/Tests/Types/BaseDatabase/Wildcard.test.ts +163 -0
- package/Tests/Types/BaseDatabase/WildcardPattern.test.ts +149 -0
- package/Tests/Types/Database/DateColumnValue.test.ts +265 -0
- package/Tests/Types/DateToIsoStringOrNull.test.ts +67 -0
- package/Tests/Types/Log/LogQueryToFilter.test.ts +218 -43
- package/Tests/Types/Monitor/KubernetesTemplateGroupByKeys.test.ts +225 -0
- package/Tests/Types/Monitor/TemplateGroupByKeys.test.ts +296 -0
- package/Tests/Types/NetworkAutomation/RuleRunResult.test.ts +102 -0
- package/Tests/Types/NetworkAutomation/RuleRunResultDescribe.test.ts +145 -0
- package/Tests/Types/NetworkSite/SiteHealthRollupPolicy.test.ts +58 -0
- package/Tests/Types/SerializableObjectDictionaryImportCycle.test.ts +15 -0
- package/Tests/Types/Telemetry/TelemetrySearchQuery.test.ts +620 -0
- package/Tests/Types/WhatsApp/WhatsAppTemplates.test.ts +110 -0
- package/Tests/Types/Workspace/NotificationRuleConditionUtil.test.ts +76 -6
- package/Tests/Types/Workspace/NotificationRules/NotificationRuleCondition.test.ts +16 -4
- package/Tests/Types/Workspace/NotificationRules/OnCallDutyPolicyConditions.test.ts +669 -0
- package/Tests/UI/Components/DictionaryFilterOperatorWildcard.test.ts +175 -0
- package/Tests/UI/Components/IconOpticalSize.test.tsx +377 -0
- package/Tests/UI/Components/LogsHistogramDragTooltip.test.tsx +393 -0
- package/Tests/UI/Components/LogsViewerHistogramZoom.test.tsx +248 -0
- package/Tests/UI/Components/TelemetryHistogramDragTooltip.test.tsx +205 -0
- package/Tests/UI/Components/UseHistogramZoom.test.tsx +262 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsChatsCardInstallGuidance.test.tsx +332 -0
- package/Tests/UI/MicrosoftTeams/MicrosoftTeamsInstallGuidanceContent.test.tsx +643 -0
- package/Tests/Utils/Monitor/InterfaceInventoryUtil.test.ts +824 -0
- package/Tests/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.test.ts +626 -0
- package/Tests/Utils/Monitor/NetworkTopologyUtil.test.ts +718 -0
- package/Tests/Utils/NetworkDevice/DeviceHealthStateUtil.test.ts +59 -0
- package/Tests/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.test.ts +287 -2
- package/Tests/Utils/NetworkDiscovery/DiscoveryImportEligibility.test.ts +73 -0
- package/Tests/Utils/NetworkDiscovery/PingMonitorBuilder.test.ts +317 -0
- package/Tests/Utils/NetworkDiscovery/RescanIntervalUtil.test.ts +262 -0
- package/Tests/Utils/NetworkDiscovery/ScanModeUtil.test.ts +474 -0
- package/Tests/Utils/NetworkDiscovery/SnmpScanConfigUtil.test.ts +2442 -0
- package/Tests/Utils/NetworkSite/SiteMaintenanceUtil.test.ts +188 -0
- package/Tests/Utils/NetworkSite/SiteStatusRollupUtil.test.ts +522 -0
- package/Tests/Utils/NetworkSite/SiteUptimeUtil.test.ts +694 -0
- package/Tests/Utils/SecurityEvent/ThreatIntel/StixPatternParser.test.ts +281 -0
- package/Tests/Utils/Telemetry/CrossSignalScope.test.ts +87 -67
- package/Types/API/URL.ts +100 -28
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +8 -0
- package/Types/BaseDatabase/NotWildcard.ts +86 -0
- package/Types/BaseDatabase/Wildcard.ts +89 -0
- package/Types/BaseDatabase/WildcardPattern.ts +176 -0
- package/Types/Database/DateColumnValue.ts +184 -0
- package/Types/Database/TableColumn.ts +40 -5
- package/Types/Date.ts +37 -0
- package/Types/Email/EmailTemplateType.ts +1 -0
- package/Types/JSON.ts +8 -0
- package/Types/Log/LogQueryToFilter.ts +167 -129
- package/Types/Monitor/DockerAlertTemplates.ts +43 -12
- package/Types/Monitor/HostAlertTemplates.ts +31 -3
- package/Types/Monitor/KubernetesAlertTemplates.ts +98 -0
- package/Types/Monitor/MonitorStep.ts +49 -0
- package/Types/Monitor/PodmanAlertTemplates.ts +39 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +14 -0
- package/Types/Monitor/SnmpMonitor/LldpNeighbor.ts +11 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +11 -4
- package/Types/NetworkAutomation/RuleRunResult.ts +191 -2
- package/Types/NetworkSite/SiteHealthRollupPolicy.ts +96 -0
- package/Types/Permission.ts +411 -0
- package/Types/Probe/ProbeApiIngestResponse.ts +42 -0
- package/Types/SecurityEvent/ThreatIntelConstants.ts +118 -0
- package/Types/SerializableObjectDictionary.ts +8 -0
- package/Types/Telemetry/SourceMap.ts +56 -0
- package/Types/Telemetry/TelemetrySearchQuery.ts +949 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +12 -1
- package/UI/Components/Charts/Utils/useHistogramZoom.ts +101 -0
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/LogsViewer.tsx +19 -3
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- package/UI/Components/LogsViewer/components/LogsHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +18 -2
- package/UI/Components/TelemetryViewer/components/TelemetryHistogram.tsx +52 -1
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +15 -2
- package/Utils/Metrics/MetricExplorerUrl.ts +77 -15
- package/Utils/Monitor/InterfaceInventoryUtil.ts +251 -0
- package/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.ts +333 -0
- package/Utils/Monitor/NetworkTopologyUtil.ts +249 -28
- package/Utils/NetworkDevice/DeviceHealthStateUtil.ts +14 -6
- package/Utils/NetworkDiscovery/AutoImportRuleMatcher.ts +2 -0
- package/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.ts +49 -18
- package/Utils/NetworkDiscovery/PingMonitorBuilder.ts +215 -0
- package/Utils/NetworkDiscovery/RescanIntervalUtil.ts +148 -0
- package/Utils/NetworkDiscovery/ScanModeUtil.ts +105 -0
- package/Utils/NetworkDiscovery/SnmpScanConfigUtil.ts +827 -0
- package/Utils/NetworkSite/SiteMaintenanceUtil.ts +110 -0
- package/Utils/NetworkSite/SiteStatusRollupUtil.ts +350 -19
- package/Utils/NetworkSite/SiteUptimeUtil.ts +422 -21
- package/Utils/SecurityEvent/ThreatIntel/StixPatternParser.ts +383 -0
- package/Utils/Telemetry/CrossSignalScope.ts +37 -39
- package/build/dist/Models/AnalyticsModels/Index.js +2 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js +325 -0
- package/build/dist/Models/AnalyticsModels/ThreatIntelIndicator.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AlertSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/AlertSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CephClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/CloudResourceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js +11 -0
- package/build/dist/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DetectionRule.js +9 -3
- package/build/dist/Models/DatabaseModels/DetectionRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/DockerSwarmClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js +9 -3
- package/build/dist/Models/DatabaseModels/GoogleSecOpsConnection.js.map +1 -1
- package/build/dist/Models/DatabaseModels/HostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/HostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js +4 -1
- package/build/dist/Models/DatabaseModels/IncidentSeverity.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +22 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/KubernetesClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Monitor.js +81 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +103 -7
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +91 -6
- package/build/dist/Models/DatabaseModels/NetworkDeviceAutoImportRule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +276 -31
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js +124 -1
- package/build/dist/Models/DatabaseModels/NetworkSite.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/PodmanHostFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ProxmoxClusterFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js +66 -0
- package/build/dist/Models/DatabaseModels/ScheduledMaintenance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/ServiceFeed.js +648 -0
- package/build/dist/Models/DatabaseModels/ServiceFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js +496 -0
- package/build/dist/Models/DatabaseModels/TelemetrySourceMap.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js +800 -0
- package/build/dist/Models/DatabaseModels/ThreatIntelFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js +1 -0
- package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js +1 -0
- package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -1
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js +1 -0
- package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -1
- package/build/dist/Server/API/AlertAPI.js +18 -1
- package/build/dist/Server/API/AlertAPI.js.map +1 -1
- package/build/dist/Server/API/BaseAPI.js +8 -1
- package/build/dist/Server/API/BaseAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentAPI.js +35 -1
- package/build/dist/Server/API/IncidentAPI.js.map +1 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js +18 -1
- package/build/dist/Server/API/IncidentEpisodeAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +30 -2
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +18 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js.map +1 -1
- package/build/dist/Server/API/SlackAPI.js +45 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +100 -35
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +64 -59
- package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js +65 -1
- package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js +42 -1
- package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1787923136162-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789600000000-AddAutoProvisionedNetworkDeviceMonitors.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js +88 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789700000000-AddNetworkScaleIndexes.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js +39 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789800000000-WidenSecurityEventLastErrorColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1789900000000-AddNetworkSiteRollupPolicyAndMaintenance.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000000-AddTelemetrySourceMap.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js +61 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790000000001-AddSnmpConfigsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js +179 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1790100000000-AddResourceActivityFeeds.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Middleware/IdentityRateLimit.js +40 -3
- package/build/dist/Server/Middleware/IdentityRateLimit.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +177 -30
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterFeedService.js +89 -0
- package/build/dist/Server/Services/CephClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CephClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/CephClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CephClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CephClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CephClusterService.js +175 -1
- package/build/dist/Server/Services/CephClusterService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceFeedService.js +89 -0
- package/build/dist/Server/Services/CloudResourceFeedService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +28 -3
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceService.js +177 -1
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +201 -0
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostFeedService.js +89 -0
- package/build/dist/Server/Services/DockerHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerHostService.js +177 -1
- package/build/dist/Server/Services/DockerHostService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js +90 -0
- package/build/dist/Server/Services/DockerSwarmClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/DockerSwarmClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/DockerSwarmClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js +175 -1
- package/build/dist/Server/Services/DockerSwarmClusterService.js.map +1 -1
- package/build/dist/Server/Services/EnterpriseLicenseService.js +40 -30
- package/build/dist/Server/Services/EnterpriseLicenseService.js.map +1 -1
- package/build/dist/Server/Services/ExceptionAggregationService.js +8 -2
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostFeedService.js +89 -0
- package/build/dist/Server/Services/HostFeedService.js.map +1 -0
- package/build/dist/Server/Services/HostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/HostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/HostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/HostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/HostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/HostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +175 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +10 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +24 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterFeedService.js +89 -0
- package/build/dist/Server/Services/KubernetesClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/KubernetesClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/KubernetesClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/KubernetesClusterService.js +177 -1
- package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +19 -196
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +59 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +115 -13
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/MonitorTemplateService.js +86 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js +561 -67
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js +130 -16
- package/build/dist/Server/Services/NetworkDeviceAutoImportRuleService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js +850 -8
- package/build/dist/Server/Services/NetworkDeviceDiscoveryScanService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceService.js +594 -5
- package/build/dist/Server/Services/NetworkDeviceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkInterfaceService.js +306 -0
- package/build/dist/Server/Services/NetworkInterfaceService.js.map +1 -1
- package/build/dist/Server/Services/NetworkSiteService.js +408 -47
- package/build/dist/Server/Services/NetworkSiteService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostFeedService.js +89 -0
- package/build/dist/Server/Services/PodmanHostFeedService.js.map +1 -0
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/PodmanHostLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/PodmanHostOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/PodmanHostOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js +113 -0
- package/build/dist/Server/Services/PodmanHostOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/PodmanHostService.js +177 -1
- package/build/dist/Server/Services/PodmanHostService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +40 -30
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js +89 -0
- package/build/dist/Server/Services/ProxmoxClusterFeedService.js.map +1 -0
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ProxmoxClusterLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js +21 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ProxmoxClusterOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js +175 -1
- package/build/dist/Server/Services/ProxmoxClusterService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +56 -0
- package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceFeedService.js +89 -0
- package/build/dist/Server/Services/ServiceFeedService.js.map +1 -0
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js +27 -3
- package/build/dist/Server/Services/ServiceLabelRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js +24 -0
- package/build/dist/Server/Services/ServiceOwnerRuleEngineService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerTeamService.js +120 -0
- package/build/dist/Server/Services/ServiceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/ServiceOwnerUserService.js +113 -0
- package/build/dist/Server/Services/ServiceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/ServiceService.js +173 -2
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageSubscriberService.js +7 -0
- package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +9 -3
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Services/TelemetrySourceMapService.js +265 -0
- package/build/dist/Server/Services/TelemetrySourceMapService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js +157 -0
- package/build/dist/Server/Services/ThreatIntelFeedService.js.map +1 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js +276 -0
- package/build/dist/Server/Services/ThreatIntelIndicatorService.js.map +1 -0
- package/build/dist/Server/Services/TraceAggregationService.js +62 -6
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +22 -13
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js +120 -0
- package/build/dist/Server/Services/UserTwoFactorBackupCodeService.js.map +1 -1
- package/build/dist/Server/Services/UserWebhookService.js +11 -2
- package/build/dist/Server/Services/UserWebhookService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +12 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/AggregateBy.js +2 -0
- package/build/dist/Server/Types/Database/AggregateBy.js.map +1 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js +90 -0
- package/build/dist/Server/Types/Database/AggregateResultUtil.js.map +1 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js +14 -0
- package/build/dist/Server/Types/Database/JSONColumnQuery.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryHelper.js +42 -0
- package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +18 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js +10 -1
- package/build/dist/Server/Types/Workflow/Components/API/Utils.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js +8 -0
- package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +8 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +15 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js +266 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/AttributeFilterStatement.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +134 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Server/Utils/DataSource/HttpFetch.js +8 -0
- package/build/dist/Server/Utils/DataSource/HttpFetch.js.map +1 -1
- package/build/dist/Server/Utils/Database/RelationIdUtil.js +31 -0
- package/build/dist/Server/Utils/Database/RelationIdUtil.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js +26 -8
- package/build/dist/Server/Utils/Marketing/MarketingEventUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js +42 -17
- package/build/dist/Server/Utils/Monitor/Criteria/ServerMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js +9 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SnmpMonitorCriteria.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js +15 -2
- package/build/dist/Server/Utils/Monitor/Criteria/SyntheticMonitor.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +386 -271
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +278 -64
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +469 -350
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorResource.js +183 -44
- package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js +46 -3
- package/build/dist/Server/Utils/Monitor/NetworkDeviceWalkUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +18 -91
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js +194 -0
- package/build/dist/Server/Utils/Monitor/PerEntityCriteriaFanOut.js.map +1 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js +332 -0
- package/build/dist/Server/Utils/NetworkDevice/DeviceHealthAggregation.js.map +1 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js +279 -0
- package/build/dist/Server/Utils/NetworkSite/NetworkSiteMaintenanceSuppression.js.map +1 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js +415 -0
- package/build/dist/Server/Utils/OnCallNotificationContext.js.map +1 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js +424 -0
- package/build/dist/Server/Utils/PrivateNetworkWebhookConfig.js.map +1 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js +108 -0
- package/build/dist/Server/Utils/ResourceFeed/ResourceFeedUtil.js.map +1 -0
- package/build/dist/Server/Utils/Response.js +12 -1
- package/build/dist/Server/Utils/Response.js.map +1 -1
- package/build/dist/Server/Utils/SSRFProtection.js +160 -58
- package/build/dist/Server/Utils/SSRFProtection.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js +89 -0
- package/build/dist/Server/Utils/SecurityEvent/ConnectorErrorMessage.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js +75 -234
- package/build/dist/Server/Utils/SecurityEvent/DetectionRuleEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js +41 -16
- package/build/dist/Server/Utils/SecurityEvent/GoogleSecOps/GoogleSecOpsPoller.js.map +1 -1
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js +217 -0
- package/build/dist/Server/Utils/SecurityEvent/SecurityEventAlerting.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js +103 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/TaxiiClient.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js +168 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelEnricher.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js +527 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelFeedPoller.js.map +1 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js +376 -0
- package/build/dist/Server/Utils/SecurityEvent/ThreatIntel/ThreatIntelMatcher.js.map +1 -0
- package/build/dist/Server/Utils/StartServer.js +70 -44
- package/build/dist/Server/Utils/StartServer.js.map +1 -1
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js +3 -0
- package/build/dist/Server/Utils/StatusPageSubscriberWebhook.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js +327 -0
- package/build/dist/Server/Utils/Telemetry/SourceMapResolver.js.map +1 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js +84 -0
- package/build/dist/Server/Utils/TwoFactorBackupCodeNotification.js.map +1 -0
- package/build/dist/Server/Utils/VM/VMAPI.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +10 -1
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Server/Utils/VendorAssets.js +29 -0
- package/build/dist/Server/Utils/VendorAssets.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +121 -6
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Types/API/URL.js +88 -27
- package/build/dist/Types/API/URL.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +8 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/NotWildcard.js +72 -0
- package/build/dist/Types/BaseDatabase/NotWildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js +75 -0
- package/build/dist/Types/BaseDatabase/Wildcard.js.map +1 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js +137 -0
- package/build/dist/Types/BaseDatabase/WildcardPattern.js.map +1 -0
- package/build/dist/Types/Database/DateColumnValue.js +125 -0
- package/build/dist/Types/Database/DateColumnValue.js.map +1 -0
- package/build/dist/Types/Database/TableColumn.js +18 -2
- package/build/dist/Types/Database/TableColumn.js.map +1 -1
- package/build/dist/Types/Date.js +31 -0
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +1 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/JSON.js +2 -0
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Log/LogQueryToFilter.js +111 -108
- package/build/dist/Types/Log/LogQueryToFilter.js.map +1 -1
- package/build/dist/Types/Monitor/DockerAlertTemplates.js +40 -16
- package/build/dist/Types/Monitor/DockerAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/HostAlertTemplates.js +29 -7
- package/build/dist/Types/Monitor/HostAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js +98 -4
- package/build/dist/Types/Monitor/KubernetesAlertTemplates.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +40 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js +36 -16
- package/build/dist/Types/Monitor/PodmanAlertTemplates.js.map +1 -1
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js +90 -0
- package/build/dist/Types/NetworkAutomation/RuleRunResult.js.map +1 -1
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js +84 -0
- package/build/dist/Types/NetworkSite/SiteHealthRollupPolicy.js.map +1 -0
- package/build/dist/Types/Permission.js +354 -0
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js +100 -0
- package/build/dist/Types/SecurityEvent/ThreatIntelConstants.js.map +1 -0
- package/build/dist/Types/SerializableObjectDictionary.js +8 -0
- package/build/dist/Types/SerializableObjectDictionary.js.map +1 -1
- package/build/dist/Types/Telemetry/SourceMap.js +9 -0
- package/build/dist/Types/Telemetry/SourceMap.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js +661 -0
- package/build/dist/Types/Telemetry/TelemetrySearchQuery.js.map +1 -0
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +12 -1
- package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js +47 -0
- package/build/dist/UI/Components/Charts/Utils/useHistogramZoom.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +67 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +28 -1
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +15 -3
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +25 -4
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js +36 -16
- package/build/dist/UI/Components/LogsViewer/components/LogSearchHelp.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js +33 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js +33 -5
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetryHistogram.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +14 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +54 -9
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -1
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js +128 -0
- package/build/dist/Utils/Monitor/InterfaceInventoryUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js +190 -0
- package/build/dist/Utils/Monitor/NetworkDeviceMonitorTemplateUtil.js.map +1 -0
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +206 -28
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js +14 -7
- package/build/dist/Utils/NetworkDevice/DeviceHealthStateUtil.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/AutoImportRuleMatcher.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js +34 -18
- package/build/dist/Utils/NetworkDiscovery/DiscoveredDeviceBuilder.js.map +1 -1
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js +163 -0
- package/build/dist/Utils/NetworkDiscovery/PingMonitorBuilder.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js +99 -0
- package/build/dist/Utils/NetworkDiscovery/RescanIntervalUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js +85 -0
- package/build/dist/Utils/NetworkDiscovery/ScanModeUtil.js.map +1 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js +560 -0
- package/build/dist/Utils/NetworkDiscovery/SnmpScanConfigUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js +56 -0
- package/build/dist/Utils/NetworkSite/SiteMaintenanceUtil.js.map +1 -0
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js +185 -10
- package/build/dist/Utils/NetworkSite/SiteStatusRollupUtil.js.map +1 -1
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js +248 -21
- package/build/dist/Utils/NetworkSite/SiteUptimeUtil.js.map +1 -1
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js +255 -0
- package/build/dist/Utils/SecurityEvent/ThreatIntel/StixPatternParser.js.map +1 -0
- package/build/dist/Utils/Telemetry/CrossSignalScope.js +27 -30
- package/build/dist/Utils/Telemetry/CrossSignalScope.js.map +1 -1
- package/package.json +2 -1
- package/Tests/Types/Log/LogQueryParser.test.ts +0 -186
- package/Types/Log/LogQueryParser.ts +0 -252
- package/build/dist/Types/Log/LogQueryParser.js +0 -200
- package/build/dist/Types/Log/LogQueryParser.js.map +0 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import UserTotpAuthAPI from "../../../Server/API/UserTotpAuthAPI";
|
|
2
2
|
import UserTotpAuthService from "../../../Server/Services/UserTotpAuthService";
|
|
3
3
|
import UserService from "../../../Server/Services/UserService";
|
|
4
|
+
import UserTwoFactorBackupCodeService from "../../../Server/Services/UserTwoFactorBackupCodeService";
|
|
4
5
|
import TotpAuth from "../../../Server/Utils/TotpAuth";
|
|
6
|
+
import TwoFactorBackupCode from "../../../Server/Utils/TwoFactorBackupCode";
|
|
7
|
+
import logger from "../../../Server/Utils/Logger";
|
|
5
8
|
import {
|
|
6
9
|
NextFunction,
|
|
7
10
|
OneUptimeRequest,
|
|
@@ -9,9 +12,12 @@ import {
|
|
|
9
12
|
} from "../../../Server/Utils/Express";
|
|
10
13
|
import Response from "../../../Server/Utils/Response";
|
|
11
14
|
import { mockRouter } from "./Helpers";
|
|
15
|
+
import { getJestSpyOn } from "../../Spy";
|
|
16
|
+
import Dictionary from "../../../Types/Dictionary";
|
|
12
17
|
import Email from "../../../Types/Email";
|
|
13
18
|
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
14
19
|
import Exception from "../../../Types/Exception/Exception";
|
|
20
|
+
import { JSONObject } from "../../../Types/JSON";
|
|
15
21
|
import ObjectID from "../../../Types/ObjectID";
|
|
16
22
|
import UserTotpAuth from "../../../Models/DatabaseModels/UserTotpAuth";
|
|
17
23
|
import User from "../../../Models/DatabaseModels/User";
|
|
@@ -34,6 +40,56 @@ import { afterEach, beforeEach, describe, expect, test } from "@jest/globals";
|
|
|
34
40
|
* pending TOTP row as verified using a code from their own phone — a second
|
|
35
41
|
* factor the victim does not hold. That check is asserted directly, and the
|
|
36
42
|
* assertion that matters is that isVerified is never written.
|
|
43
|
+
*
|
|
44
|
+
* THE THIRD CONCERN, AND WHY THIS FILE GREW (issue #3382)
|
|
45
|
+
*
|
|
46
|
+
* Completing this endpoint used to leave the account with a second factor and
|
|
47
|
+
* no way back into it. Backup codes existed, but the only thing in the product
|
|
48
|
+
* that ever minted a set was a button on the profile page that a user had to
|
|
49
|
+
* go and find, so in practice every account held zero — and the "use a backup
|
|
50
|
+
* code" link on the sign-in page was gated on holding some, so it rendered for
|
|
51
|
+
* nobody. Losing the phone meant losing the account.
|
|
52
|
+
*
|
|
53
|
+
* So this route now mints a set for an owner who has none, and the response
|
|
54
|
+
* carries the plaintext. Four properties of that are asserted below, each of
|
|
55
|
+
* which fails silently — suite still green, users still locked out — if
|
|
56
|
+
* nobody pins it:
|
|
57
|
+
*
|
|
58
|
+
* 1. THE MINT HAPPENS, AND FOR THE OWNER OF THE ROW. The user id is read off
|
|
59
|
+
* the UserTotpAuth record, never off the request; a route that minted for
|
|
60
|
+
* whoever asked would hand recovery material for one account to another.
|
|
61
|
+
* 2. IT IS `generateForUserIfNone`, NEVER `regenerateForUser`. Regeneration
|
|
62
|
+
* REPLACES, so running it here would void the ten codes the user printed
|
|
63
|
+
* when they enrolled their first authenticator app the moment they added
|
|
64
|
+
* a second one — and they would not find out until the day they needed
|
|
65
|
+
* them.
|
|
66
|
+
* 3. AN ACCOUNT THAT ALREADY HAS CODES GETS AN EMPTY ARRAY, never null and
|
|
67
|
+
* never a missing key. The page maps over this to decide whether to raise
|
|
68
|
+
* the show-once screen.
|
|
69
|
+
* 4. A MINT FAILURE DOES NOT FAIL THE VALIDATION. `isVerified` is already
|
|
70
|
+
* written by the time the mint runs, so an error thrown from here would
|
|
71
|
+
* tell the user their authenticator did not work when it did, and send
|
|
72
|
+
* them round the enrolment loop against a factor that is already live.
|
|
73
|
+
*
|
|
74
|
+
* And the ordering, which is the reason the mint sits where it does: nothing
|
|
75
|
+
* is minted until the submitted code has verified AND the row has been
|
|
76
|
+
* updated. Minting earlier would hand a set of recovery codes to a caller who
|
|
77
|
+
* failed the challenge.
|
|
78
|
+
*
|
|
79
|
+
* WHAT IS MOCKED, AND WHAT IS NOT
|
|
80
|
+
*
|
|
81
|
+
* `UserTwoFactorBackupCodeService` is spied on at the singleton so nothing
|
|
82
|
+
* touches Postgres and the plaintext is a fixed string this file can assert
|
|
83
|
+
* on. `TwoFactorBackupCode` is NOT mocked: the hyphenated display form is the
|
|
84
|
+
* route's contract with the page that shows the codes, and a stubbed formatter
|
|
85
|
+
* would make that assertion circular.
|
|
86
|
+
*
|
|
87
|
+
* Sibling coverage, so nothing here is duplicated:
|
|
88
|
+
* - Common/Tests/Server/Services/UserTwoFactorBackupCodeService.test.ts owns
|
|
89
|
+
* what `generateForUserIfNone` does inside — the count check, the writes,
|
|
90
|
+
* and the compensating delete.
|
|
91
|
+
* - Common/Tests/Server/API/UserTwoFactorBackupCodeAPI.test.ts owns the
|
|
92
|
+
* self-service generate/status routes.
|
|
37
93
|
*/
|
|
38
94
|
|
|
39
95
|
jest.mock("../../../Server/Utils/Express", () => {
|
|
@@ -69,6 +125,33 @@ const ATTACKER_ID: ObjectID = new ObjectID(
|
|
|
69
125
|
|
|
70
126
|
const OWNER_EMAIL: Email = new Email("owner@example.com");
|
|
71
127
|
|
|
128
|
+
/*
|
|
129
|
+
* What the service hands back when it mints. Fixed rather than generated so
|
|
130
|
+
* the response assertions have exact needles, and ten of them because that is
|
|
131
|
+
* the real set size — the route maps over whatever it is given, but a route
|
|
132
|
+
* that dropped or truncated the array would be invisible against a set of one.
|
|
133
|
+
*/
|
|
134
|
+
const PLAINTEXT_CODES: Array<string> = [
|
|
135
|
+
"2W9XKQ4M7B",
|
|
136
|
+
"H3TRZ5D8NC",
|
|
137
|
+
"P6JVG2YK4S",
|
|
138
|
+
"B8NQ7MXW3T",
|
|
139
|
+
"F5RD9CZH2K",
|
|
140
|
+
"T4KY6BVN8P",
|
|
141
|
+
"M2XS5GQJ7W",
|
|
142
|
+
"C9HB3NPR6D",
|
|
143
|
+
"Z7VM4TKG5X",
|
|
144
|
+
"K3PC8WYS9N",
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* The shape the page renders as-is: two groups of five joined by the hyphen
|
|
149
|
+
* that makes a ten character run transcribable off a screen. Written out as a
|
|
150
|
+
* literal rather than derived from `formatForDisplay`, so a formatter reduced
|
|
151
|
+
* to the identity function fails here instead of agreeing with itself.
|
|
152
|
+
*/
|
|
153
|
+
const DISPLAY_FORM: RegExp = /^[0-9A-Z]{5}-[0-9A-Z]{5}$/;
|
|
154
|
+
|
|
72
155
|
type CallValidateResult = {
|
|
73
156
|
thrown: unknown;
|
|
74
157
|
nextCallCount: number;
|
|
@@ -76,20 +159,32 @@ type CallValidateResult = {
|
|
|
76
159
|
|
|
77
160
|
type CallValidateFunction = (data: {
|
|
78
161
|
body: Record<string, unknown>;
|
|
162
|
+
params?: Dictionary<string> | undefined;
|
|
163
|
+
query?: Dictionary<string> | undefined;
|
|
79
164
|
signedInUserId?: ObjectID | undefined;
|
|
80
165
|
}) => Promise<CallValidateResult>;
|
|
81
166
|
|
|
82
167
|
const callValidate: CallValidateFunction = async (data: {
|
|
83
168
|
body: Record<string, unknown>;
|
|
169
|
+
params?: Dictionary<string> | undefined;
|
|
170
|
+
query?: Dictionary<string> | undefined;
|
|
84
171
|
signedInUserId?: ObjectID | undefined;
|
|
85
172
|
}): Promise<CallValidateResult> => {
|
|
86
173
|
const req: OneUptimeRequest = {
|
|
87
174
|
body: data.body,
|
|
88
|
-
params: {},
|
|
89
|
-
query: {},
|
|
175
|
+
params: data.params || {},
|
|
176
|
+
query: data.query || {},
|
|
90
177
|
headers: {},
|
|
91
178
|
userAuthorization: {
|
|
92
|
-
|
|
179
|
+
/*
|
|
180
|
+
* A DISTINCT ObjectID instance carrying the owner's value, not the
|
|
181
|
+
* `OWNER_ID` constant itself. The ownership check compares strings, so
|
|
182
|
+
* this changes nothing about which requests are allowed — but it is what
|
|
183
|
+
* lets the mint assertions tell "the id was read off the enrolment row"
|
|
184
|
+
* apart from "the id was read off the request", which are otherwise the
|
|
185
|
+
* same string and indistinguishable.
|
|
186
|
+
*/
|
|
187
|
+
userId: data.signedInUserId || new ObjectID(OWNER_ID.toString()),
|
|
93
188
|
},
|
|
94
189
|
} as unknown as OneUptimeRequest;
|
|
95
190
|
|
|
@@ -114,6 +209,31 @@ const callValidate: CallValidateFunction = async (data: {
|
|
|
114
209
|
};
|
|
115
210
|
};
|
|
116
211
|
|
|
212
|
+
type AsMockFunction = (fn: unknown) => jest.Mock;
|
|
213
|
+
|
|
214
|
+
const asMock: AsMockFunction = (fn: unknown): jest.Mock => {
|
|
215
|
+
return fn as unknown as jest.Mock;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/** The JSON body the handler answered with, or an empty object if it did not. */
|
|
219
|
+
type SentJsonObjectFunction = () => JSONObject;
|
|
220
|
+
|
|
221
|
+
const sentJsonObject: SentJsonObjectFunction = (): JSONObject => {
|
|
222
|
+
const call: Array<unknown> | undefined = asMock(
|
|
223
|
+
Response.sendJsonObjectResponse,
|
|
224
|
+
).mock.calls[0];
|
|
225
|
+
|
|
226
|
+
return (call?.[2] as JSONObject) || {};
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
type MintArgument = { userId: ObjectID; count?: number };
|
|
230
|
+
|
|
231
|
+
type FirstMintArgumentFunction = () => MintArgument;
|
|
232
|
+
|
|
233
|
+
const firstMintArgument: FirstMintArgumentFunction = (): MintArgument => {
|
|
234
|
+
return generateForUserIfNoneSpy.mock.calls[0]![0] as MintArgument;
|
|
235
|
+
};
|
|
236
|
+
|
|
117
237
|
/*
|
|
118
238
|
* A pending enrolment, built the way the service builds one: a real secret and
|
|
119
239
|
* the real otpauth:// URI derived from it.
|
|
@@ -153,13 +273,29 @@ const pendingEnrolment: PendingEnrolmentFunction = (options?: {
|
|
|
153
273
|
let findTotpById: jest.Mock;
|
|
154
274
|
let updateTotpById: jest.Mock;
|
|
155
275
|
let findUserById: jest.Mock;
|
|
276
|
+
let generateForUserIfNoneSpy: jest.SpyInstance;
|
|
277
|
+
let regenerateForUserSpy: jest.SpyInstance;
|
|
278
|
+
let loggerErrorSpy: jest.SpyInstance;
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
* Which side effect ran first. The mint must not overtake the write of
|
|
282
|
+
* `isVerified`: a set of recovery codes handed out before the factor is
|
|
283
|
+
* actually recorded is recovery material minted on the strength of a challenge
|
|
284
|
+
* whose outcome is not yet durable.
|
|
285
|
+
*/
|
|
286
|
+
let sideEffectOrder: Array<string>;
|
|
156
287
|
|
|
157
288
|
describe("POST /user-totp-auth/validate", () => {
|
|
158
289
|
beforeEach(() => {
|
|
290
|
+
jest.clearAllMocks();
|
|
291
|
+
|
|
159
292
|
mockRouter.routes.length = 0;
|
|
160
293
|
|
|
294
|
+
sideEffectOrder = [];
|
|
295
|
+
|
|
161
296
|
findTotpById = jest.fn();
|
|
162
297
|
updateTotpById = jest.fn(async () => {
|
|
298
|
+
sideEffectOrder.push("verified");
|
|
163
299
|
return undefined;
|
|
164
300
|
});
|
|
165
301
|
findUserById = jest.fn();
|
|
@@ -172,6 +308,32 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
172
308
|
|
|
173
309
|
UserService.findOneById = findUserById as never;
|
|
174
310
|
|
|
311
|
+
generateForUserIfNoneSpy = getJestSpyOn(
|
|
312
|
+
UserTwoFactorBackupCodeService,
|
|
313
|
+
"generateForUserIfNone",
|
|
314
|
+
);
|
|
315
|
+
generateForUserIfNoneSpy.mockImplementation(
|
|
316
|
+
async (): Promise<Array<string>> => {
|
|
317
|
+
sideEffectOrder.push("minted");
|
|
318
|
+
return PLAINTEXT_CODES;
|
|
319
|
+
},
|
|
320
|
+
);
|
|
321
|
+
|
|
322
|
+
/*
|
|
323
|
+
* Spied on with no test that expects it: every mint assertion below also
|
|
324
|
+
* asserts this stayed untouched, and leaving it unstubbed would let a
|
|
325
|
+
* regression reach the real service and the database behind it.
|
|
326
|
+
*/
|
|
327
|
+
regenerateForUserSpy = getJestSpyOn(
|
|
328
|
+
UserTwoFactorBackupCodeService,
|
|
329
|
+
"regenerateForUser",
|
|
330
|
+
);
|
|
331
|
+
regenerateForUserSpy.mockResolvedValue(PLAINTEXT_CODES as never);
|
|
332
|
+
|
|
333
|
+
/* Silenced as well as observed — the swallow path logs on purpose. */
|
|
334
|
+
loggerErrorSpy = getJestSpyOn(logger, "error");
|
|
335
|
+
loggerErrorSpy.mockImplementation(() => {});
|
|
336
|
+
|
|
175
337
|
const owner: User = new User();
|
|
176
338
|
owner.id = OWNER_ID;
|
|
177
339
|
owner.email = OWNER_EMAIL;
|
|
@@ -227,7 +389,15 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
227
389
|
}),
|
|
228
390
|
);
|
|
229
391
|
|
|
230
|
-
|
|
392
|
+
/*
|
|
393
|
+
* A JSON body, not the empty success this route used to answer with.
|
|
394
|
+
* The response is the ONLY copy of the minted codes — only keyed digests
|
|
395
|
+
* are stored — so a handler that went back to `sendEmptySuccessResponse`
|
|
396
|
+
* would silently destroy a set the user is now relying on and can never
|
|
397
|
+
* be shown again.
|
|
398
|
+
*/
|
|
399
|
+
expect(Response.sendJsonObjectResponse).toHaveBeenCalledTimes(1);
|
|
400
|
+
expect(Response.sendEmptySuccessResponse).not.toHaveBeenCalled();
|
|
231
401
|
});
|
|
232
402
|
|
|
233
403
|
/*
|
|
@@ -275,6 +445,327 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
275
445
|
});
|
|
276
446
|
});
|
|
277
447
|
|
|
448
|
+
/*
|
|
449
|
+
* The heart of the fix for issue #3382. Everything here is about the account
|
|
450
|
+
* coming out of enrolment with a way back in.
|
|
451
|
+
*/
|
|
452
|
+
describe("recovery codes for an account that has none", () => {
|
|
453
|
+
type VerifyEnrolmentFunction = () => Promise<{
|
|
454
|
+
enrolment: ReturnType<PendingEnrolmentFunction>;
|
|
455
|
+
result: CallValidateResult;
|
|
456
|
+
}>;
|
|
457
|
+
|
|
458
|
+
const verifyEnrolment: VerifyEnrolmentFunction = async () => {
|
|
459
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
460
|
+
pendingEnrolment();
|
|
461
|
+
|
|
462
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
463
|
+
|
|
464
|
+
const result: CallValidateResult = await callValidate({
|
|
465
|
+
body: {
|
|
466
|
+
id: TOTP_ID.toString(),
|
|
467
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
468
|
+
},
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
return { enrolment: enrolment, result: result };
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
/*
|
|
475
|
+
* The whole of the reported bug: before this call existed, a user finished
|
|
476
|
+
* enrolment holding exactly one factor and nothing to fall back on, and
|
|
477
|
+
* nothing in the product ever offered to change that.
|
|
478
|
+
*/
|
|
479
|
+
test("mints a set once the factor is verified", async () => {
|
|
480
|
+
const { result } = await verifyEnrolment();
|
|
481
|
+
|
|
482
|
+
expect(result.thrown).toBeUndefined();
|
|
483
|
+
expect(generateForUserIfNoneSpy).toHaveBeenCalledTimes(1);
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
/*
|
|
487
|
+
* `generateForUserIfNone` no-ops for a user who already has codes;
|
|
488
|
+
* `regenerateForUser` REPLACES them. Enrolling a second authenticator app
|
|
489
|
+
* is a perfectly ordinary thing to do, and doing it through the
|
|
490
|
+
* regenerating call would silently void the printed list the user has been
|
|
491
|
+
* keeping since the first one — with no error, no notification, and no
|
|
492
|
+
* sign anything happened until the codes are needed.
|
|
493
|
+
*/
|
|
494
|
+
test("never regenerates, which would void codes the user already printed", async () => {
|
|
495
|
+
await verifyEnrolment();
|
|
496
|
+
|
|
497
|
+
expect(regenerateForUserSpy).not.toHaveBeenCalled();
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
/*
|
|
501
|
+
* The owner comes off the enrolment ROW. `id` is body-supplied, so a
|
|
502
|
+
* handler that took the user id from the request as well would mint
|
|
503
|
+
* somebody's recovery codes into an account they do not own. The
|
|
504
|
+
* impersonation fields below are the channels a future edit would
|
|
505
|
+
* plausibly read from.
|
|
506
|
+
*/
|
|
507
|
+
test("mints for the owner named on the row, not for anything the request supplied", async () => {
|
|
508
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
509
|
+
pendingEnrolment();
|
|
510
|
+
|
|
511
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
512
|
+
|
|
513
|
+
await callValidate({
|
|
514
|
+
body: {
|
|
515
|
+
id: TOTP_ID.toString(),
|
|
516
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
517
|
+
userId: ATTACKER_ID.toString(),
|
|
518
|
+
_id: ATTACKER_ID.toString(),
|
|
519
|
+
},
|
|
520
|
+
params: { userId: ATTACKER_ID.toString() },
|
|
521
|
+
query: { userId: ATTACKER_ID.toString() },
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
const minted: MintArgument = firstMintArgument();
|
|
525
|
+
|
|
526
|
+
expect(minted.userId.toString()).toBe(OWNER_ID.toString());
|
|
527
|
+
expect(minted.userId.toString()).not.toBe(ATTACKER_ID.toString());
|
|
528
|
+
|
|
529
|
+
/*
|
|
530
|
+
* Identity, not just value. The request carries a DIFFERENT ObjectID
|
|
531
|
+
* instance holding the same owner id (see `callValidate`), so this is
|
|
532
|
+
* the assertion that distinguishes reading the row from reading
|
|
533
|
+
* `userAuthorization` — the two are string-equal on every request that
|
|
534
|
+
* gets this far, which is exactly what makes the difference invisible
|
|
535
|
+
* without it.
|
|
536
|
+
*/
|
|
537
|
+
expect(minted.userId).toBe(enrolment.row.userId);
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
/*
|
|
541
|
+
* The response is the one and only time these strings exist. If the route
|
|
542
|
+
* kept them to itself the user would end up with ten codes they have never
|
|
543
|
+
* seen — which reads to the profile page as "you have recovery codes" and
|
|
544
|
+
* is worse than having none, because it stops them being offered any.
|
|
545
|
+
*/
|
|
546
|
+
test("answers with the codes, hyphenated for the screen that shows them", async () => {
|
|
547
|
+
await verifyEnrolment();
|
|
548
|
+
|
|
549
|
+
const payload: JSONObject = sentJsonObject();
|
|
550
|
+
const codes: Array<string> = payload["backupCodes"] as Array<string>;
|
|
551
|
+
|
|
552
|
+
expect(codes).toHaveLength(PLAINTEXT_CODES.length);
|
|
553
|
+
|
|
554
|
+
for (const code of codes) {
|
|
555
|
+
expect(code).toMatch(DISPLAY_FORM);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/*
|
|
559
|
+
* The same codes the service minted, not a fresh set: the hyphen is
|
|
560
|
+
* cosmetic and `normalizeCode` strips it straight back out, so what the
|
|
561
|
+
* user types back in has to be what was written to the database.
|
|
562
|
+
*/
|
|
563
|
+
expect(
|
|
564
|
+
codes.map((code: string): string => {
|
|
565
|
+
return TwoFactorBackupCode.normalizeCode(code);
|
|
566
|
+
}),
|
|
567
|
+
).toEqual(PLAINTEXT_CODES);
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
/*
|
|
571
|
+
* Nothing is minted for a caller whose code was wrong. This is the whole
|
|
572
|
+
* reason the mint sits after the verification rather than beside it —
|
|
573
|
+
* otherwise anybody who could reach the route with a stranger's row id
|
|
574
|
+
* would be handed that account's recovery codes for the price of a wrong
|
|
575
|
+
* guess.
|
|
576
|
+
*/
|
|
577
|
+
test("mints nothing when the submitted code is wrong", async () => {
|
|
578
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
579
|
+
pendingEnrolment();
|
|
580
|
+
|
|
581
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
582
|
+
|
|
583
|
+
const result: CallValidateResult = await callValidate({
|
|
584
|
+
body: { id: TOTP_ID.toString(), code: "000000" },
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
expect(result.thrown).toBeInstanceOf(BadDataException);
|
|
588
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
589
|
+
expect(regenerateForUserSpy).not.toHaveBeenCalled();
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
test("mints nothing for an enrolment belonging to somebody else", async () => {
|
|
593
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> = pendingEnrolment({
|
|
594
|
+
ownerId: OWNER_ID,
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
598
|
+
|
|
599
|
+
await callValidate({
|
|
600
|
+
body: {
|
|
601
|
+
id: TOTP_ID.toString(),
|
|
602
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
603
|
+
},
|
|
604
|
+
signedInUserId: ATTACKER_ID,
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
/*
|
|
611
|
+
* Ordering, stated as an ordering rather than inferred from two separate
|
|
612
|
+
* "was called" assertions, which would pass just as happily if the mint
|
|
613
|
+
* ran first.
|
|
614
|
+
*/
|
|
615
|
+
test("mints only after isVerified has been written", async () => {
|
|
616
|
+
await verifyEnrolment();
|
|
617
|
+
|
|
618
|
+
expect(sideEffectOrder).toEqual(["verified", "minted"]);
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
/*
|
|
622
|
+
* A write that never landed is not a verified factor, so there is nothing
|
|
623
|
+
* to mint recovery codes for yet — and the user will be back to try again.
|
|
624
|
+
*/
|
|
625
|
+
test("mints nothing when the write of isVerified fails", async () => {
|
|
626
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
627
|
+
pendingEnrolment();
|
|
628
|
+
|
|
629
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
630
|
+
|
|
631
|
+
updateTotpById.mockRejectedValue(
|
|
632
|
+
new Error("could not write the row") as never,
|
|
633
|
+
);
|
|
634
|
+
|
|
635
|
+
const result: CallValidateResult = await callValidate({
|
|
636
|
+
body: {
|
|
637
|
+
id: TOTP_ID.toString(),
|
|
638
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
639
|
+
},
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
expect(result.thrown).toBeInstanceOf(Error);
|
|
643
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
644
|
+
expect(Response.sendJsonObjectResponse).not.toHaveBeenCalled();
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
describe("recovery codes for an account that already has some", () => {
|
|
649
|
+
type VerifySecondFactorFunction = () => Promise<CallValidateResult>;
|
|
650
|
+
|
|
651
|
+
const verifySecondFactor: VerifySecondFactorFunction =
|
|
652
|
+
async (): Promise<CallValidateResult> => {
|
|
653
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
654
|
+
pendingEnrolment();
|
|
655
|
+
|
|
656
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
657
|
+
|
|
658
|
+
/* What the service reports when it declined to touch anything. */
|
|
659
|
+
generateForUserIfNoneSpy.mockResolvedValue(null as never);
|
|
660
|
+
|
|
661
|
+
return callValidate({
|
|
662
|
+
body: {
|
|
663
|
+
id: TOTP_ID.toString(),
|
|
664
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
665
|
+
},
|
|
666
|
+
});
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
test("verifies the enrolment and answers successfully", async () => {
|
|
670
|
+
const result: CallValidateResult = await verifySecondFactor();
|
|
671
|
+
|
|
672
|
+
expect(result.thrown).toBeUndefined();
|
|
673
|
+
expect(updateTotpById).toHaveBeenCalled();
|
|
674
|
+
expect(Response.sendJsonObjectResponse).toHaveBeenCalledTimes(1);
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
/*
|
|
678
|
+
* An EMPTY ARRAY, never null and never an absent key. The page decides
|
|
679
|
+
* whether to raise the show-once screen by looking at this, and it reaches
|
|
680
|
+
* for `.length` to do it: a null or a missing key is a crash on a screen
|
|
681
|
+
* the user hits immediately after enrolling, and "no codes were minted" is
|
|
682
|
+
* the ordinary case here rather than an error.
|
|
683
|
+
*/
|
|
684
|
+
test("answers with an empty array rather than null or a missing key", async () => {
|
|
685
|
+
await verifySecondFactor();
|
|
686
|
+
|
|
687
|
+
const payload: JSONObject = sentJsonObject();
|
|
688
|
+
|
|
689
|
+
expect(Object.keys(payload)).toContain("backupCodes");
|
|
690
|
+
expect(payload["backupCodes"]).not.toBeNull();
|
|
691
|
+
expect(Array.isArray(payload["backupCodes"])).toBe(true);
|
|
692
|
+
expect(payload["backupCodes"]).toEqual([]);
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
test("does not fall back to regenerating a set", async () => {
|
|
696
|
+
await verifySecondFactor();
|
|
697
|
+
|
|
698
|
+
expect(regenerateForUserSpy).not.toHaveBeenCalled();
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
/*
|
|
703
|
+
* The factor IS verified by the time the mint runs — the row is written. So
|
|
704
|
+
* a failure here is a missing convenience, not a failed enrolment, and it
|
|
705
|
+
* must not be reported as one: throwing would tell the user their
|
|
706
|
+
* authenticator did not work when it did, and send them back round a loop
|
|
707
|
+
* that ends with a second live factor on the account.
|
|
708
|
+
*/
|
|
709
|
+
describe("when minting the recovery codes fails", () => {
|
|
710
|
+
const mintFailure: Error = new Error("backup code table is unavailable");
|
|
711
|
+
|
|
712
|
+
type FailingMintFunction = () => Promise<CallValidateResult>;
|
|
713
|
+
|
|
714
|
+
const withFailingMint: FailingMintFunction =
|
|
715
|
+
async (): Promise<CallValidateResult> => {
|
|
716
|
+
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
717
|
+
pendingEnrolment();
|
|
718
|
+
|
|
719
|
+
findTotpById.mockResolvedValue(enrolment.row as never);
|
|
720
|
+
|
|
721
|
+
generateForUserIfNoneSpy.mockRejectedValue(mintFailure as never);
|
|
722
|
+
|
|
723
|
+
return callValidate({
|
|
724
|
+
body: {
|
|
725
|
+
id: TOTP_ID.toString(),
|
|
726
|
+
code: enrolment.codeFromTheAuthenticatorApp(),
|
|
727
|
+
},
|
|
728
|
+
});
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
test("still answers successfully and does not surface the error", async () => {
|
|
732
|
+
const result: CallValidateResult = await withFailingMint();
|
|
733
|
+
|
|
734
|
+
expect(result.nextCallCount).toBe(0);
|
|
735
|
+
expect(result.thrown).toBeUndefined();
|
|
736
|
+
expect(Response.sendJsonObjectResponse).toHaveBeenCalledTimes(1);
|
|
737
|
+
expect(Response.sendErrorResponse).not.toHaveBeenCalled();
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
test("leaves the enrolment verified", async () => {
|
|
741
|
+
await withFailingMint();
|
|
742
|
+
|
|
743
|
+
expect(updateTotpById).toHaveBeenCalledWith(
|
|
744
|
+
expect.objectContaining({
|
|
745
|
+
id: TOTP_ID,
|
|
746
|
+
data: { isVerified: true },
|
|
747
|
+
}),
|
|
748
|
+
);
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
test("answers with an empty array so the page has something to render", async () => {
|
|
752
|
+
await withFailingMint();
|
|
753
|
+
|
|
754
|
+
expect(sentJsonObject()["backupCodes"]).toEqual([]);
|
|
755
|
+
});
|
|
756
|
+
|
|
757
|
+
/*
|
|
758
|
+
* Swallowed, but not in silence. A user who quietly ends up with no
|
|
759
|
+
* recovery codes is precisely the state issue #3382 was reported for, and
|
|
760
|
+
* with nothing in the log there is no way to find out it is happening.
|
|
761
|
+
*/
|
|
762
|
+
test("logs what went wrong", async () => {
|
|
763
|
+
await withFailingMint();
|
|
764
|
+
|
|
765
|
+
expect(loggerErrorSpy).toHaveBeenCalledWith(mintFailure);
|
|
766
|
+
});
|
|
767
|
+
});
|
|
768
|
+
|
|
278
769
|
describe("when the code is wrong", () => {
|
|
279
770
|
test("fails with Invalid code and leaves the enrolment unverified", async () => {
|
|
280
771
|
const enrolment: ReturnType<PendingEnrolmentFunction> =
|
|
@@ -309,6 +800,7 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
309
800
|
|
|
310
801
|
expect(result.thrown).toBeInstanceOf(BadDataException);
|
|
311
802
|
expect(updateTotpById).not.toHaveBeenCalled();
|
|
803
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
312
804
|
},
|
|
313
805
|
);
|
|
314
806
|
|
|
@@ -390,6 +882,7 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
390
882
|
|
|
391
883
|
expect(result.thrown).toBeInstanceOf(BadDataException);
|
|
392
884
|
expect(updateTotpById).not.toHaveBeenCalled();
|
|
885
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
393
886
|
});
|
|
394
887
|
|
|
395
888
|
test("fails when the owning user has no email to label the entry with", async () => {
|
|
@@ -411,6 +904,7 @@ describe("POST /user-totp-auth/validate", () => {
|
|
|
411
904
|
|
|
412
905
|
expect(result.thrown).toBeInstanceOf(BadDataException);
|
|
413
906
|
expect(updateTotpById).not.toHaveBeenCalled();
|
|
907
|
+
expect(generateForUserIfNoneSpy).not.toHaveBeenCalled();
|
|
414
908
|
});
|
|
415
909
|
|
|
416
910
|
test("surfaces the failure through next() rather than crashing the request", async () => {
|