mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Add warning message when pii logging enabled (#22533)
* add warning message when pii logging enabled * fix typo * Update extensions/azurecore/src/localizedConstants.ts Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> * update warning message --------- Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -41,6 +41,8 @@ export const NoSystemKeyChainSection = 'noSystemKeychain';
|
||||
|
||||
export const oldMsalCacheFileName = 'azureTokenCacheMsal-azure_publicCloud';
|
||||
|
||||
export const piiLogging = 'piiLogging';
|
||||
|
||||
/** MSAL Account version */
|
||||
export const AccountVersion = '2.0';
|
||||
|
||||
|
||||
@@ -97,6 +97,15 @@ export async function activate(context: vscode.ExtensionContext): Promise<azurec
|
||||
const authLibrary: string = vscode.workspace.getConfiguration(Constants.AzureSection).get(Constants.AuthenticationLibrarySection)
|
||||
?? Constants.DefaultAuthLibrary;
|
||||
|
||||
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) => {
|
||||
if (value === loc.disable) {
|
||||
await vscode.workspace.getConfiguration(Constants.AzureSection).update(Constants.piiLogging, false, vscode.ConfigurationTarget.Global);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
updatePiiLoggingLevel();
|
||||
|
||||
let eventEmitter: vscode.EventEmitter<azurecore.CacheEncryptionKeys>;
|
||||
|
||||
@@ -66,7 +66,10 @@ 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 a future 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');
|
||||
|
||||
// Azure Resource Types
|
||||
export const sqlServer = localize('azurecore.sqlServer', "SQL server");
|
||||
|
||||
Reference in New Issue
Block a user