in packages/common/src/configuration/service-configuration.ts [133:326]
private getRuntimeConfigSchema(): convict.Schema<RuntimeConfig> {
return {
featureFlags: {
sendNotification: {
format: 'Boolean',
default: false,
doc: 'Property to decide if we should notify after scan completed.',
},
},
logConfig: {
logInConsole: {
format: 'Boolean',
default: true,
doc: 'Property to decide if console logging is enabled',
},
},
queueConfig: {
maxQueueSize: {
format: 'int',
default: 10,
doc: 'Maximum message count in scan request queue.',
},
messageVisibilityTimeoutInSeconds: {
format: 'int',
default: 30 * 1.5 * 60, // maxWallClockTimeInMinutes * delta termination wait time
doc: 'Message visibility timeout in seconds. Must correlate with jobManagerConfig.maxWallClockTimeInMinutes config value.',
},
},
taskConfig: {
taskTimeoutInMinutes: {
format: 'int',
default: 10,
doc: 'Timeout value after which the task has to be terminated. Must correlate with queueConfig.messageVisibilityTimeoutInSeconds config value.',
},
retentionTimeInDays: {
format: 'int',
default: 3,
doc: 'The minimum time to retain the working directory for the task on the compute node where it ran, from the time it completes execution. After this time, the Batch service may delete the working directory and all its contents.',
},
maxTaskRetryCount: {
format: 'int',
default: 2,
doc: 'The maximum number of times the task may be retried.',
},
},
jobManagerConfig: {
activeToRunningTasksRatio: {
format: Number,
default: 3,
doc: `The target overload ratio of queued to running tasks. Higher ratio value will result higher queued tasks count.`,
},
addTasksIntervalInSeconds: {
format: 'int',
default: 20,
doc: 'The time interval at which a job manager adds tasks to the job.',
},
maxWallClockTimeInMinutes: {
format: 'int',
default: 30,
doc: 'The amount of time the job manager instance will run continuously. Must correlate with queueConfig.messageVisibilityTimeoutInSeconds config value.',
},
sendNotificationTasksCount: {
format: 'int',
default: 100,
doc: 'Number of scan notification tasks that can be in active/running state',
},
scanRunnerTaskImageName: {
format: 'String',
default: 'batch-scan-runner',
doc: 'The container image name used for task creation.',
},
sendNotificationTaskImageName: {
format: 'String',
default: 'batch-scan-notification-runner',
doc: 'The container image name used for task creation.',
},
privacyScanRunnerTaskImageName: {
format: 'String',
default: 'batch-privacy-scan-runner',
doc: 'The container image name used for task creation.',
},
},
scanConfig: {
failedScanRetryIntervalInMinutes: {
format: 'int',
default: 45,
doc: 'The minimum wait time before next retry of a failed scan request.',
},
maxFailedScanRetryCount: {
format: 'int',
default: 7,
doc: 'Maximum number of retries (additional times to re-run a scan) allowed for a failed scan request.',
},
maxSendNotificationRetryCount: {
format: 'int',
default: 5,
doc: 'Maximum number of retries allowed for a scan notification sending',
},
scanTimeoutInMin: {
default: 3,
format: 'int',
doc: 'Maximum allowed time for scanning a web page in minutes',
},
},
restApiConfig: {
maxScanRequestBatchCount: {
format: 'int',
default: 250,
doc: 'Maximum number of scan requests in a single HTTP client request.',
},
scanRequestProcessingDelayInSeconds: {
format: 'int',
default: 15,
doc: 'The scan request processing delay interval in seconds for a new submitted request.',
},
minScanPriorityValue: {
format: 'int',
default: -1000,
doc: 'Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.\
This range correlates with Azure Batch pool task priority range.',
},
maxScanPriorityValue: {
format: 'int',
default: 1000,
doc: 'Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority.\
This range correlates with Azure Batch pool task priority range.',
},
},
availabilityTestConfig: {
urlToScan: {
format: 'String',
default: 'https://teststorage57bzoqjjclekk.z13.web.core.windows.net/2021-05-04/',
doc: 'Url to scan for availability testing',
},
consolidatedIdBase: {
format: 'String',
default: 'e2e-consolidated-report-id',
doc: 'The id prefix for the consolidated report',
},
maxScanWaitTimeInSeconds: {
format: 'int',
default: 3600,
doc: 'Maximum wait time for scan request to complete',
},
maxScanCompletionNotificationWaitTimeInSeconds: {
format: 'int',
default: 600,
doc: 'Maximum wait time for scan notification request to complete',
},
maxDeepScanWaitTimeInSeconds: {
format: 'int',
default: 3600,
doc: 'Maximum wait time for deep scan to complete',
},
scanWaitIntervalInSeconds: {
format: 'int',
default: 180,
doc: 'Time to wait before checking E2E test orchestration workflow activity result',
},
logQueryTimeRange: {
format: String,
default: 'P1D',
doc: 'The Application Insights query time range',
},
environmentDefinition: {
format: String,
default: 'canary',
doc: 'The environment definition used to select tests to run',
},
scanNotifyApiEndpoint: {
format: 'String',
default: '/scan-notification-url',
doc: 'The end-point to hit when a scan is completed and will respond successfully',
},
scanNotifyFailApiEndpoint: {
format: 'String',
default: '/scan-notification-url-fail',
doc: 'The end-point to hit when a scan is completed and will respond unsuccessfully',
},
},
crawlConfig: {
deepScanDiscoveryLimit: {
format: 'int',
default: 6, // Must be at least high enough to allow the largest E2E deep scan test to complete
doc: 'The maximum number of URLs that will be discovered for a deep scan request',
},
deepScanUpperLimit: {
format: 'int',
default: 10,
doc: 'The maximum number of URLs that will be processed for a deep scan request',
},
},
};
}