Skip to content

Commit

Permalink
Add adal deprecated warning upon ADS startup (#23462)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
cssuh and cheenamalhotra committed Jun 26, 2023
1 parent aa6c5e1 commit 0042e34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions extensions/azurecore/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
3 changes: 2 additions & 1 deletion extensions/azurecore/src/localizedConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 0042e34

Please sign in to comment.