14
14
using Microsoft . Azure . Commands . Common . Authentication . Properties ;
15
15
using Microsoft . Identity . Client . Extensions . Msal ;
16
16
using System ;
17
- using System . Collections . Generic ;
18
17
using System . Threading ;
19
18
20
19
namespace Microsoft . Azure . Commands . ResourceManager . Common
21
20
{
22
21
class StorageWrapper : IStorage
23
22
{
24
- //fixme: remove linux tag or set as plaintext
25
23
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" ) ;
30
24
31
25
public string FileName { get ; set ; }
32
26
public string Directory { get ; set ; }
@@ -53,9 +47,7 @@ public IStorage Create()
53
47
{
54
48
storageProperties = new StorageCreationPropertiesBuilder ( FileName , Directory )
55
49
. WithMacKeyChain ( KeyChainServiceName + ".other_secrets" , FileName )
56
- . WithLinuxKeyring ( FileName , "default" , "KeyStoreCache"
57
- , LinuxKeyRingAttr1 , LinuxKeyRingAttr2 ) ;
58
-
50
+ . WithLinuxUnprotectedFile ( ) ;
59
51
_storage = Storage . Create ( storageProperties . Build ( ) ) ;
60
52
VerifyPersistence ( ) ;
61
53
}
@@ -142,6 +134,5 @@ public Exception GetLastError()
142
134
{
143
135
return _lastError ;
144
136
}
145
-
146
137
}
147
138
}
0 commit comments