diff --git a/src/Accounts/Authentication/KeyStore/StorageWrapper.cs b/src/Accounts/Authentication/KeyStore/StorageWrapper.cs index 869578c62669..a2f9e5f80aff 100644 --- a/src/Accounts/Authentication/KeyStore/StorageWrapper.cs +++ b/src/Accounts/Authentication/KeyStore/StorageWrapper.cs @@ -14,19 +14,13 @@ using Microsoft.Azure.Commands.Common.Authentication.Properties; using Microsoft.Identity.Client.Extensions.Msal; using System; -using System.Collections.Generic; using System.Threading; namespace Microsoft.Azure.Commands.ResourceManager.Common { class StorageWrapper : IStorage { - //fixme: remove linux tag or set as plaintext private const string KeyChainServiceName = "Microsoft.Azure.PowerShell"; - private const string LinuxKeyRingSchema = "Microsoft.Azure.PowerShell"; - private const string LinuxKeyRingCollection = MsalCacheHelper.LinuxKeyRingDefaultCollection; - private static readonly KeyValuePair LinuxKeyRingAttr1 = new KeyValuePair("MsalClientID", "Microsoft.Azure.PowerShell"); - private static readonly KeyValuePair LinuxKeyRingAttr2 = new KeyValuePair("Microsoft.Azure.PowerShell", "1.0.0.0"); public string FileName { get; set; } public string Directory { get; set; } @@ -53,9 +47,7 @@ public IStorage Create() { storageProperties = new StorageCreationPropertiesBuilder(FileName, Directory) .WithMacKeyChain(KeyChainServiceName + ".other_secrets", FileName) - .WithLinuxKeyring(FileName, "default", "KeyStoreCache" - , LinuxKeyRingAttr1, LinuxKeyRingAttr2); - + .WithLinuxUnprotectedFile(); _storage = Storage.Create(storageProperties.Build()); VerifyPersistence(); } @@ -142,6 +134,5 @@ public Exception GetLastError() { return _lastError; } - } }