Skip to content

Commit e550f7f

Browse files
author
msJinLei
committed
Uses unprotected files in Linux
1 parent 6b227ba commit e550f7f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Accounts/Authentication/KeyStore/StorageWrapper.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,13 @@
1414
using Microsoft.Azure.Commands.Common.Authentication.Properties;
1515
using Microsoft.Identity.Client.Extensions.Msal;
1616
using System;
17-
using System.Collections.Generic;
1817
using System.Threading;
1918

2019
namespace Microsoft.Azure.Commands.ResourceManager.Common
2120
{
2221
class StorageWrapper : IStorage
2322
{
24-
//fixme: remove linux tag or set as plaintext
2523
private const string KeyChainServiceName = "Microsoft.Azure.PowerShell";
26-
private const string LinuxKeyRingSchema = "Microsoft.Azure.PowerShell";
27-
private const string LinuxKeyRingCollection = MsalCacheHelper.LinuxKeyRingDefaultCollection;
28-
private static readonly KeyValuePair<string, string> LinuxKeyRingAttr1 = new KeyValuePair<string, string>("MsalClientID", "Microsoft.Azure.PowerShell");
29-
private static readonly KeyValuePair<string, string> LinuxKeyRingAttr2 = new KeyValuePair<string, string>("Microsoft.Azure.PowerShell", "1.0.0.0");
3024

3125
public string FileName { get; set; }
3226
public string Directory { get; set; }
@@ -53,9 +47,7 @@ public IStorage Create()
5347
{
5448
storageProperties = new StorageCreationPropertiesBuilder(FileName, Directory)
5549
.WithMacKeyChain(KeyChainServiceName + ".other_secrets", FileName)
56-
.WithLinuxKeyring(FileName, "default", "KeyStoreCache"
57-
, LinuxKeyRingAttr1, LinuxKeyRingAttr2);
58-
50+
.WithLinuxUnprotectedFile();
5951
_storage = Storage.Create(storageProperties.Build());
6052
VerifyPersistence();
6153
}
@@ -142,6 +134,5 @@ public Exception GetLastError()
142134
{
143135
return _lastError;
144136
}
145-
146137
}
147138
}

0 commit comments

Comments
 (0)