Add adal deprecated warning upon ADS startup (#23462)

* initial commit, add adal deprecated warning upon ADS startup

* change our to the

* Update extensions/azurecore/src/extension.ts

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>

---------

Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
This commit is contained in:
Christopher Suh
2023-06-26 02:07:24 -07:00
committed by GitHub
parent aa6c5e1513
commit 0042e34617
2 changed files with 9 additions and 1 deletions

View File

@@ -76,6 +76,13 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
const authLibrary: string = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.AuthenticationLibrarySection)
?? Constants.DefaultAuthLibrary;
if (authLibrary !== Constants.DefaultAuthLibrary) {
void vscode.window.showWarningMessage(loc.deprecatedOption, loc.switchMsal, loc.dismiss).then(async (value) => {
if (value === loc.switchMsal) {
await vscode.workspace.getConfiguration(Constants.AzureSection).update(Constants.AuthenticationLibrarySection, Constants.DefaultAuthLibrary, vscode.ConfigurationTarget.Global);
}
});
}
const piiLogging = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.piiLogging, false)
if (piiLogging) {
void vscode.window.showWarningMessage(loc.piiWarning, loc.disable, loc.dismiss).then(async (value) => {

View File

@@ -66,10 +66,11 @@ export const typeIcon = localize('azurecore.typeIcon', "Type Icon");
export const reloadPrompt = localize('azurecore.reloadPrompt', "Authentication Library has changed, please reload Azure Data Studio.");
export const reloadChoice = localize('azurecore.reloadChoice', "Reload Azure Data Studio");
export const deprecatedOption = localize('azurecore.deprecated', "Warning: ADAL has been deprecated, and is scheduled to be removed in a future release. Please use MSAL instead.");
export const deprecatedOption = localize('azurecore.deprecated', "Warning: ADAL has been deprecated, and is scheduled to be removed in the next release. Please use MSAL instead.");
export const piiWarning = localize('azurecore.piiLogging.warning', "Warning: Azure PII Logging is enabled. Enabling this option allows personally identifiable information to be logged and should only be used for debugging purposes.");
export const disable = localize('azurecore.disable', 'Disable');
export const dismiss = localize('azurecore.dismiss', 'Dismiss');
export const switchMsal = localize('azurecore.switchMsal', 'Switch to MSAL');
// Azure Resource Types
export const sqlServer = localize('azurecore.sqlServer', "SQL server");