Remove ADAL Code (#23360)

* initial commit, removed all adal code

* remove all authLibrary references in extension/azurecore

* removed authLibrary references from src/sql

* remove MSAL/ADAL setting option

* wip fixing tests and removing Msal from method names

* fixed tests

* create accountInfo mock

* fix tests

* fix clientApplication mock

* remove clientapplication

* fix compile

* add typing

* wip

* wip

* wip

* fix tree provider

* remove SimpleTokenCache, FileDatabase & tests

* remove remaining adal / authentication library references:

* remove comma from package.nls.json

* fix error fetching subscriptions

* fix tests

* remove getAzureAuthenticationLibraryConfig

* remove adal check

* fix build

* remove test

* undo remove customProviderSettings

* fix bracket
This commit is contained in:
Christopher Suh
2023-07-20 10:37:38 -07:00
committed by GitHub
parent a2b1c2cfc5
commit 91359a32c9
36 changed files with 168 additions and 1849 deletions

View File

@@ -10,7 +10,7 @@ import * as vscode from 'vscode';
import * as azdata from 'azdata';
import * as path from 'path';
import * as azurecore from 'azurecore';
import { getAzureAuthenticationLibraryConfig, getCommonLaunchArgsAndCleanupOldLogFiles, getConfigTracingLevel, getEnableConnectionPoolingConfig, getEnableSqlAuthenticationProviderConfig, getOrDownloadServer, getParallelMessageProcessingConfig, logDebug, TracingLevel } from './utils';
import { getCommonLaunchArgsAndCleanupOldLogFiles, getConfigTracingLevel, getEnableConnectionPoolingConfig, getEnableSqlAuthenticationProviderConfig, getOrDownloadServer, getParallelMessageProcessingConfig, logDebug, TracingLevel } from './utils';
import { TelemetryReporter, LanguageClientErrorHandler } from './telemetry';
import { SqlOpsDataClient, ClientOptions } from 'dataprotocol-client';
import { TelemetryFeature, AgentServicesFeature, SerializationFeature, AccountFeature, SqlAssessmentServicesFeature, ProfilerFeature, TableDesignerFeature, ExecutionPlanServiceFeature } from './features';
@@ -99,7 +99,7 @@ export class SqlToolsServer {
* @param client SqlOpsDataClient instance
*/
private async handleEncryptionKeyEventNotification(client: SqlOpsDataClient) {
if (getAzureAuthenticationLibraryConfig() === 'MSAL' && getEnableSqlAuthenticationProviderConfig()) {
if (getEnableSqlAuthenticationProviderConfig()) {
let azureCoreApi = await this.getAzureCoreAPI();
let onDidEncryptionKeysChanged = azureCoreApi.onEncryptionKeysUpdated;
// Register event listener from Azure Core extension and
@@ -163,8 +163,7 @@ function generateServerOptions(logPath: string, executablePath: string): ServerO
launchArgs.push('--parallel-message-processing');
}
const enableSqlAuthenticationProvider = getEnableSqlAuthenticationProviderConfig();
const azureAuthLibrary = getAzureAuthenticationLibraryConfig();
if (azureAuthLibrary === 'MSAL' && enableSqlAuthenticationProvider === true) {
if (enableSqlAuthenticationProvider === true) {
launchArgs.push('--enable-sql-authentication-provider');
}
const enableConnectionPooling = getEnableConnectionPoolingConfig()