@oneuptime/common 12.0.25 → 12.0.26
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/URLQueryString.test.ts +472 -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/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 +45 -10
- 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/Dictionary/DictionaryFilterOperator.ts +83 -0
- package/UI/Components/Icon/Icon.tsx +28 -1
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +26 -4
- package/UI/Components/LogsViewer/components/LogSearchHelp.tsx +34 -16
- 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 +40 -10
- 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/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/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/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,272 @@
|
|
|
1
|
+
import TwoFactorBackupCodeNotification from "../../../Server/Utils/TwoFactorBackupCodeNotification";
|
|
2
|
+
import MailService from "../../../Server/Services/MailService";
|
|
3
|
+
import UserService from "../../../Server/Services/UserService";
|
|
4
|
+
import DatabaseConfig from "../../../Server/DatabaseConfig";
|
|
5
|
+
import logger from "../../../Server/Utils/Logger";
|
|
6
|
+
import User from "../../../Models/DatabaseModels/User";
|
|
7
|
+
import Email from "../../../Types/Email";
|
|
8
|
+
import EmailTemplateType from "../../../Types/Email/EmailTemplateType";
|
|
9
|
+
import Hostname from "../../../Types/API/Hostname";
|
|
10
|
+
import Protocol from "../../../Types/API/Protocol";
|
|
11
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
12
|
+
import { JSONObject } from "../../../Types/JSON";
|
|
13
|
+
import Dictionary from "../../../Types/Dictionary";
|
|
14
|
+
import { getJestSpyOn } from "../../Spy";
|
|
15
|
+
import { afterEach, beforeEach, describe, expect, test } from "@jest/globals";
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* The out-of-band notice that a set of recovery codes was just created.
|
|
19
|
+
*
|
|
20
|
+
* WHY THIS EXISTS, AND WHY IT IS SEPARATE FROM THE ROUTES THAT SEND IT
|
|
21
|
+
*
|
|
22
|
+
* Until issue #3382 was fixed, backup codes only came into existence when a
|
|
23
|
+
* user personally pressed a button on their own profile page, and that route
|
|
24
|
+
* mailed them about it. Codes are now minted by ENROLMENT instead -- verifying
|
|
25
|
+
* a first authenticator app, registering a first security key, or completing a
|
|
26
|
+
* mandated enrolment at sign-in -- which moved the creation of ten sign-in
|
|
27
|
+
* credentials onto routes that are authenticated by a session or by a password
|
|
28
|
+
* alone. Somebody holding a stolen session can register a security key of
|
|
29
|
+
* their own and walk away with the account's recovery codes; somebody holding
|
|
30
|
+
* a stolen password can complete a mandated enrolment. Neither is prevented by
|
|
31
|
+
* this mail. Both become VISIBLE to the real owner because of it, at the
|
|
32
|
+
* address on the account rather than in the browser that did it, which is the
|
|
33
|
+
* same bargain the regenerate route already struck.
|
|
34
|
+
*
|
|
35
|
+
* EVERY ASSERTION BELOW IS A SILENT FAILURE.
|
|
36
|
+
*
|
|
37
|
+
* - the codes must never be in the mail. They are a sign-in credential, and
|
|
38
|
+
* mailing them hands the account to whoever later reads the mailbox --
|
|
39
|
+
* which is exactly the thing a second factor exists to stop. Nothing about
|
|
40
|
+
* the vars bag makes that obvious, so it is asserted directly;
|
|
41
|
+
* - the address must come off the ACCOUNT, never from the caller. A caller
|
|
42
|
+
* proved which user they are; it did not prove where that user's mail
|
|
43
|
+
* should go, and a notice that can be redirected is worth nothing;
|
|
44
|
+
* - it must never throw into its caller. Every call site runs inside a
|
|
45
|
+
* request whose response carries the only copy of the plaintext codes, so
|
|
46
|
+
* an unreachable SMTP server that propagated would destroy the very thing
|
|
47
|
+
* the mail is announcing.
|
|
48
|
+
*
|
|
49
|
+
* SIBLING FILES: Common/Tests/Server/API/UserTwoFactorBackupCodeAPI.test.ts
|
|
50
|
+
* owns the "codes were REPLACED" mail on the self-service regenerate route,
|
|
51
|
+
* which is a different template with different copy; nothing here repeats it.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
const USER_ID: ObjectID = new ObjectID("11111111-1111-4111-8111-111111111111");
|
|
55
|
+
|
|
56
|
+
type SpyLike = ReturnType<typeof getJestSpyOn>;
|
|
57
|
+
|
|
58
|
+
let sendMailSpy: SpyLike;
|
|
59
|
+
let findOneByIdSpy: SpyLike;
|
|
60
|
+
let loggerErrorSpy: SpyLike;
|
|
61
|
+
|
|
62
|
+
type StubUserFunction = (email: string | null) => void;
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* `findOneById` is what reads the address off the account. A null user stands
|
|
66
|
+
* in for a deleted account, and a user with no email for one that never
|
|
67
|
+
* verified one -- both reachable, and both must end in silence rather than a
|
|
68
|
+
* throw.
|
|
69
|
+
*/
|
|
70
|
+
const stubUser: StubUserFunction = (email: string | null): void => {
|
|
71
|
+
findOneByIdSpy.mockImplementation(async (): Promise<User | null> => {
|
|
72
|
+
if (email === null) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const user: User = new User();
|
|
77
|
+
user.id = USER_ID;
|
|
78
|
+
user.email = new Email(email);
|
|
79
|
+
return user;
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
describe("TwoFactorBackupCodeNotification", () => {
|
|
84
|
+
beforeEach(() => {
|
|
85
|
+
sendMailSpy = getJestSpyOn(MailService, "sendMail");
|
|
86
|
+
sendMailSpy.mockImplementation(async (): Promise<void> => {
|
|
87
|
+
return;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
findOneByIdSpy = getJestSpyOn(UserService, "findOneById");
|
|
91
|
+
stubUser("owner@example.com");
|
|
92
|
+
|
|
93
|
+
loggerErrorSpy = getJestSpyOn(logger, "error");
|
|
94
|
+
loggerErrorSpy.mockImplementation((): void => {
|
|
95
|
+
return;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
getJestSpyOn(DatabaseConfig, "getHost").mockImplementation(
|
|
99
|
+
async (): Promise<Hostname> => {
|
|
100
|
+
return new Hostname("oneuptime.example.com");
|
|
101
|
+
},
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
getJestSpyOn(DatabaseConfig, "getHttpProtocol").mockImplementation(
|
|
105
|
+
async (): Promise<Protocol> => {
|
|
106
|
+
return Protocol.HTTPS;
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
afterEach(() => {
|
|
112
|
+
jest.restoreAllMocks();
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("mails the address on the account, not one supplied by the caller", async () => {
|
|
116
|
+
await TwoFactorBackupCodeNotification.sendCodesCreatedEmail({
|
|
117
|
+
userId: USER_ID,
|
|
118
|
+
codeCount: 10,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
expect(findOneByIdSpy).toHaveBeenCalledTimes(1);
|
|
122
|
+
|
|
123
|
+
const lookup: { id: ObjectID; props: JSONObject } = (
|
|
124
|
+
findOneByIdSpy.mock.calls[0] as Array<{
|
|
125
|
+
id: ObjectID;
|
|
126
|
+
props: JSONObject;
|
|
127
|
+
}>
|
|
128
|
+
)[0]!;
|
|
129
|
+
|
|
130
|
+
expect(lookup.id.toString()).toBe(USER_ID.toString());
|
|
131
|
+
expect(lookup.props["isRoot"]).toBe(true);
|
|
132
|
+
|
|
133
|
+
expect(sendMailSpy).toHaveBeenCalledTimes(1);
|
|
134
|
+
|
|
135
|
+
const mail: { toEmail: Email } = (
|
|
136
|
+
sendMailSpy.mock.calls[0] as Array<{ toEmail: Email }>
|
|
137
|
+
)[0]!;
|
|
138
|
+
|
|
139
|
+
expect(mail.toEmail.toString()).toBe("owner@example.com");
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
test("uses the created template, not the replaced one", async () => {
|
|
143
|
+
await TwoFactorBackupCodeNotification.sendCodesCreatedEmail({
|
|
144
|
+
userId: USER_ID,
|
|
145
|
+
codeCount: 10,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const mail: { templateType: EmailTemplateType; subject: string } = (
|
|
149
|
+
sendMailSpy.mock.calls[0] as Array<{
|
|
150
|
+
templateType: EmailTemplateType;
|
|
151
|
+
subject: string;
|
|
152
|
+
}>
|
|
153
|
+
)[0]!;
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
* The regenerate mail tells the reader every code they were holding has
|
|
157
|
+
* stopped working. Sent to somebody who has just SET UP two factor auth
|
|
158
|
+
* for the first time, that sentence describes an event that did not happen
|
|
159
|
+
* and sends them looking for a list they never had.
|
|
160
|
+
*/
|
|
161
|
+
expect(mail.templateType).toBe(
|
|
162
|
+
EmailTemplateType.TwoFactorBackupCodesCreated,
|
|
163
|
+
);
|
|
164
|
+
expect(mail.templateType).not.toBe(
|
|
165
|
+
EmailTemplateType.TwoFactorBackupCodesRegenerated,
|
|
166
|
+
);
|
|
167
|
+
expect(mail.subject.toLowerCase()).toContain("backup codes");
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
test("never puts a code in the mail", async () => {
|
|
171
|
+
await TwoFactorBackupCodeNotification.sendCodesCreatedEmail({
|
|
172
|
+
userId: USER_ID,
|
|
173
|
+
codeCount: 10,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const mail: { vars: Dictionary<string> } = (
|
|
177
|
+
sendMailSpy.mock.calls[0] as Array<{ vars: Dictionary<string> }>
|
|
178
|
+
)[0]!;
|
|
179
|
+
|
|
180
|
+
/*
|
|
181
|
+
* Asserted as "the bag holds exactly these four keys" rather than "it does
|
|
182
|
+
* not hold a `codes` key", because the failure being guarded is somebody
|
|
183
|
+
* ADDING one -- under any name -- while making the mail more helpful.
|
|
184
|
+
*/
|
|
185
|
+
expect(Object.keys(mail.vars).sort()).toEqual([
|
|
186
|
+
"generatedAt",
|
|
187
|
+
"homeUrl",
|
|
188
|
+
"newCodeCount",
|
|
189
|
+
"twoFactorAuthUrl",
|
|
190
|
+
]);
|
|
191
|
+
|
|
192
|
+
expect(mail.vars["newCodeCount"]).toBe("10");
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test("links to the page where the owner can replace the set", async () => {
|
|
196
|
+
await TwoFactorBackupCodeNotification.sendCodesCreatedEmail({
|
|
197
|
+
userId: USER_ID,
|
|
198
|
+
codeCount: 10,
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const mail: { vars: Dictionary<string> } = (
|
|
202
|
+
sendMailSpy.mock.calls[0] as Array<{ vars: Dictionary<string> }>
|
|
203
|
+
)[0]!;
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* The mail's whole value to somebody who did NOT do this is that the next
|
|
207
|
+
* click is the one that fixes it. A link to the dashboard root would leave
|
|
208
|
+
* them hunting through a settings tree while an attacker holds their
|
|
209
|
+
* recovery codes.
|
|
210
|
+
*/
|
|
211
|
+
expect(String(mail.vars["twoFactorAuthUrl"])).toContain(
|
|
212
|
+
"/user-profile/two-factor-auth",
|
|
213
|
+
);
|
|
214
|
+
expect(String(mail.vars["twoFactorAuthUrl"])).toContain("https://");
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
test("says nothing when the account has no address to say it to", async () => {
|
|
218
|
+
stubUser(null);
|
|
219
|
+
|
|
220
|
+
await TwoFactorBackupCodeNotification.sendCodesCreatedEmail({
|
|
221
|
+
userId: USER_ID,
|
|
222
|
+
codeCount: 10,
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
expect(sendMailSpy).not.toHaveBeenCalled();
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
test("does not throw into the caller when the mail server is unreachable", async () => {
|
|
229
|
+
sendMailSpy.mockImplementation(async (): Promise<void> => {
|
|
230
|
+
throw new Error("SMTP unreachable");
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
/*
|
|
234
|
+
* `notifyCodesCreated` is the shape every call site uses, and it is the
|
|
235
|
+
* shape that matters: the codes are already written and already on their
|
|
236
|
+
* way to the user's screen when it runs. A rejection escaping here would
|
|
237
|
+
* fail the request carrying the only copy of them.
|
|
238
|
+
*/
|
|
239
|
+
expect(() => {
|
|
240
|
+
TwoFactorBackupCodeNotification.notifyCodesCreated({
|
|
241
|
+
userId: USER_ID,
|
|
242
|
+
codeCount: 10,
|
|
243
|
+
});
|
|
244
|
+
}).not.toThrow();
|
|
245
|
+
|
|
246
|
+
await new Promise((resolve: (value: void) => void) => {
|
|
247
|
+
setTimeout(resolve, 0);
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
expect(loggerErrorSpy).toHaveBeenCalled();
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
test("does not throw into the caller when the account lookup fails", async () => {
|
|
254
|
+
findOneByIdSpy.mockImplementation(async (): Promise<User | null> => {
|
|
255
|
+
throw new Error("Database not connected");
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
expect(() => {
|
|
259
|
+
TwoFactorBackupCodeNotification.notifyCodesCreated({
|
|
260
|
+
userId: USER_ID,
|
|
261
|
+
codeCount: 10,
|
|
262
|
+
});
|
|
263
|
+
}).not.toThrow();
|
|
264
|
+
|
|
265
|
+
await new Promise((resolve: (value: void) => void) => {
|
|
266
|
+
setTimeout(resolve, 0);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
expect(loggerErrorSpy).toHaveBeenCalled();
|
|
270
|
+
expect(sendMailSpy).not.toHaveBeenCalled();
|
|
271
|
+
});
|
|
272
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { describe, expect, test } from "@jest/globals";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* VMRunner hands the sandbox the host's real axios, so its SSRF guard is the
|
|
7
|
+
* one thing standing between workflow-authored JavaScript and the internal
|
|
8
|
+
* network. VMRunnerSsrf.test.ts exercises that guard for real, but it can only
|
|
9
|
+
* run where the isolated-vm native module loads — so these source-level checks
|
|
10
|
+
* cover the one detail that behaviour test does not: the guard now takes a
|
|
11
|
+
* policy argument, and getting that argument's plumbing wrong fails open.
|
|
12
|
+
*
|
|
13
|
+
* Two things must hold, and neither is visible from the sandbox:
|
|
14
|
+
*
|
|
15
|
+
* - The runner passes the CALLER's flag, not a literal `true` and not the
|
|
16
|
+
* instance configuration it could read itself. It also executes custom code
|
|
17
|
+
* monitors inside the Probe, which has no database to resolve a project
|
|
18
|
+
* from, so the decision cannot live here.
|
|
19
|
+
*
|
|
20
|
+
* - Absent, the flag is false. A caller that never heard of the option keeps
|
|
21
|
+
* the strict policy rather than inheriting whatever was last set.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
const VM_DIR: string = path.join(
|
|
25
|
+
__dirname,
|
|
26
|
+
"..",
|
|
27
|
+
"..",
|
|
28
|
+
"..",
|
|
29
|
+
"..",
|
|
30
|
+
"Server",
|
|
31
|
+
"Utils",
|
|
32
|
+
"VM",
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const runnerSource: string = fs.readFileSync(
|
|
36
|
+
path.join(VM_DIR, "VMRunner.ts"),
|
|
37
|
+
"utf8",
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const apiSource: string = fs.readFileSync(
|
|
41
|
+
path.join(VM_DIR, "VMAPI.ts"),
|
|
42
|
+
"utf8",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
describe("VMRunner — private network policy plumbing", () => {
|
|
46
|
+
test("the sandbox axios guard is called with the caller's flag", () => {
|
|
47
|
+
expect(runnerSource).toMatch(
|
|
48
|
+
/validateWebhookTargetIsSafe\(\s*effectiveUrl,\s*\{[\s\S]{0,600}?allowPrivateNetworkTargets:\s*\n?\s*options\.allowPrivateNetworkRequests === true,/,
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* "Webhook URL" is the guard's default noun and is wrong for both of this
|
|
54
|
+
* runner's callers — one is a workflow script, the other is a monitor.
|
|
55
|
+
*/
|
|
56
|
+
test("the guard is told this is a request, not a webhook", () => {
|
|
57
|
+
expect(runnerSource).toMatch(/targetLabel:\s*"Request URL"/);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/*
|
|
61
|
+
* The sentence telling an operator how to permit a private target has to
|
|
62
|
+
* come from the caller: the workflow component's setting lives on the API
|
|
63
|
+
* server and the probe's lives on the probe, which is usually a different
|
|
64
|
+
* machine owned by a different person.
|
|
65
|
+
*/
|
|
66
|
+
test("the refusal hint is passed through from the caller", () => {
|
|
67
|
+
expect(runnerSource).toMatch(
|
|
68
|
+
/privateNetworkHint:\s*options\.privateNetworkHint/,
|
|
69
|
+
);
|
|
70
|
+
expect(runnerSource).toMatch(
|
|
71
|
+
/privateNetworkHint\?:\s*string \| undefined;/,
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test("there is exactly one call to the guard", () => {
|
|
76
|
+
/*
|
|
77
|
+
* A second, unguarded request path inside the runner would be invisible to
|
|
78
|
+
* every test above — the sandbox would simply have two doors.
|
|
79
|
+
*/
|
|
80
|
+
const calls: RegExpMatchArray | null = runnerSource.match(
|
|
81
|
+
/validateWebhookTargetIsSafe\(/g,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
expect(calls).toHaveLength(1);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test("the runner never reads the instance configuration itself", () => {
|
|
88
|
+
/*
|
|
89
|
+
* It would work in the App and silently differ in the Probe, where there
|
|
90
|
+
* is no project to resolve. The policy has to arrive from the caller.
|
|
91
|
+
*/
|
|
92
|
+
expect(runnerSource).not.toContain("PrivateNetworkWebhookConfig");
|
|
93
|
+
expect(runnerSource).not.toContain("ProjectService");
|
|
94
|
+
expect(runnerSource).not.toContain("ALLOW_PRIVATE_NETWORK_WEBHOOKS");
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test("the option is optional, so an unaware caller gets the strict policy", () => {
|
|
98
|
+
expect(runnerSource).toMatch(
|
|
99
|
+
/allowPrivateNetworkRequests\?:\s*boolean \| undefined;/,
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
test("VMAPI passes both options through rather than dropping them", () => {
|
|
104
|
+
expect(apiSource).toMatch(
|
|
105
|
+
/allowPrivateNetworkRequests\?:\s*boolean \| undefined;/,
|
|
106
|
+
);
|
|
107
|
+
expect(apiSource).toMatch(/privateNetworkHint\?:\s*string \| undefined;/);
|
|
108
|
+
// VMAPI forwards `data` wholesale; anything else would silently drop it.
|
|
109
|
+
expect(apiSource).toContain("return VMRunner.runCodeInSandbox(data);");
|
|
110
|
+
});
|
|
111
|
+
});
|
|
@@ -13,7 +13,9 @@ import http, { IncomingMessage, Server, createServer } from "http";
|
|
|
13
13
|
import { AddressInfo } from "net";
|
|
14
14
|
import { createExpressApp } from "../../../Server/Utils/Express";
|
|
15
15
|
import mountVendorAssets, {
|
|
16
|
+
BrandAssetsPath,
|
|
16
17
|
MountVendorAssetsFunction,
|
|
18
|
+
OneUptimeLogoUrl,
|
|
17
19
|
VendorAssetsPath,
|
|
18
20
|
VendorAssetsRoute,
|
|
19
21
|
getMermaidDistPath,
|
|
@@ -296,6 +298,121 @@ describe("vendored browser assets", () => {
|
|
|
296
298
|
});
|
|
297
299
|
});
|
|
298
300
|
|
|
301
|
+
describe("brand images", () => {
|
|
302
|
+
/*
|
|
303
|
+
* https://github.com/OneUptime/oneuptime/issues/3457 - the on-call
|
|
304
|
+
* acknowledge page and the SSO message page render out of the App
|
|
305
|
+
* container and asked for /img/3-transparent.svg, which only the Home
|
|
306
|
+
* container serves. nginx sends "/" to App on every install with billing
|
|
307
|
+
* off, so the logo 404'd and the page showed a broken image.
|
|
308
|
+
*/
|
|
309
|
+
test("resolves to a directory that ships with Common", () => {
|
|
310
|
+
expect(fs.existsSync(BrandAssetsPath)).toBe(true);
|
|
311
|
+
expect(fs.statSync(BrandAssetsPath).isDirectory()).toBe(true);
|
|
312
|
+
expect(
|
|
313
|
+
BrandAssetsPath.endsWith(path.join("Server", "Static", "Brand")),
|
|
314
|
+
).toBe(true);
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
test("the logo URL is under the prefix every service mounts", () => {
|
|
318
|
+
expect(OneUptimeLogoUrl).toBe(
|
|
319
|
+
"/oneuptime-assets/brand/oneuptime-logo.svg",
|
|
320
|
+
);
|
|
321
|
+
expect(OneUptimeLogoUrl.startsWith(`${VendorAssetsRoute}/`)).toBe(true);
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
test("serves the OneUptime logo as an SVG", async () => {
|
|
325
|
+
const asset: AssetResponse = await getAsset(OneUptimeLogoUrl);
|
|
326
|
+
|
|
327
|
+
expect(asset.status).toBe(200);
|
|
328
|
+
expect(asset.contentType).toContain("image/svg+xml");
|
|
329
|
+
expect(asset.text).toContain("<svg");
|
|
330
|
+
expect(asset.body.byteLength).toBeGreaterThan(1000);
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
test("does not answer with the index page", () => {
|
|
334
|
+
/*
|
|
335
|
+
* The failure mode that looks like success: a catch-all mounted ahead of
|
|
336
|
+
* the asset route hands back HTML with a 200, and an <img> pointed at it
|
|
337
|
+
* still renders broken.
|
|
338
|
+
*/
|
|
339
|
+
return getAsset(OneUptimeLogoUrl).then((asset: AssetResponse) => {
|
|
340
|
+
expect(asset.text).not.toBe(INDEX_PAGE);
|
|
341
|
+
expect(asset.contentType).not.toContain("text/html");
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
test("is byte-identical to the copy the frontends and Home already ship", () => {
|
|
346
|
+
/*
|
|
347
|
+
* Three copies of one file is not ideal, but a logo that silently drifts
|
|
348
|
+
* between the marketing site and the acknowledge page is worse. This is
|
|
349
|
+
* the test that says so.
|
|
350
|
+
*/
|
|
351
|
+
const served: Buffer = fs.readFileSync(
|
|
352
|
+
path.join(BrandAssetsPath, "oneuptime-logo.svg"),
|
|
353
|
+
);
|
|
354
|
+
|
|
355
|
+
const copies: Array<string> = [
|
|
356
|
+
path.join(
|
|
357
|
+
REPOSITORY_ROOT,
|
|
358
|
+
"Common",
|
|
359
|
+
"UI",
|
|
360
|
+
"Images",
|
|
361
|
+
"logos",
|
|
362
|
+
"OneUptimeSVG",
|
|
363
|
+
"3-transparent.svg",
|
|
364
|
+
),
|
|
365
|
+
path.join(
|
|
366
|
+
REPOSITORY_ROOT,
|
|
367
|
+
"Home",
|
|
368
|
+
"Static",
|
|
369
|
+
"img",
|
|
370
|
+
"3-transparent.svg",
|
|
371
|
+
),
|
|
372
|
+
];
|
|
373
|
+
|
|
374
|
+
let compared: number = 0;
|
|
375
|
+
|
|
376
|
+
for (const copy of copies) {
|
|
377
|
+
if (!fs.existsSync(copy)) {
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
compared++;
|
|
382
|
+
expect(fs.readFileSync(copy).equals(served)).toBe(true);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
expect(compared).toBe(copies.length);
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
test("revalidates rather than caching for a year", async () => {
|
|
389
|
+
/*
|
|
390
|
+
* The filename carries no version, unlike tailwind's, so a rebrand must
|
|
391
|
+
* not be stuck behind a year-old cache entry.
|
|
392
|
+
*/
|
|
393
|
+
const asset: AssetResponse = await getAsset(OneUptimeLogoUrl);
|
|
394
|
+
|
|
395
|
+
expect(asset.cacheControl).toContain("max-age=3600");
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
test("a brand file that does not exist is a 404, not a page", async () => {
|
|
399
|
+
const asset: AssetResponse = await getAsset(
|
|
400
|
+
"/oneuptime-assets/brand/no-such-logo.svg",
|
|
401
|
+
);
|
|
402
|
+
|
|
403
|
+
expect(asset.status).toBe(404);
|
|
404
|
+
expect(asset.text).not.toBe(INDEX_PAGE);
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
test("a path that escapes the brand directory is refused", async () => {
|
|
408
|
+
const asset: AssetResponse = await getAsset(
|
|
409
|
+
"/oneuptime-assets/brand/../../package.json",
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
expect(asset.text).not.toContain("@oneuptime/common");
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
|
|
299
416
|
describe("fonts", () => {
|
|
300
417
|
test("serves Inter as a woff2", async () => {
|
|
301
418
|
const asset: AssetResponse = await getAsset(
|
|
@@ -1052,6 +1052,42 @@ describe("MicrosoftTeamsUtil.sendAdaptiveCardToChannel - roster error translatio
|
|
|
1052
1052
|
);
|
|
1053
1053
|
});
|
|
1054
1054
|
|
|
1055
|
+
test("a Graph permission refusal reaches the admin as a named grant, end to end", async () => {
|
|
1056
|
+
/*
|
|
1057
|
+
* The payoff of the whole PermissionDenied split, exercised through the real
|
|
1058
|
+
* send path rather than against the message builder in isolation: Graph
|
|
1059
|
+
* refuses the installed-apps read, the send is still attempted (a refusal is
|
|
1060
|
+
* not a missing install), Microsoft rejects it on the roster, and the
|
|
1061
|
+
* exception an admin actually reads names the one permission that would turn
|
|
1062
|
+
* the guess into an answer.
|
|
1063
|
+
*
|
|
1064
|
+
* Unit-testing the pieces separately leaves this green even if PermissionDenied
|
|
1065
|
+
* were wired to short-circuit at the preflight, which would break both halves.
|
|
1066
|
+
*/
|
|
1067
|
+
mockProjectAuth({});
|
|
1068
|
+
mockInstallState(MicrosoftTeamsAppInstallState.PermissionDenied);
|
|
1069
|
+
installFakeBotAdapter({ adapterError: new Error(ROSTER_ERROR_TEXT) });
|
|
1070
|
+
|
|
1071
|
+
let thrown: unknown = undefined;
|
|
1072
|
+
try {
|
|
1073
|
+
await sendCardToChannel({ teamId: TEAM_ID });
|
|
1074
|
+
} catch (err) {
|
|
1075
|
+
thrown = err;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
const message: string = (thrown as Error).message;
|
|
1079
|
+
|
|
1080
|
+
// The send was attempted: a refusal to answer is not a missing install.
|
|
1081
|
+
expect(message).not.toContain(
|
|
1082
|
+
"The OneUptime app is not installed in the Microsoft Teams team",
|
|
1083
|
+
);
|
|
1084
|
+
// And the admin is told what to grant.
|
|
1085
|
+
expect(message).toContain("TeamsAppInstallation.ReadForTeam.All");
|
|
1086
|
+
expect(message).toContain("admin consent");
|
|
1087
|
+
// Microsoft's raw wording survives the rewrite.
|
|
1088
|
+
expect(message).toContain(ROSTER_ERROR_TEXT);
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1055
1091
|
test("a STALE local install record is re-checked, and a confirmed removal gets the install instructions", async () => {
|
|
1056
1092
|
/*
|
|
1057
1093
|
* The local record let this send skip the preflight, but the app has since
|
|
@@ -1449,14 +1485,25 @@ describe("MicrosoftTeamsUtil.getRosterRejectionMessage", () => {
|
|
|
1449
1485
|
}
|
|
1450
1486
|
});
|
|
1451
1487
|
|
|
1452
|
-
test("a known install
|
|
1488
|
+
test("a known install stops blaming the package and points at the Azure Bot", () => {
|
|
1489
|
+
/*
|
|
1490
|
+
* Graph confirmed a package carrying this deployment's app id is installed,
|
|
1491
|
+
* so the package is no longer the lead suspect. It used to be named anyway,
|
|
1492
|
+
* which read to admins as though the error had not registered what they had
|
|
1493
|
+
* already done. The identifier stays in the text — it is what they compare
|
|
1494
|
+
* against — but the instruction now points somewhere new.
|
|
1495
|
+
*/
|
|
1453
1496
|
const message: string = MicrosoftTeamsUtil.getRosterRejectionMessage({
|
|
1454
1497
|
channelName: "General",
|
|
1455
1498
|
installState: MicrosoftTeamsAppInstallState.Installed,
|
|
1456
1499
|
});
|
|
1457
1500
|
|
|
1458
1501
|
expect(message).toContain("MICROSOFT_TEAMS_APP_CLIENT_ID");
|
|
1459
|
-
expect(message).toContain("
|
|
1502
|
+
expect(message).toContain("probably not the problem");
|
|
1503
|
+
expect(message).toContain("Azure Bot resource");
|
|
1504
|
+
expect(message).not.toContain(
|
|
1505
|
+
"check that the Teams app package was built from this deployment",
|
|
1506
|
+
);
|
|
1460
1507
|
});
|
|
1461
1508
|
|
|
1462
1509
|
test("an unknown install state still suggests adding the app", () => {
|
|
@@ -1658,19 +1705,69 @@ describe("MicrosoftTeamsUtil.isAppInstalledInTeam", () => {
|
|
|
1658
1705
|
expect(get).toHaveBeenCalledTimes(2);
|
|
1659
1706
|
});
|
|
1660
1707
|
|
|
1661
|
-
test("a
|
|
1708
|
+
test("a 403 is PermissionDenied, never NotInstalled", async () => {
|
|
1662
1709
|
/*
|
|
1663
1710
|
* The realistic case: a workspace connected before
|
|
1664
1711
|
* TeamsAppInstallation.ReadForTeam.All was documented gets a 403 here. It
|
|
1665
|
-
* must not be told its app is missing
|
|
1712
|
+
* must not be told its app is missing — and it is worth separating from a
|
|
1713
|
+
* plain Unknown, because a refusal names the grant that would fix it.
|
|
1666
1714
|
*/
|
|
1667
1715
|
mockGraph([new HTTPErrorResponse(403, { error: "Forbidden" }, {})]);
|
|
1668
1716
|
|
|
1717
|
+
await expect(callIsAppInstalled()).resolves.toBe(
|
|
1718
|
+
MicrosoftTeamsAppInstallState.PermissionDenied,
|
|
1719
|
+
);
|
|
1720
|
+
});
|
|
1721
|
+
|
|
1722
|
+
test("a non-permission Graph error is still Unknown, never NotInstalled", async () => {
|
|
1723
|
+
/*
|
|
1724
|
+
* A 500 is Microsoft failing, not refusing. Reporting it as PermissionDenied
|
|
1725
|
+
* would tell the admin to grant a permission they already have.
|
|
1726
|
+
*/
|
|
1727
|
+
mockGraph([
|
|
1728
|
+
new HTTPErrorResponse(500, { error: "Internal Server Error" }, {}),
|
|
1729
|
+
]);
|
|
1730
|
+
|
|
1731
|
+
await expect(callIsAppInstalled()).resolves.toBe(
|
|
1732
|
+
MicrosoftTeamsAppInstallState.Unknown,
|
|
1733
|
+
);
|
|
1734
|
+
});
|
|
1735
|
+
|
|
1736
|
+
test("a 401 is Unknown, not PermissionDenied — a stale token is not a missing grant", async () => {
|
|
1737
|
+
/*
|
|
1738
|
+
* Graph answers a missing application permission with 403 and reserves 401
|
|
1739
|
+
* for a token it will not accept. getValidAccessToken can hand over a cached
|
|
1740
|
+
* app token without revalidating it when no expiry was stored, so a 401 here
|
|
1741
|
+
* is a live possibility — and telling that admin to grant a Graph permission
|
|
1742
|
+
* would be a confidently wrong answer.
|
|
1743
|
+
*/
|
|
1744
|
+
mockGraph([
|
|
1745
|
+
new HTTPErrorResponse(
|
|
1746
|
+
401,
|
|
1747
|
+
{ error: { code: "InvalidAuthenticationToken" } },
|
|
1748
|
+
{},
|
|
1749
|
+
),
|
|
1750
|
+
]);
|
|
1751
|
+
|
|
1669
1752
|
await expect(callIsAppInstalled()).resolves.toBe(
|
|
1670
1753
|
MicrosoftTeamsAppInstallState.Unknown,
|
|
1671
1754
|
);
|
|
1672
1755
|
});
|
|
1673
1756
|
|
|
1757
|
+
test("an authorization error code is PermissionDenied whatever status carries it", async () => {
|
|
1758
|
+
mockGraph([
|
|
1759
|
+
new HTTPErrorResponse(
|
|
1760
|
+
400,
|
|
1761
|
+
{ error: { code: "Authorization_RequestDenied" } },
|
|
1762
|
+
{},
|
|
1763
|
+
),
|
|
1764
|
+
]);
|
|
1765
|
+
|
|
1766
|
+
await expect(callIsAppInstalled()).resolves.toBe(
|
|
1767
|
+
MicrosoftTeamsAppInstallState.PermissionDenied,
|
|
1768
|
+
);
|
|
1769
|
+
});
|
|
1770
|
+
|
|
1674
1771
|
test("a thrown transport error is Unknown", async () => {
|
|
1675
1772
|
jest.spyOn(API, "get").mockRejectedValue(new Error("socket hang up"));
|
|
1676
1773
|
|