-
Notifications
You must be signed in to change notification settings - Fork 10
Configure App.config
Nathan Leach edited this page Dec 1, 2020
·
3 revisions
An example XML configuration file is shown below. The configuration
element contains sub-elements that contain the configuration attributes. These sections are described below:
-
configSection
: This is a .Net internal configuration that should not be modified. - CxConnection: The server connection configuration.
- CxCredentials: Credentials used when connecting the the web api.
- CxAnalyticsService: Controls how the program executes.
- CxLogOutput: Configuration for the Logging Output component.
- CxMongoOutput: Configuration for the MongoDB Output component.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="CxCredentials" type="CxAnalytix.Configuration.CxCredentials, Configuration" />
<section name="CxConnection" type="CxAnalytix.Configuration.CxConnection, Configuration" />
<section name="CxAnalyticsService" type="CxAnalytix.Configuration.CxAnalyticsService, Configuration" />
<section name="CxLogOutput" type="CxAnalytix.Out.Log4NetOutput.LogOutputConfig, Log4NetOutput" />
<section name="CxMongoOutput" type="CxAnalytix.Out.MongoDBOutput.MongoOutConfig, MongoDBOutput" />
</configSections>
<!-- Common config parameters -->
<CxConnection URL="http://localhost"
mnoURL="http://localhost:8080"
TimeoutSeconds="600" ValidateCertificates="true" />
<CxCredentials Username="foo" Password ="bar" Token="" />
<CxAnalyticsService ConcurrentThreads="2" StateDataStoragePath=".\"
ProcessPeriodMinutes="120"
OutputFactoryClassPath="CxAnalytix.Out.Log4NetOutput.LoggerOutFactory, Log4NetOutput"
SASTScanSummaryRecordName="RECORD_SAST_Scan_Summary"
SASTScanDetailRecordName="RECORD_SAST_Scan_Detail"
SCAScanSummaryRecordName="RECORD_SCA_Scan_Summary"
SCAScanDetailRecordName="RECORD_SCA_Scan_Detail"
ProjectInfoRecordName="RECORD_Project_Info"
PolicyViolationsRecordName="RECORD_Policy_Violations"
/>
<!-- Specific output method configuration parameters -->
<CxLogOutput DataRetentionDays="14" OutputRoot="logs\">
<PurgeSpecs>
<spec MatchSpec="*.log.*" />
</PurgeSpecs>
</CxLogOutput>
<CxMongoOutput ConnectionString="mongodb://localhost:27017/CxAnalytix">
<!-- This section is optional -->
<GeneratedShardKeys>
<!-- Each of these are optional -->
<Spec KeyName="pkey" CollectionName="SAST_Scan_Summary" FormatSpec="{ScanType}-{ScanFinished:yyyy-dddd}" />
<Spec KeyName="pkey" CollectionName="SAST_Scan_Detail" FormatSpec="{ScanType}-{QueryGroup}-{ScanFinished:yyyy-dddd}" />
</GeneratedShardKeys>
</CxMongoOutput>
</configuration>