resolved development branch merge conflict
This commit is contained in:
Коммит
a7fab178ff
|
@ -4,6 +4,48 @@
|
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": ".NET462 Launch with Args (console)",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"requireExactSource": false,
|
||||
"program": "${workspaceFolder}/src/bin/Debug/net462/CollectSFData.exe",
|
||||
"args": [
|
||||
//"${input:args}"
|
||||
"-type",
|
||||
"trace",
|
||||
"-krt",
|
||||
"1",
|
||||
"-t",
|
||||
"1",
|
||||
// "-l",
|
||||
// "1"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",
|
||||
"stopAtEntry": false,
|
||||
"console": "internalConsole",
|
||||
},
|
||||
{
|
||||
"name": ".NET48 Launch with Args (console)",
|
||||
"type": "clr",
|
||||
"request": "launch",
|
||||
"requireExactSource": false,
|
||||
"program": "${workspaceFolder}/src/bin/Debug/net48/CollectSFData.exe",
|
||||
"args": [
|
||||
//"${input:args}"
|
||||
"-type",
|
||||
"trace",
|
||||
"-krt",
|
||||
"1",
|
||||
"-t",
|
||||
"1",
|
||||
// "-l",
|
||||
// "1"
|
||||
],
|
||||
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",
|
||||
"stopAtEntry": false,
|
||||
"console": "internalConsole",
|
||||
},
|
||||
{
|
||||
"name": ".NET 8 Launch with Args (console)",
|
||||
"type": "coreclr",
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace CollectSFData.Common
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsARMValid { get; set; }
|
||||
public bool IsARMValid { get; set; } = false;
|
||||
|
||||
public bool IsValid { get; set; }
|
||||
|
||||
|
@ -610,6 +610,7 @@ namespace CollectSFData.Common
|
|||
options.Remove("Examples");
|
||||
options.Remove("ExePath");
|
||||
options.Remove("FileType");
|
||||
options.Remove("IsARMValid");
|
||||
options.Remove("IsIngestionLocal");
|
||||
options.Remove("IsValid");
|
||||
options.Remove("NeedsValidation");
|
||||
|
@ -673,11 +674,15 @@ namespace CollectSFData.Common
|
|||
retval &= ValidateFileType();
|
||||
retval &= ValidateTime();
|
||||
retval &= ValidateSource();
|
||||
|
||||
if (ShouldAuthenticateToArm())
|
||||
{
|
||||
retval &= IsARMValid = ValidateAad();
|
||||
}
|
||||
|
||||
retval &= ValidateDestination();
|
||||
retval &= ValidateDatabasePersistencePaths();
|
||||
|
||||
IsARMValid = ShouldAuthenticateToArm() && (retval &= ValidateAad());
|
||||
|
||||
if (retval)
|
||||
{
|
||||
Log.Info($"options:", Clone());
|
||||
|
@ -871,6 +876,16 @@ namespace CollectSFData.Common
|
|||
retval = false;
|
||||
}
|
||||
|
||||
#if NET462
|
||||
// if net462, this is not supported and will throw an exception
|
||||
if (IsKustoConfigured() && !IsARMValid)
|
||||
{
|
||||
string errorMessage = "kusto federated security not supported in .net framework 4.6.2. use different framework or configure 'AzureClientId'";
|
||||
Log.Error(errorMessage);
|
||||
throw new NotSupportedException(errorMessage);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IsKustoConfigured() & IsLogAnalyticsConfigured())
|
||||
{
|
||||
Log.Error($"kusto and log analytics *cannot* both be enabled. remove configuration for one");
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace CollectSFData.Kusto
|
|||
private Timer _adminIngestTimer { get; set; }
|
||||
private Timer _adminTimer { get; set; }
|
||||
private Timer _queryTimer { get; set; }
|
||||
private object _lockObj = new object();
|
||||
|
||||
public KustoEndpoint(ConfigurationOptions config)
|
||||
{
|
||||
|
@ -144,7 +145,9 @@ namespace CollectSFData.Kusto
|
|||
}
|
||||
else if (Regex.IsMatch(_config.KustoCluster, Constants.KustoUrlPattern))
|
||||
{
|
||||
// use federated security to connect to kusto directly and use kusto identity token instead of arm token
|
||||
// use kusto federated security to connect to kusto directly and use kusto identity token instead of arm token
|
||||
Log.Info($"connecting to kusto with kusto federated authentication.");
|
||||
|
||||
IngestConnection = new KustoConnectionStringBuilder(ClusterIngestUrl)
|
||||
{
|
||||
FederatedSecurity = true,
|
||||
|
@ -185,9 +188,12 @@ namespace CollectSFData.Kusto
|
|||
Log.Info($"command:{command}", ConsoleColor.Blue);
|
||||
return await _kustoTasks.TaskFunction((responseList) =>
|
||||
{
|
||||
ICslAdminProvider adminClient = CreateAdminClient();
|
||||
List<string> results = EnumerateResultsCsv(adminClient.ExecuteControlCommand(command));
|
||||
return results;
|
||||
// ingest commands are limited by cluster ingest capacity
|
||||
lock (_lockObj)
|
||||
{
|
||||
ICslAdminProvider adminClient = CreateAdminClient();
|
||||
return EnumerateResultsCsv(adminClient.ExecuteControlCommand(command));
|
||||
}
|
||||
}) as List<string>;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче