@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
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NetworkDeviceDiscoveryScan.isSnmpEnabled column contract (issue #3445).
|
|
3
|
+
*
|
|
4
|
+
* Before this column, a discovery scan WAS an SNMP scan: the ping sweep was
|
|
5
|
+
* only the cheap gate in front of an SNMP GET, and the wizard made SNMP Version
|
|
6
|
+
* a required field on its own step — so "I just want to know what is alive in
|
|
7
|
+
* 10.20.30.0/24" could not be expressed at all. This column is that missing
|
|
8
|
+
* sentence, and everything below pins a property that, quietly changed, either
|
|
9
|
+
* refuses a write the wizard is about to make or silently changes what an
|
|
10
|
+
* existing scan claims to have done.
|
|
11
|
+
*
|
|
12
|
+
* Three properties matter more than the rest:
|
|
13
|
+
*
|
|
14
|
+
* - NOT REQUIRED, and a default-value column. The API must accept a create
|
|
15
|
+
* that omits it — every existing integration does, and the whole point of
|
|
16
|
+
* the issue is that a scan should not be blocked by a field the operator
|
|
17
|
+
* has no opinion about.
|
|
18
|
+
* - DEFAULT TRUE, in all three places that word means something. Every scan
|
|
19
|
+
* that existed before this column did was an SNMP scan, so true is the only
|
|
20
|
+
* value that leaves those rows describing the sweep they actually ran.
|
|
21
|
+
* - ACCESS CONTROL IDENTICAL TO `cidr`. This column defines the sweep exactly
|
|
22
|
+
* as the target does — the target says WHERE, this says WITH WHAT — so
|
|
23
|
+
* whoever may set one must be whoever may set the other. What is pinned
|
|
24
|
+
* below is that EQUALITY and nothing stronger. Today both carry
|
|
25
|
+
* `update: []`, so a finished scan's method is as un-rewritable as its
|
|
26
|
+
* target; a change that made the sweep-defining columns updatable as a
|
|
27
|
+
* group is meant to leave this suite green, and the failure worth catching
|
|
28
|
+
* is one of the two drifting away from the other.
|
|
29
|
+
*
|
|
30
|
+
* The three "default" mechanisms are separate and easy to confuse:
|
|
31
|
+
* - NEW rows get true from the Postgres column default (@Column default)
|
|
32
|
+
* - EXISTING rows got true from the migration's NOT NULL DEFAULT true
|
|
33
|
+
* - @TableColumn defaultValue is documentation for the generated API schema
|
|
34
|
+
* and the form metadata; it defaults nothing at runtime
|
|
35
|
+
* All three are pinned, because asserting only one is a guard that catches
|
|
36
|
+
* nothing: flipping @Column to default: false leaves the other two green while
|
|
37
|
+
* every new scan silently stops doing SNMP.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
import NetworkDeviceDiscoveryScan from "../../Models/DatabaseModels/NetworkDeviceDiscoveryScan";
|
|
41
|
+
import ScanModeUtil from "../../Utils/NetworkDiscovery/ScanModeUtil";
|
|
42
|
+
import { ColumnAccessControl } from "../../Types/BaseDatabase/AccessControl";
|
|
43
|
+
import { TableColumnMetadata } from "../../Types/Database/TableColumn";
|
|
44
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
45
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
46
|
+
import Columns from "../../Types/Database/Columns";
|
|
47
|
+
import { AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000 } from "../../Server/Infrastructure/Postgres/SchemaMigrations/1790003445000-AddSnmpEnabledToNetworkDeviceDiscoveryScan";
|
|
48
|
+
import SchemaMigrations from "../../Server/Infrastructure/Postgres/SchemaMigrations/Index";
|
|
49
|
+
import { describe, expect, test } from "@jest/globals";
|
|
50
|
+
import {
|
|
51
|
+
MigrationInterface,
|
|
52
|
+
QueryRunner,
|
|
53
|
+
getMetadataArgsStorage,
|
|
54
|
+
} from "typeorm";
|
|
55
|
+
import { ColumnMetadataArgs } from "typeorm/metadata-args/ColumnMetadataArgs";
|
|
56
|
+
import fs from "fs";
|
|
57
|
+
import path from "path";
|
|
58
|
+
|
|
59
|
+
const COLUMN: string = "isSnmpEnabled";
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
* The column this one is measured against. `cidr` is the other half of "what
|
|
63
|
+
* this sweep is": the target says WHERE, this column says WITH WHAT. Comparing
|
|
64
|
+
* against it rather than against a hard-coded permission list is deliberate —
|
|
65
|
+
* the two must be revised together or not at all, and a list written out here
|
|
66
|
+
* would have to be re-edited by whoever revises them (there is already a change
|
|
67
|
+
* in flight that grants `update` to the sweep columns as a group).
|
|
68
|
+
*/
|
|
69
|
+
const SWEEP_DEFINING_COLUMN: string = "cidr";
|
|
70
|
+
|
|
71
|
+
const MIGRATIONS_DIR: string = path.join(
|
|
72
|
+
__dirname,
|
|
73
|
+
"..",
|
|
74
|
+
"..",
|
|
75
|
+
"Server",
|
|
76
|
+
"Infrastructure",
|
|
77
|
+
"Postgres",
|
|
78
|
+
"SchemaMigrations",
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
* Read off the class rather than written out again: the whole point of the
|
|
83
|
+
* name assertions below is that the class name, the `public name` literal
|
|
84
|
+
* TypeORM records the migration under, and the file it lives in have not
|
|
85
|
+
* drifted apart. A constant re-derived from a hard-coded timestamp would make
|
|
86
|
+
* those assertions statements about string concatenation.
|
|
87
|
+
*/
|
|
88
|
+
const MIGRATION_CLASS: string =
|
|
89
|
+
AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000.name;
|
|
90
|
+
|
|
91
|
+
const MIGRATION_TIMESTAMP: number = Number(
|
|
92
|
+
MIGRATION_CLASS.match(/(\d{13})$/)?.[1],
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
/*
|
|
96
|
+
* The nine columns the toggle governs, and the same list the server's create
|
|
97
|
+
* hook nulls out for an ICMP-only scan
|
|
98
|
+
* (NetworkDeviceDiscoveryScanService.SNMP_CONFIG_COLUMNS).
|
|
99
|
+
*/
|
|
100
|
+
const SNMP_CONFIG_COLUMNS: Array<string> = [
|
|
101
|
+
"snmpVersion",
|
|
102
|
+
"snmpCommunityString",
|
|
103
|
+
"snmpPort",
|
|
104
|
+
"snmpV3SecurityLevel",
|
|
105
|
+
"snmpV3Username",
|
|
106
|
+
"snmpV3AuthProtocol",
|
|
107
|
+
"snmpV3AuthKey",
|
|
108
|
+
"snmpV3PrivProtocol",
|
|
109
|
+
"snmpV3PrivKey",
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
const ADD_COLUMN_SQL: string = `ALTER TABLE "NetworkDeviceDiscoveryScan" ADD "${COLUMN}" boolean NOT NULL DEFAULT true`;
|
|
113
|
+
|
|
114
|
+
const DROP_COLUMN_SQL: string = `ALTER TABLE "NetworkDeviceDiscoveryScan" DROP COLUMN "${COLUMN}"`;
|
|
115
|
+
|
|
116
|
+
function metadata(): TableColumnMetadata {
|
|
117
|
+
return new NetworkDeviceDiscoveryScan().getTableColumnMetadata(COLUMN);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function typeOrmColumn(): ColumnMetadataArgs | undefined {
|
|
121
|
+
return getMetadataArgsStorage().columns.find((column: ColumnMetadataArgs) => {
|
|
122
|
+
return (
|
|
123
|
+
column.target === NetworkDeviceDiscoveryScan &&
|
|
124
|
+
column.propertyName === COLUMN
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/*
|
|
130
|
+
* The migration is EXECUTED against this, not read as text. A file read as one
|
|
131
|
+
* blob cannot tell up() from down(): a migration whose up() DROPPED the column
|
|
132
|
+
* and whose down() ADDED it contains both statements, and satisfies every
|
|
133
|
+
* `toContain` anyone would write against the blob. Same shape as
|
|
134
|
+
* Tests/Server/Services/AddNetworkDeviceReachabilityColumnsMigration.test.ts.
|
|
135
|
+
*/
|
|
136
|
+
type MakeQueryRunnerResult = {
|
|
137
|
+
runner: QueryRunner;
|
|
138
|
+
statements: Array<string>;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
type MakeQueryRunnerFunction = () => MakeQueryRunnerResult;
|
|
142
|
+
|
|
143
|
+
const makeQueryRunner: MakeQueryRunnerFunction = (): MakeQueryRunnerResult => {
|
|
144
|
+
const statements: Array<string> = [];
|
|
145
|
+
|
|
146
|
+
const query: (...args: Array<unknown>) => Promise<undefined> = (
|
|
147
|
+
...args: Array<unknown>
|
|
148
|
+
): Promise<undefined> => {
|
|
149
|
+
statements.push(String(args[0]));
|
|
150
|
+
return Promise.resolve(undefined);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
runner: { query } as unknown as QueryRunner,
|
|
155
|
+
statements,
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
describe("NetworkDeviceDiscoveryScan.isSnmpEnabled", () => {
|
|
160
|
+
test("exists as a boolean column", () => {
|
|
161
|
+
expect(metadata()).toBeDefined();
|
|
162
|
+
expect(metadata().type).toBe(TableColumnType.Boolean);
|
|
163
|
+
expect(typeOrmColumn()).toBeDefined();
|
|
164
|
+
expect(typeOrmColumn()?.options.type).toBe(ColumnType.Boolean);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
* The title is the label on the wizard's toggle and the heading in the
|
|
169
|
+
* generated API docs. It says "Check SNMP" rather than naming the column,
|
|
170
|
+
* because the operator's question is "do I want SNMP checked?" and not "is
|
|
171
|
+
* SNMP enabled on this record?".
|
|
172
|
+
*/
|
|
173
|
+
test("is titled the way the wizard labels the toggle", () => {
|
|
174
|
+
expect(metadata().title).toBe("Check SNMP");
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
/*
|
|
178
|
+
* The API documentation is the only explanation an integrator gets. It has
|
|
179
|
+
* to say that the ping sweep happens either way — turning this off narrows
|
|
180
|
+
* what is discovered ABOUT each host, not which hosts are found.
|
|
181
|
+
*/
|
|
182
|
+
test("its description explains that the ping sweep happens either way", () => {
|
|
183
|
+
const description: string = metadata().description ?? "";
|
|
184
|
+
|
|
185
|
+
expect(description).toContain("ping");
|
|
186
|
+
expect(description).toContain("SNMP");
|
|
187
|
+
expect(description).toContain("ICMP-only");
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
/*
|
|
191
|
+
* THE assertion of the issue. A required column makes the API reject a
|
|
192
|
+
* create that omits it, which is the server-side twin of the wizard refusing
|
|
193
|
+
* to advance past "SNMP Version is required" — and every integration that
|
|
194
|
+
* creates scans today omits it.
|
|
195
|
+
*/
|
|
196
|
+
test("is not required, so a create that omits it is still accepted", () => {
|
|
197
|
+
expect(metadata().required).toBeFalsy();
|
|
198
|
+
|
|
199
|
+
const requiredColumns: Columns =
|
|
200
|
+
new NetworkDeviceDiscoveryScan().getRequiredColumns();
|
|
201
|
+
|
|
202
|
+
expect(requiredColumns.columns).not.toContain(COLUMN);
|
|
203
|
+
// ...and the check is not vacuous: the target genuinely is required.
|
|
204
|
+
expect(requiredColumns.columns).toContain(SWEEP_DEFINING_COLUMN);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/*
|
|
208
|
+
* isDefaultValueColumn is what tells DatabaseService the value comes from
|
|
209
|
+
* the column default when the payload has none. Without it, a NOT NULL
|
|
210
|
+
* column that nobody sent is an INSERT that fails.
|
|
211
|
+
*/
|
|
212
|
+
test("is a default-value column, so the database fills it in", () => {
|
|
213
|
+
expect(new NetworkDeviceDiscoveryScan().isDefaultValueColumn(COLUMN)).toBe(
|
|
214
|
+
true,
|
|
215
|
+
);
|
|
216
|
+
/*
|
|
217
|
+
* Contrast, so the accessor is proven to discriminate: the target has no
|
|
218
|
+
* default and never could have one.
|
|
219
|
+
*/
|
|
220
|
+
expect(
|
|
221
|
+
new NetworkDeviceDiscoveryScan().isDefaultValueColumn(
|
|
222
|
+
SWEEP_DEFINING_COLUMN,
|
|
223
|
+
),
|
|
224
|
+
).toBe(false);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
/*
|
|
228
|
+
* Mechanism 3 of 3: documentation only. This is the value the generated API
|
|
229
|
+
* schema advertises and the value the form metadata seeds the toggle with,
|
|
230
|
+
* and it has to say the same thing the other two mechanisms do or the docs
|
|
231
|
+
* describe a product that does not exist.
|
|
232
|
+
*/
|
|
233
|
+
test("advertises true as its default in the API schema and form metadata", () => {
|
|
234
|
+
expect(metadata().defaultValue).toBe(true);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
* Mechanism 1 of 3: what a NEW row gets. `default: true` is the single word
|
|
239
|
+
* that decides whether a scan created by an older API client — one that
|
|
240
|
+
* knows nothing about this column — does SNMP or does not.
|
|
241
|
+
*/
|
|
242
|
+
test("a scan created without saying gets an SNMP scan from the column default", () => {
|
|
243
|
+
expect(typeOrmColumn()?.options.default).toBe(true);
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
* NOT NULL is what makes the flag a genuine tri-state-free answer. If the
|
|
248
|
+
* column could be null, "null" would become a third state that every reader
|
|
249
|
+
* would have to decide about separately — which is exactly the ambiguity
|
|
250
|
+
* ScanModeUtil's `!== false` exists to collapse, and no reason to introduce
|
|
251
|
+
* a second source of it inside the database.
|
|
252
|
+
*/
|
|
253
|
+
test("is not nullable, so a stored scan always states its method", () => {
|
|
254
|
+
expect(typeOrmColumn()?.options.nullable).toBe(false);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
test("is readable from a relation query, like the target beside it", () => {
|
|
258
|
+
expect(metadata().canReadOnRelationQuery).toBe(true);
|
|
259
|
+
expect(
|
|
260
|
+
new NetworkDeviceDiscoveryScan().getTableColumnMetadata(
|
|
261
|
+
SWEEP_DEFINING_COLUMN,
|
|
262
|
+
).canReadOnRelationQuery,
|
|
263
|
+
).toBe(true);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* What this change did to the SNMP fields, and what it did not.
|
|
268
|
+
*
|
|
269
|
+
* DID: every one of the nine now says, in the description an integrator
|
|
270
|
+
* reads, that it is ignored when the toggle is off. That sentence is the
|
|
271
|
+
* only thing in the generated schema that explains why an snmpVersion sent
|
|
272
|
+
* alongside `isSnmpEnabled: false` comes back null — the server's create
|
|
273
|
+
* hook clears the SNMP config for an ICMP-only scan, and nothing else
|
|
274
|
+
* documents it.
|
|
275
|
+
*
|
|
276
|
+
* DID NOT: make snmpVersion optional. It was already `required: false`
|
|
277
|
+
* before this column existed — the wall in issue #3445 was the wizard's own
|
|
278
|
+
* field config, not the model. It is asserted here anyway because the
|
|
279
|
+
* feature now leans on it: an ICMP-only scan stores no version at all, so a
|
|
280
|
+
* later change that made the column required would make ICMP-only scans
|
|
281
|
+
* unwritable through the API while the wizard went on offering them.
|
|
282
|
+
*/
|
|
283
|
+
test("the SNMP fields say they are ignored when the toggle is off, and stay optional", () => {
|
|
284
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
285
|
+
|
|
286
|
+
const undocumented: Array<string> = SNMP_CONFIG_COLUMNS.filter(
|
|
287
|
+
(column: string): boolean => {
|
|
288
|
+
return !(
|
|
289
|
+
scan.getTableColumnMetadata(column).description ?? ""
|
|
290
|
+
).includes("Ignored when Check SNMP is off.");
|
|
291
|
+
},
|
|
292
|
+
);
|
|
293
|
+
|
|
294
|
+
expect(undocumented).toEqual([]);
|
|
295
|
+
|
|
296
|
+
expect(scan.getTableColumnMetadata("snmpVersion").required).toBeFalsy();
|
|
297
|
+
expect(scan.getRequiredColumns().columns).not.toContain("snmpVersion");
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
/*
|
|
302
|
+
* The column is written by the model and read by ScanModeUtil, and the two are
|
|
303
|
+
* only correct together: the reader's "absent means SNMP" rule is only safe
|
|
304
|
+
* BECAUSE the column defaults to true, and the column's default is only
|
|
305
|
+
* meaningful BECAUSE the reader agrees with it.
|
|
306
|
+
*/
|
|
307
|
+
describe("NetworkDeviceDiscoveryScan.isSnmpEnabled as ScanModeUtil reads it", () => {
|
|
308
|
+
/*
|
|
309
|
+
* The server's create hook is handed the model instance, whose property is
|
|
310
|
+
* `undefined` until something sets it. That instance must read as an SNMP
|
|
311
|
+
* scan, or the hook would null out the SNMP credentials of every scan
|
|
312
|
+
* created through a path that does not set the toggle.
|
|
313
|
+
*/
|
|
314
|
+
test("a freshly constructed scan reads as an SNMP scan", () => {
|
|
315
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
316
|
+
|
|
317
|
+
expect(scan.isSnmpEnabled).toBeUndefined();
|
|
318
|
+
expect(ScanModeUtil.isSnmpEnabled(scan)).toBe(true);
|
|
319
|
+
expect(ScanModeUtil.isIcmpOnly(scan)).toBe(false);
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
test("a scan with the toggle off reads as ICMP only", () => {
|
|
323
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
324
|
+
scan.isSnmpEnabled = false;
|
|
325
|
+
|
|
326
|
+
expect(ScanModeUtil.isSnmpEnabled(scan)).toBe(false);
|
|
327
|
+
expect(ScanModeUtil.isIcmpOnly(scan)).toBe(true);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
test("a scan with the toggle on reads as an SNMP scan", () => {
|
|
331
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
332
|
+
scan.isSnmpEnabled = true;
|
|
333
|
+
|
|
334
|
+
expect(ScanModeUtil.isSnmpEnabled(scan)).toBe(true);
|
|
335
|
+
expect(ScanModeUtil.isIcmpOnly(scan)).toBe(false);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
/*
|
|
339
|
+
* The column's declared default and the reader's treatment of absence have
|
|
340
|
+
* to be the same answer. If someone ever flips the column default to false,
|
|
341
|
+
* this fails and says so, rather than leaving a database that defaults one
|
|
342
|
+
* way and a reader that assumes the other.
|
|
343
|
+
*/
|
|
344
|
+
test("the column default and the reader's reading of absence agree", () => {
|
|
345
|
+
expect(typeOrmColumn()?.options.default).toBe(
|
|
346
|
+
ScanModeUtil.isSnmpEnabled({}),
|
|
347
|
+
);
|
|
348
|
+
expect(metadata().defaultValue).toBe(ScanModeUtil.isSnmpEnabled({}));
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
describe("NetworkDeviceDiscoveryScan.isSnmpEnabled access control", () => {
|
|
353
|
+
function accessControlFor(column: string): ColumnAccessControl | null {
|
|
354
|
+
return new NetworkDeviceDiscoveryScan().getColumnAccessControlFor(column);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/*
|
|
358
|
+
* The whole claim, in one assertion: this column is governed exactly as the
|
|
359
|
+
* scan target is. Written as a comparison rather than a permission list on
|
|
360
|
+
* purpose — the two columns describe the same thing (what sweep is this?) and
|
|
361
|
+
* must be revised together, so a change that grants `update` to the sweep
|
|
362
|
+
* columns as a group keeps this green without anyone editing this file,
|
|
363
|
+
* while a change that grants it to only one of the two fails here, which is
|
|
364
|
+
* the case worth catching.
|
|
365
|
+
*/
|
|
366
|
+
test("is governed exactly as the scan target is", () => {
|
|
367
|
+
expect(accessControlFor(COLUMN)).toEqual(
|
|
368
|
+
accessControlFor(SWEEP_DEFINING_COLUMN),
|
|
369
|
+
);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
/*
|
|
373
|
+
* Broken out per operation so a failure says WHICH of the three drifted -
|
|
374
|
+
* `toEqual` on the whole object reports a diff that is harder to read when
|
|
375
|
+
* one long permission list is involved.
|
|
376
|
+
*/
|
|
377
|
+
test("grants the same create, read and update permissions as the target", () => {
|
|
378
|
+
const column: ColumnAccessControl | null = accessControlFor(COLUMN);
|
|
379
|
+
const target: ColumnAccessControl | null = accessControlFor(
|
|
380
|
+
SWEEP_DEFINING_COLUMN,
|
|
381
|
+
);
|
|
382
|
+
|
|
383
|
+
expect(column?.create).toEqual(target?.create);
|
|
384
|
+
expect(column?.read).toEqual(target?.read);
|
|
385
|
+
expect(column?.update).toEqual(target?.update);
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
/*
|
|
389
|
+
* ...and the comparison above is not two empty objects agreeing with each
|
|
390
|
+
* other. A column with no create permission at all is silently dropped from
|
|
391
|
+
* every write, which would leave the toggle in the wizard doing nothing.
|
|
392
|
+
*/
|
|
393
|
+
test("actually grants somebody the right to set it", () => {
|
|
394
|
+
const column: ColumnAccessControl | null = accessControlFor(COLUMN);
|
|
395
|
+
|
|
396
|
+
expect(column).not.toBeNull();
|
|
397
|
+
expect(column?.create?.length).toBeGreaterThan(0);
|
|
398
|
+
expect(column?.read?.length).toBeGreaterThan(0);
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
/*
|
|
402
|
+
* Everyone who may create a scan may state its method, and everyone who may
|
|
403
|
+
* read a scan may see it. Anything narrower would produce a scan whose
|
|
404
|
+
* method the creator could not choose, or a results dialog that cannot tell
|
|
405
|
+
* which kind of scan it is rendering.
|
|
406
|
+
*/
|
|
407
|
+
test("its setters are creators of the table and its readers are readers of it", () => {
|
|
408
|
+
const scan: NetworkDeviceDiscoveryScan = new NetworkDeviceDiscoveryScan();
|
|
409
|
+
const column: ColumnAccessControl | null = accessControlFor(COLUMN);
|
|
410
|
+
|
|
411
|
+
expect(column?.create).toEqual(scan.getCreatePermissions());
|
|
412
|
+
expect(column?.read).toEqual(scan.getReadPermissions());
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
describe("NetworkDeviceDiscoveryScan.isSnmpEnabled migration", () => {
|
|
417
|
+
/*
|
|
418
|
+
* NOT NULL DEFAULT true is the only correct backfill, and the reason is
|
|
419
|
+
* historical rather than stylistic:
|
|
420
|
+
*
|
|
421
|
+
* - Every scan already on disk ran a ping sweep followed by an SNMP GET,
|
|
422
|
+
* because that is the only sweep the product could do. Backfilling false
|
|
423
|
+
* would rewrite history: those rows would claim to be ICMP-only sweeps,
|
|
424
|
+
* the results dialog would stop offering SNMP import for the devices they
|
|
425
|
+
* found, and a recurring scan would silently switch method on its next
|
|
426
|
+
* run.
|
|
427
|
+
* - NULL is not available either. The column is read by four layers, and a
|
|
428
|
+
* third state would have to be decided about in each of them.
|
|
429
|
+
* - Postgres fills the DEFAULT in for existing rows as part of the ADD
|
|
430
|
+
* COLUMN, so no separate UPDATE pass is needed - which also means no
|
|
431
|
+
* table rewrite to plan around on a large deployment.
|
|
432
|
+
*
|
|
433
|
+
* `toEqual` on the whole statement list rather than `toContain` on any one
|
|
434
|
+
* of them, because "nothing else" is half the claim: no UPDATE pass, no
|
|
435
|
+
* second table quietly altered, no index built on the way past.
|
|
436
|
+
*/
|
|
437
|
+
test("up() adds the column as NOT NULL DEFAULT true, and does nothing else", async () => {
|
|
438
|
+
const { runner, statements } = makeQueryRunner();
|
|
439
|
+
|
|
440
|
+
await new AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000().up(
|
|
441
|
+
runner,
|
|
442
|
+
);
|
|
443
|
+
|
|
444
|
+
expect(statements).toEqual([ADD_COLUMN_SQL]);
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
/*
|
|
448
|
+
* The direction matters as much as the SQL. Asserted through an actual call
|
|
449
|
+
* to down(), so a migration that added the column in down() and dropped it
|
|
450
|
+
* in up() - which would drop the column out of every deployed database on
|
|
451
|
+
* the next boot - fails here rather than passing a text search that finds
|
|
452
|
+
* both statements somewhere in the file.
|
|
453
|
+
*/
|
|
454
|
+
test("down() drops exactly the column up() added, and nothing else", async () => {
|
|
455
|
+
const { runner, statements } = makeQueryRunner();
|
|
456
|
+
|
|
457
|
+
await new AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000().down(
|
|
458
|
+
runner,
|
|
459
|
+
);
|
|
460
|
+
|
|
461
|
+
expect(statements).toEqual([DROP_COLUMN_SQL]);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
/*
|
|
465
|
+
* TypeORM calls `up` and `down` by name. A rename to anything else - a
|
|
466
|
+
* refactor that made `up` an `upgrade`, a helper method left on the class -
|
|
467
|
+
* leaves a migration the runner will not run, which is the same outcome as
|
|
468
|
+
* not writing it. The prototype listing is what catches the rename at
|
|
469
|
+
* runtime; the `MigrationInterface` annotation is what catches it at compile
|
|
470
|
+
* time.
|
|
471
|
+
*/
|
|
472
|
+
test("is a MigrationInterface whose two steps are still named up and down", () => {
|
|
473
|
+
const migration: MigrationInterface =
|
|
474
|
+
new AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000();
|
|
475
|
+
|
|
476
|
+
expect(typeof migration.up).toBe("function");
|
|
477
|
+
expect(typeof migration.down).toBe("function");
|
|
478
|
+
expect(
|
|
479
|
+
Object.getOwnPropertyNames(
|
|
480
|
+
AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000.prototype,
|
|
481
|
+
).sort(),
|
|
482
|
+
).toEqual(["constructor", "down", "up"]);
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
/*
|
|
486
|
+
* TypeORM records a migration under its `public name` property, not its
|
|
487
|
+
* class name, and nothing else in the suite compares the two. A rename that
|
|
488
|
+
* updates the class and forgets the literal leaves the deployed identity on
|
|
489
|
+
* the old value, and the migration re-runs (or refuses to) on the next boot.
|
|
490
|
+
*
|
|
491
|
+
* The file half is read off the directory rather than from a path built out
|
|
492
|
+
* of the same string, so it also catches the collision this repo has had
|
|
493
|
+
* before: two branches picking one timestamp, and one of the two migrations
|
|
494
|
+
* silently never running.
|
|
495
|
+
*/
|
|
496
|
+
test("records itself under its class name, in the one file that carries its timestamp", () => {
|
|
497
|
+
const migration: MigrationInterface =
|
|
498
|
+
new AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000();
|
|
499
|
+
|
|
500
|
+
expect(migration.name).toBe(MIGRATION_CLASS);
|
|
501
|
+
expect(MIGRATION_TIMESTAMP).not.toBeNaN();
|
|
502
|
+
|
|
503
|
+
const filesForOurTimestamp: Array<string> = fs
|
|
504
|
+
.readdirSync(MIGRATIONS_DIR)
|
|
505
|
+
.filter((fileName: string): boolean => {
|
|
506
|
+
return fileName.startsWith(`${MIGRATION_TIMESTAMP}-`);
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
expect(filesForOurTimestamp).toEqual([
|
|
510
|
+
`${MIGRATION_TIMESTAMP}-AddSnmpEnabledToNetworkDeviceDiscoveryScan.ts`,
|
|
511
|
+
]);
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
/*
|
|
515
|
+
* An unregistered migration never runs, so the column would be missing while
|
|
516
|
+
* every query written against the model assumes it is there. Checked against
|
|
517
|
+
* the imported array - the thing that actually runs on boot - rather than
|
|
518
|
+
* against the text of Index.ts.
|
|
519
|
+
*/
|
|
520
|
+
test("is registered, so the column actually exists at runtime", () => {
|
|
521
|
+
expect(SchemaMigrations).toContain(
|
|
522
|
+
AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000,
|
|
523
|
+
);
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
* Migrations run in array order, and one landing BELOW a migration that has
|
|
528
|
+
* already run applies out of order - which is how a schema that passes drift
|
|
529
|
+
* locally still diverges between deployments.
|
|
530
|
+
*
|
|
531
|
+
* Only the durable half is asserted: nothing registered BEFORE this one
|
|
532
|
+
* carries a later timestamp. "It is the newest" belongs to whichever
|
|
533
|
+
* migration is currently newest and cannot live here, because it fails by
|
|
534
|
+
* design the moment any unrelated PR appends a migration - which is exactly
|
|
535
|
+
* why the hand-carried ordering guards were retired in favour of the generic
|
|
536
|
+
* one in Tests/Server/Infrastructure/Postgres/SchemaMigrationsOrdering.test.ts
|
|
537
|
+
* ("gives the last-registered migration the highest timestamp").
|
|
538
|
+
*/
|
|
539
|
+
test("its timestamp sorts after every migration registered before it", () => {
|
|
540
|
+
const position: number = SchemaMigrations.indexOf(
|
|
541
|
+
AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000,
|
|
542
|
+
);
|
|
543
|
+
|
|
544
|
+
expect(position).toBeGreaterThan(-1);
|
|
545
|
+
|
|
546
|
+
const earlierTimestamps: Array<number> = [];
|
|
547
|
+
|
|
548
|
+
for (const migrationClass of SchemaMigrations.slice(0, position)) {
|
|
549
|
+
const match: RegExpMatchArray | null = (
|
|
550
|
+
migrationClass as { name: string }
|
|
551
|
+
).name.match(/(\d{13})$/);
|
|
552
|
+
|
|
553
|
+
if (match) {
|
|
554
|
+
earlierTimestamps.push(Number(match[1]));
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/*
|
|
559
|
+
* Math.max() of an empty list is -Infinity, which every timestamp beats.
|
|
560
|
+
* Prove the list was actually enumerated before leaning on its maximum,
|
|
561
|
+
* or the assertion below says nothing. (InitialMigration carries no
|
|
562
|
+
* timestamp, hence "greater than", not "equal to", the slice length.)
|
|
563
|
+
*/
|
|
564
|
+
expect(earlierTimestamps.length).toBeGreaterThan(100);
|
|
565
|
+
|
|
566
|
+
expect(MIGRATION_TIMESTAMP).toBeGreaterThan(Math.max(...earlierTimestamps));
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
/*
|
|
570
|
+
* The migration and the model have to describe the same column. Two files,
|
|
571
|
+
* one schema: the migration is what the deployed database gets, the model is
|
|
572
|
+
* what every query assumes it got. Read off the SQL up() actually ran, so
|
|
573
|
+
* the comparison is against the statement that reaches Postgres.
|
|
574
|
+
*/
|
|
575
|
+
test("the SQL it runs says the same thing about the column that the model does", async () => {
|
|
576
|
+
const { runner, statements } = makeQueryRunner();
|
|
577
|
+
|
|
578
|
+
await new AddSnmpEnabledToNetworkDeviceDiscoveryScan1790003445000().up(
|
|
579
|
+
runner,
|
|
580
|
+
);
|
|
581
|
+
|
|
582
|
+
const addColumn: string = statements[0] ?? "";
|
|
583
|
+
|
|
584
|
+
expect(addColumn).toContain(`ADD "${COLUMN}" boolean`);
|
|
585
|
+
expect(typeOrmColumn()?.options.type).toBe(ColumnType.Boolean);
|
|
586
|
+
|
|
587
|
+
expect(addColumn).toContain("NOT NULL");
|
|
588
|
+
expect(typeOrmColumn()?.options.nullable).toBe(false);
|
|
589
|
+
|
|
590
|
+
expect(addColumn).toContain("DEFAULT true");
|
|
591
|
+
expect(typeOrmColumn()?.options.default).toBe(true);
|
|
592
|
+
});
|
|
593
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { describe, expect, test } from "@jest/globals";
|
|
2
|
+
import NetworkDevice from "../../Models/DatabaseModels/NetworkDevice";
|
|
3
|
+
import Permission from "../../Types/Permission";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* What a caller must supply to create a NetworkDevice — and, just as
|
|
7
|
+
* importantly, what it must NOT be asked for.
|
|
8
|
+
*
|
|
9
|
+
* `DatabaseService.checkRequiredFields` runs before any permission branch and
|
|
10
|
+
* before the row reaches Postgres, and it rejects a create unless every
|
|
11
|
+
* required column either has a value or is marked `isDefaultValueColumn`. A
|
|
12
|
+
* column that is `required: true`, has no default flag, and carries an empty
|
|
13
|
+
* `create` access-control list is therefore UNSATISFIABLE: nobody is allowed
|
|
14
|
+
* to set it and the check will not let it through unset. Every create path
|
|
15
|
+
* fails — the dashboard form, the CRUD API, the discovery auto-import, seeding
|
|
16
|
+
* — with a message that reads like a validation error rather than the
|
|
17
|
+
* contradiction it is.
|
|
18
|
+
*
|
|
19
|
+
* `nextPollAt` became `required: true` when the polling claim's index needed a
|
|
20
|
+
* NOT NULL column to order by. Nothing else about that change is visible from
|
|
21
|
+
* the create path, which is exactly why it is pinned here.
|
|
22
|
+
*/
|
|
23
|
+
describe("creating a NetworkDevice", () => {
|
|
24
|
+
const device: NetworkDevice = new NetworkDevice();
|
|
25
|
+
|
|
26
|
+
/** Required columns the caller is actually expected to provide. */
|
|
27
|
+
function callerSuppliedRequiredColumns(): Array<string> {
|
|
28
|
+
return device.getRequiredColumns().columns.filter((column: string) => {
|
|
29
|
+
return !device.isDefaultValueColumn(column);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* The identity of a device, and nothing else. Adding to this list is a
|
|
35
|
+
* breaking API change and should be a deliberate edit to this test.
|
|
36
|
+
*/
|
|
37
|
+
test("asks the caller for exactly the four columns that identify a device", () => {
|
|
38
|
+
expect(callerSuppliedRequiredColumns().sort()).toEqual([
|
|
39
|
+
"hostname",
|
|
40
|
+
"name",
|
|
41
|
+
"projectId",
|
|
42
|
+
"slug",
|
|
43
|
+
]);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/*
|
|
47
|
+
* The general rule the case above is one instance of. Stated separately so a
|
|
48
|
+
* future column that falls into the same trap fails with a message that
|
|
49
|
+
* explains it.
|
|
50
|
+
*
|
|
51
|
+
* The slug is excluded because `DatabaseService.create` fills it in from the
|
|
52
|
+
* name (`generateSlug`) BEFORE `checkRequiredFields` runs — so it is
|
|
53
|
+
* required, unsettable by any caller, and still satisfiable. That is the
|
|
54
|
+
* only sanctioned way to be all three, and it is what makes the rest of this
|
|
55
|
+
* assertion meaningful.
|
|
56
|
+
*/
|
|
57
|
+
test("never requires a column that no caller is permitted to set", () => {
|
|
58
|
+
const filledInByTheFramework: Array<string> = [
|
|
59
|
+
device.getSaveSlugToColumn() || "",
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const unsatisfiable: Array<string> = callerSuppliedRequiredColumns()
|
|
63
|
+
.filter((column: string) => {
|
|
64
|
+
return !filledInByTheFramework.includes(column);
|
|
65
|
+
})
|
|
66
|
+
.filter((column: string) => {
|
|
67
|
+
const createPermissions: Array<Permission> =
|
|
68
|
+
device.getColumnAccessControlFor(column)?.create || [];
|
|
69
|
+
|
|
70
|
+
return createPermissions.length === 0;
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
expect(unsatisfiable).toEqual([]);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/*
|
|
77
|
+
* ...and the exception really is an exception: the slug column is the one
|
|
78
|
+
* that is filled in for the caller, and it comes from a column the caller
|
|
79
|
+
* DOES supply. If slugification were ever removed, the test above would go
|
|
80
|
+
* quietly permissive rather than red.
|
|
81
|
+
*/
|
|
82
|
+
test("the slug is derived from a column the caller supplies", () => {
|
|
83
|
+
expect(device.getSaveSlugToColumn()).toBe("slug");
|
|
84
|
+
expect(callerSuppliedRequiredColumns()).toContain(
|
|
85
|
+
device.getSlugifyColumn(),
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* `nextPollAt` specifically: NOT NULL in the database with a `now()` default,
|
|
91
|
+
* write-protected on create, and therefore filled in by Postgres. "Due now"
|
|
92
|
+
* is what a NULL used to mean, so a freshly created device is still polled on
|
|
93
|
+
* the assigned probe's next claim cycle.
|
|
94
|
+
*/
|
|
95
|
+
test("nextPollAt is the database's to fill in, not the caller's", () => {
|
|
96
|
+
expect(device.isDefaultValueColumn("nextPollAt")).toBe(true);
|
|
97
|
+
expect(device.getRequiredColumns().columns).toContain("nextPollAt");
|
|
98
|
+
expect(
|
|
99
|
+
device.getColumnAccessControlFor("nextPollAt")?.create || [],
|
|
100
|
+
).toEqual([]);
|
|
101
|
+
});
|
|
102
|
+
});
|