diff --git a/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index 4a001ee885ff..33f58f14bb0b 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -19,6 +19,8 @@ --> ## Upcoming Release +* Updated Azure.Core to 1.5.0 (for Az.KeyVault) + ## Version 1.9.2 * Updated `Connect-AzAccount` to accept parameter `MaxContextPopulation` [#9865] * Updated SubscriptionClient version to 2019-06-01 and display tenant domains [#9838] diff --git a/src/Accounts/Authentication/Utilities/CustomAssemblyResolver.cs b/src/Accounts/Authentication/Utilities/CustomAssemblyResolver.cs index ac933cc98c76..c4e4251b6824 100644 --- a/src/Accounts/Authentication/Utilities/CustomAssemblyResolver.cs +++ b/src/Accounts/Authentication/Utilities/CustomAssemblyResolver.cs @@ -10,7 +10,7 @@ public static class CustomAssemblyResolver private static IDictionary NetFxPreloadAssemblies = new Dictionary(StringComparer.InvariantCultureIgnoreCase) { - {"Azure.Core", new Version("1.2.2.0")}, + {"Azure.Core", new Version("1.5.0.0")}, {"Microsoft.Bcl.AsyncInterfaces", new Version("1.0.0.0")}, {"Microsoft.IdentityModel.Clients.ActiveDirectory", new Version("3.19.2.6005")}, {"Microsoft.IdentityModel.Clients.ActiveDirectory.Platform", new Version("3.19.2.6005")}, diff --git a/src/KeyVault/KeyVault/Az.KeyVault.psd1 b/src/KeyVault/KeyVault/Az.KeyVault.psd1 index 15c566724e3d..bcca888d0273 100644 --- a/src/KeyVault/KeyVault/Az.KeyVault.psd1 +++ b/src/KeyVault/KeyVault/Az.KeyVault.psd1 @@ -58,7 +58,8 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '1.9.2'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'Microsoft.Azure.KeyVault.dll', 'Microsoft.Azure.KeyVault.WebKey.dll', - 'Microsoft.Azure.Management.KeyVault.dll' + 'Microsoft.Azure.Management.KeyVault.dll', + 'Azure.Security.KeyVault.Keys.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. # ScriptsToProcess = @() diff --git a/src/KeyVault/KeyVault/Commands/AddAzureKeyVaultKey.cs b/src/KeyVault/KeyVault/Commands/AddAzureKeyVaultKey.cs index 78b8d89123ed..d31dd9c92edd 100644 --- a/src/KeyVault/KeyVault/Commands/AddAzureKeyVaultKey.cs +++ b/src/KeyVault/KeyVault/Commands/AddAzureKeyVaultKey.cs @@ -243,7 +243,8 @@ public override void ExecuteCmdlet() VaultName, Name, CreateKeyAttributes(), - Size); + Size, + null); } else { @@ -300,4 +301,4 @@ internal JsonWebKey CreateWebKeyFromFile() return converterChain.ConvertKeyFromFile(keyFile, KeyFilePassword); } } -} +} \ No newline at end of file diff --git a/src/KeyVault/KeyVault/KeyVault.csproj b/src/KeyVault/KeyVault/KeyVault.csproj index 4c448fe7d6c5..07ec908b56c6 100644 --- a/src/KeyVault/KeyVault/KeyVault.csproj +++ b/src/KeyVault/KeyVault/KeyVault.csproj @@ -12,6 +12,7 @@ + diff --git a/src/KeyVault/KeyVault/Models/DataServiceCredential.cs b/src/KeyVault/KeyVault/Models/DataServiceCredential.cs index 974614f80e0d..e3cfe726e612 100644 --- a/src/KeyVault/KeyVault/Models/DataServiceCredential.cs +++ b/src/KeyVault/KeyVault/Models/DataServiceCredential.cs @@ -18,6 +18,7 @@ using System.Threading.Tasks; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using Microsoft.Azure.Commands.Common.Authentication.Abstractions; +using Microsoft.Rest; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -72,6 +73,11 @@ public string GetToken() return GetTokenInternal(this.TenantId, this._authenticationFactory, this._context, this._endpointName).Item1.AccessToken; } + public IAccessToken GetTokenTemp() // todo rename / refactor + { + return GetTokenInternal(this.TenantId, this._authenticationFactory, this._context, this._endpointName).Item1; + } + private static string GetTenantId(IAzureContext context) { if (context.Account == null) diff --git a/src/KeyVault/KeyVault/Models/IKeyVaultDataServiceClient.cs b/src/KeyVault/KeyVault/Models/IKeyVaultDataServiceClient.cs index 05b2d650e0ec..9999e00c5bdc 100644 --- a/src/KeyVault/KeyVault/Models/IKeyVaultDataServiceClient.cs +++ b/src/KeyVault/KeyVault/Models/IKeyVaultDataServiceClient.cs @@ -24,7 +24,9 @@ namespace Microsoft.Azure.Commands.KeyVault.Models { public interface IKeyVaultDataServiceClient { - PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size); + PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName); + + PSKeyVaultKey CreateManagedHsmKey(string managedHsmName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName); PSKeyVaultKey ImportKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, JsonWebKey webKey, bool? importToHsm); diff --git a/src/KeyVault/KeyVault/Models/KeyVaultCmdletBase.cs b/src/KeyVault/KeyVault/Models/KeyVaultCmdletBase.cs index 1ebf1b83f07e..c12a7b0a0874 100644 --- a/src/KeyVault/KeyVault/Models/KeyVaultCmdletBase.cs +++ b/src/KeyVault/KeyVault/Models/KeyVaultCmdletBase.cs @@ -17,6 +17,7 @@ using System.Linq; using System.Management.Automation; using Microsoft.Azure.Commands.Common.Authentication; +using Microsoft.Azure.Commands.KeyVault.Track2Models; using Microsoft.Azure.Commands.ResourceManager.Common; namespace Microsoft.Azure.Commands.KeyVault.Models @@ -44,7 +45,27 @@ internal IKeyVaultDataServiceClient DataServiceClient } } - protected string GetDefaultFileForOperation( string operationName, string vaultName, string entityName ) + internal IKeyVaultDataServiceClient Track2DataClient + { + + get + { + if (_track2DataServiceClient == null) + { + _track2DataServiceClient = new Track2KeyVaultDataServiceClient( + AzureSession.Instance.AuthenticationFactory, + DefaultContext); + } + + return _track2DataServiceClient; + } + set + { + _track2DataServiceClient = value; + } + } + + protected string GetDefaultFileForOperation(string operationName, string vaultName, string entityName) { // caller is responsible for parameter validation var currentPath = CurrentPath(); @@ -54,6 +75,7 @@ protected string GetDefaultFileForOperation( string operationName, string vaultN } private IKeyVaultDataServiceClient dataServiceClient; + private IKeyVaultDataServiceClient _track2DataServiceClient; /// /// Utility function that will continually iterate over the updated KeyVaultObjectFilterOptions until the options @@ -70,7 +92,7 @@ protected void GetAndWriteObjects(KeyVaultObjectFilterOptions options, WriteObject(pageResults, true); } while (!string.IsNullOrEmpty(options.NextLink)); } - + public List KVSubResourceWildcardFilter(string name, IEnumerable resources) { if (!string.IsNullOrEmpty(name)) diff --git a/src/KeyVault/KeyVault/Models/KeyVaultDataServiceClient.cs b/src/KeyVault/KeyVault/Models/KeyVaultDataServiceClient.cs index 8cc3d7af384d..0b2b8fdf319a 100644 --- a/src/KeyVault/KeyVault/Models/KeyVaultDataServiceClient.cs +++ b/src/KeyVault/KeyVault/Models/KeyVaultDataServiceClient.cs @@ -56,7 +56,7 @@ public KeyVaultDataServiceClient() { } - public PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size) + public PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) { if (string.IsNullOrEmpty(vaultName)) throw new ArgumentNullException(nameof(vaultName)); @@ -2002,6 +2002,11 @@ public PSKeyVaultManagedStorageAccount RestoreManagedStorageAccount(string vault return new PSKeyVaultManagedStorageAccount(storageAccountBundle, this.vaultUriHelper); } + public PSKeyVaultKey CreateManagedHsmKey(string managedHsmName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + throw new NotImplementedException("Creating keys on managed HSM is only possible in track 2 SDK."); + } + private VaultUriHelper vaultUriHelper; private KeyVaultClient keyVaultClient; } diff --git a/src/KeyVault/KeyVault/Models/PSKeyVaultKey.cs b/src/KeyVault/KeyVault/Models/PSKeyVaultKey.cs index 9ea49a57bfd0..d74106b509c6 100644 --- a/src/KeyVault/KeyVault/Models/PSKeyVaultKey.cs +++ b/src/KeyVault/KeyVault/Models/PSKeyVaultKey.cs @@ -16,6 +16,7 @@ using System; using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; using System.Linq; +using Track2Sdk = Azure.Security.KeyVault.Keys; namespace Microsoft.Azure.Commands.KeyVault.Models { @@ -24,7 +25,7 @@ public class PSKeyVaultKey : PSKeyVaultKeyIdentityItem public PSKeyVaultKey() { } - internal PSKeyVaultKey(Azure.KeyVault.Models.KeyBundle keyBundle, VaultUriHelper vaultUriHelper) + internal PSKeyVaultKey(Microsoft.Azure.KeyVault.Models.KeyBundle keyBundle, VaultUriHelper vaultUriHelper) { if (keyBundle == null) throw new ArgumentNullException("keyBundle"); @@ -36,9 +37,9 @@ internal PSKeyVaultKey(Azure.KeyVault.Models.KeyBundle keyBundle, VaultUriHelper Key = keyBundle.Key; Attributes = new PSKeyVaultKeyAttributes( keyBundle.Attributes.Enabled, - keyBundle.Attributes.Expires, - keyBundle.Attributes.NotBefore, - keyBundle.Key.Kty, + keyBundle.Attributes.Expires, + keyBundle.Attributes.NotBefore, + keyBundle.Key.Kty, keyBundle.Key.KeyOps.ToArray(), keyBundle.Attributes.Created, keyBundle.Attributes.Updated, @@ -54,6 +55,38 @@ internal PSKeyVaultKey(Azure.KeyVault.Models.KeyBundle keyBundle, VaultUriHelper Tags = (keyBundle.Tags == null) ? null : keyBundle.Tags.ConvertToHashtable(); } + internal PSKeyVaultKey(Track2Sdk.KeyVaultKey key, VaultUriHelper vaultUriHelper) + { + if (key == null) + throw new ArgumentNullException("key"); + if (key.Key == null || key.Properties == null) + throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyBundle); + + SetObjectIdentifier(vaultUriHelper, new Microsoft.Azure.KeyVault.KeyIdentifier(key.Id.ToString())); + + Key = key.Key.ToTrack1JsonWebKey(); + Attributes = new PSKeyVaultKeyAttributes( + key.Properties.Enabled, + /// see https://docs.microsoft.com/en-us/dotnet/standard/datetime/converting-between-datetime-and-offset#conversions-from-datetimeoffset-to-datetime + key.Properties.ExpiresOn?.UtcDateTime, // time returned by key vault are UTC + key.Properties.NotBefore?.UtcDateTime, + key.KeyType.ToString(), + key.KeyOperations.Select(op => op.ToString()).ToArray(), + key.Properties.CreatedOn?.UtcDateTime, + key.Properties.UpdatedOn?.UtcDateTime, + key.Properties.RecoveryLevel, + key.Properties.Tags + ); + + Enabled = key.Properties.Enabled; + Expires = key.Properties.ExpiresOn?.UtcDateTime; + NotBefore = key.Properties.NotBefore?.UtcDateTime; + Created = key.Properties.CreatedOn?.UtcDateTime; + Updated = key.Properties.UpdatedOn?.UtcDateTime; + RecoveryLevel = key.Properties.RecoveryLevel; + Tags = key.Properties.Tags.ConvertToHashtable(); + } + public PSKeyVaultKeyAttributes Attributes { get; set; } public JsonWebKey Key { get; set; } diff --git a/src/KeyVault/KeyVault/Models/VaultUriHelper.cs b/src/KeyVault/KeyVault/Models/VaultUriHelper.cs index 26edd3af9248..01d18f35e180 100644 --- a/src/KeyVault/KeyVault/Models/VaultUriHelper.cs +++ b/src/KeyVault/KeyVault/Models/VaultUriHelper.cs @@ -20,11 +20,15 @@ namespace Microsoft.Azure.Commands.KeyVault.Models { internal class VaultUriHelper { - public VaultUriHelper(string keyVaultDnsSuffix) + // it doesn't matter if this class acts as a vault uri helper or hsm uri helper + // the logic is basically the same + // todo: combine them together + public VaultUriHelper(string keyVaultDnsSuffix, string managedHsmDnsSuffix = null) { if (string.IsNullOrEmpty(keyVaultDnsSuffix)) throw new ArgumentNullException("keyVaultDnsSuffix"); this.KeyVaultDnsSuffix = keyVaultDnsSuffix; + ManagedHsmDnsSuffix = managedHsmDnsSuffix; } public string GetVaultName(string vaultAddress) @@ -39,6 +43,7 @@ public String CreateVaultAddress(string vaultName) } public string KeyVaultDnsSuffix { get; private set; } + public string ManagedHsmDnsSuffix { get; private set; } private Uri CreateAndValidateVaultUri(string vaultAddress) { @@ -56,7 +61,7 @@ private Uri CreateAndValidateVaultUri(string vaultAddress) return vaultUri; } - private Uri CreateVaultUri(string vaultName) + public Uri CreateVaultUri(string vaultName) { if (string.IsNullOrEmpty(vaultName)) throw new ArgumentNullException("vaultName"); @@ -65,5 +70,15 @@ private Uri CreateVaultUri(string vaultName) return builder.Uri; } + + public Uri CreateManagedHsmUri(string name) + { + if (string.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + UriBuilder builder = new UriBuilder("https", name+ "." + ManagedHsmDnsSuffix); + + return builder.Uri; + } } } diff --git a/src/KeyVault/KeyVault/Track2Models/Track2HsmClient.cs b/src/KeyVault/KeyVault/Track2Models/Track2HsmClient.cs new file mode 100644 index 000000000000..8658143e3ee0 --- /dev/null +++ b/src/KeyVault/KeyVault/Track2Models/Track2HsmClient.cs @@ -0,0 +1,81 @@ +using Azure.Security.KeyVault.Keys; +using Microsoft.Azure.Commands.Common.Authentication.Abstractions; +using Microsoft.Azure.Commands.KeyVault.Models; +using System; +using System.Collections; + +namespace Microsoft.Azure.Commands.KeyVault.Track2Models +{ + internal class Track2HsmClient + { + private Track2TokenCredential _credential; + private VaultUriHelper _uriHelper; + private KeyClient CreateKeyClient(string hsmName) => new KeyClient(_uriHelper.CreateVaultUri(hsmName), _credential); + + public Track2HsmClient(IAuthenticationFactory authFactory, IAzureContext context) + { + _credential = new Track2TokenCredential(new DataServiceCredential(authFactory, context, AzureEnvironment.ExtendedEndpoint.ManagedHsmServiceEndpointResourceId)); + _uriHelper = new VaultUriHelper(context.Environment.GetEndpoint(AzureEnvironment.ExtendedEndpoint.ManagedHsmServiceEndpointSuffix)); + } + + internal PSKeyVaultKey CreateKey(string managedHsmName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + var client = CreateKeyClient(managedHsmName); + return CreateKey(client, keyName, keyAttributes, size, curveName); + } + + private PSKeyVaultKey CreateKey(KeyClient client, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + // todo duplicated code with Track2VaultClient.CreateKey + CreateKeyOptions options; + bool isHsm = keyAttributes.KeyType == KeyType.RsaHsm || keyAttributes.KeyType == KeyType.EcHsm; + + if (keyAttributes.KeyType == KeyType.Rsa || keyAttributes.KeyType == KeyType.RsaHsm) + { + options = new CreateRsaKeyOptions(keyName, isHsm) { KeySize = size }; + } + else if (keyAttributes.KeyType == KeyType.Ec || keyAttributes.KeyType == KeyType.EcHsm) + { + options = new CreateEcKeyOptions(keyName, isHsm) { CurveName = string.IsNullOrEmpty(curveName) ? null : new KeyCurveName(curveName) }; + } + else + { + options = new CreateKeyOptions(); + } + options.NotBefore = keyAttributes.NotBefore; + options.ExpiresOn = keyAttributes.Expires; + options.Enabled = keyAttributes.Enabled; + if (keyAttributes.KeyOps != null) + { + foreach (var keyOp in keyAttributes.KeyOps) + { + options.KeyOperations.Add(new KeyOperation(keyOp)); + } + } + if (keyAttributes.Tags != null) + { + foreach (DictionaryEntry entry in keyAttributes.Tags) + { + options.Tags.Add(entry.Key.ToString(), entry.Value.ToString()); + } + } + + if (keyAttributes.KeyType == KeyType.Rsa || keyAttributes.KeyType == KeyType.RsaHsm) + { + return new PSKeyVaultKey(client.CreateRsaKey(options as CreateRsaKeyOptions).Value, _uriHelper); + } + else if (keyAttributes.KeyType == KeyType.Ec || keyAttributes.KeyType == KeyType.EcHsm) + { + return new PSKeyVaultKey(client.CreateEcKey(options as CreateEcKeyOptions).Value, _uriHelper); + } + else if (keyAttributes.KeyType == KeyType.Oct || keyAttributes.KeyType.ToString() == "oct-HSM") + { + return new PSKeyVaultKey(client.CreateKey(keyName, KeyType.Oct, options).Value, _uriHelper); + } + else + { + throw new NotSupportedException($"{keyAttributes.KeyType} is not supported"); + } + } + } +} diff --git a/src/KeyVault/KeyVault/Track2Models/Track2KeyVaultDataServiceClient.cs b/src/KeyVault/KeyVault/Track2Models/Track2KeyVaultDataServiceClient.cs new file mode 100644 index 000000000000..8414305ace41 --- /dev/null +++ b/src/KeyVault/KeyVault/Track2Models/Track2KeyVaultDataServiceClient.cs @@ -0,0 +1,395 @@ +using Azure.Security.KeyVault.Keys; +using Microsoft.Azure.Commands.Common.Authentication.Abstractions; +using Microsoft.Azure.Commands.KeyVault.Models; +using Microsoft.Azure.Commands.KeyVault.Track2Models; +using Microsoft.Azure.KeyVault.Models; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Security; +using System.Security.Cryptography.X509Certificates; +using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; + +namespace Microsoft.Azure.Commands.KeyVault.Track2Models +{ + internal class Track2KeyVaultDataServiceClient : IKeyVaultDataServiceClient + { + public Track2KeyVaultDataServiceClient(IAuthenticationFactory authFactory, IAzureContext context) + { + _authFactory = authFactory ?? throw new ArgumentNullException(nameof(authFactory)); + _context = context ?? throw new ArgumentNullException(nameof(context)); + + if (context.Environment == null) + { + throw new ArgumentException(KeyVaultProperties.Resources.InvalidAzureEnvironment); + } + } + + private IAuthenticationFactory _authFactory; + private IAzureContext _context; + + /// + /// For lazy instanciating. Please use properties instead of fields. + /// + private Track2VaultClient VaultClient => _vaultClient ?? (_vaultClient = new Track2VaultClient(_authFactory, _context)); + private Track2HsmClient HsmClient => _hsmClient ?? (_hsmClient = new Track2HsmClient(_authFactory, _context)); + + private Track2VaultClient _vaultClient; + private Track2HsmClient _hsmClient; + + public string BackupCertificate(string vaultName, string certificateName, string outputBlobPath) + { + throw new NotImplementedException(); + } + + public string BackupKey(string vaultName, string keyName, string outputBlobPath) + { + throw new NotImplementedException(); + } + + public string BackupManagedStorageAccount(string vaultName, string managedStorageAccountName, string outputBlobPath) + { + throw new NotImplementedException(); + } + + public string BackupSecret(string vaultName, string secretName, string outputBlobPath) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateOperation CancelCertificateOperation(string vaultName, string certificateName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + return VaultClient.CreateKey(vaultName, keyName, keyAttributes, size, curveName); + } + + public PSKeyVaultKey CreateManagedHsmKey(string managedHsmName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + return HsmClient.CreateKey(managedHsmName, keyName, keyAttributes, size, curveName); + } + + public PSDeletedKeyVaultCertificate DeleteCertificate(string vaultName, string certName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateIssuer DeleteCertificateIssuer(string vaultName, string issuerName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateOperation DeleteCertificateOperation(string vaultName, string certificateName) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultKey DeleteKey(string vaultName, string keyName) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultManagedStorageAccount DeleteManagedStorageAccount(string vaultName, string managedStorageAccountName) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultManagedStorageSasDefinition DeleteManagedStorageSasDefinition(string vaultName, string managedStorageAccountName, string sasDefinitionName) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultSecret DeleteSecret(string vaultName, string secretName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateOperation EnrollCertificate(string vaultName, string certificateName, CertificatePolicy certificatePolicy, IDictionary tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate GetCertificate(string vaultName, string certName, string certificateVersion) + { + throw new NotImplementedException(); + } + + public IEnumerable GetCertificateContacts(string vaultName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateIssuer GetCertificateIssuer(string vaultName, string issuerName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetCertificateIssuers(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateOperation GetCertificateOperation(string vaultName, string certificateName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificatePolicy GetCertificatePolicy(string vaultName, string certificateName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetCertificates(KeyVaultCertificateFilterOptions options) + { + throw new NotImplementedException(); + } + + public IEnumerable GetCertificateVersions(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultCertificate GetDeletedCertificate(string vaultName, string certName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetDeletedCertificates(KeyVaultCertificateFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultKey GetDeletedKey(string vaultName, string name) + { + throw new NotImplementedException(); + } + + public IEnumerable GetDeletedKeys(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultManagedStorageAccount GetDeletedManagedStorageAccount(string vaultName, string managedStorageAccountName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetDeletedManagedStorageAccounts(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultManagedStorageSasDefinition GetDeletedManagedStorageSasDefinition(string vaultName, string managedStorageAccountName, string sasDefinitionName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetDeletedManagedStorageSasDefinitions(KeyVaultStorageSasDefinitiontFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSDeletedKeyVaultSecret GetDeletedSecret(string vaultName, string name) + { + throw new NotImplementedException(); + } + + public IEnumerable GetDeletedSecrets(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey GetKey(string vaultName, string keyName, string keyVersion) + { + throw new NotImplementedException(); + } + + public IEnumerable GetKeys(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public IEnumerable GetKeyVersions(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount GetManagedStorageAccount(string vaultName, string managedStorageAccountName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetManagedStorageAccounts(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageSasDefinition GetManagedStorageSasDefinition(string vaultName, string managedStorageAccountName, string sasDefinitionName) + { + throw new NotImplementedException(); + } + + public IEnumerable GetManagedStorageSasDefinitions(KeyVaultStorageSasDefinitiontFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultSecret GetSecret(string vaultName, string secretName, string secretVersion) + { + throw new NotImplementedException(); + } + + public IEnumerable GetSecrets(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public IEnumerable GetSecretVersions(KeyVaultObjectFilterOptions options) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate ImportCertificate(string vaultName, string certName, string base64CertColl, SecureString certPassword, IDictionary tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate ImportCertificate(string vaultName, string certName, X509Certificate2Collection certificateCollection, IDictionary tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey ImportKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, Microsoft.Azure.KeyVault.WebKey.JsonWebKey webKey, bool? importToHsm) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate MergeCertificate(string vaultName, string certName, X509Certificate2Collection certs, IDictionary tags) + { + throw new NotImplementedException(); + } + + public void PurgeCertificate(string vaultName, string certName) + { + throw new NotImplementedException(); + } + + public void PurgeKey(string vaultName, string name) + { + throw new NotImplementedException(); + } + + public void PurgeManagedStorageAccount(string vaultName, string managedStorageAccountName) + { + throw new NotImplementedException(); + } + + public void PurgeSecret(string vaultName, string secretName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate RecoverCertificate(string vaultName, string certName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey RecoverKey(string vaultName, string keyName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount RecoverManagedStorageAccount(string vaultName, string deletedManagedStorageAccountName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageSasDefinition RecoverManagedStorageSasDefinition(string vaultname, string managedStorageAccountName, string sasDefinitionName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultSecret RecoverSecret(string vaultName, string secretName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount RegenerateManagedStorageAccountKey(string vaultName, string managedStorageAccountName, string keyName) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate RestoreCertificate(string vaultName, string inputBlobPath) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey RestoreKey(string vaultName, string inputBlobPath) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount RestoreManagedStorageAccount(string vaultName, string inputBlobPath) + { + throw new NotImplementedException(); + } + + public PSKeyVaultSecret RestoreSecret(string vaultName, string inputBlobPath) + { + throw new NotImplementedException(); + } + + public IEnumerable SetCertificateContacts(string vaultName, IEnumerable contacts) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificateIssuer SetCertificateIssuer(string vaultName, string issuerName, string issuerProvider, string accountId, SecureString apiKey, PSKeyVaultCertificateOrganizationDetails organizationDetails) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount SetManagedStorageAccount(string vaultName, string managedStorageAccountName, string storageResourceId, string activeKeyName, bool? autoRegenerateKey, TimeSpan? regenerationPeriod, PSKeyVaultManagedStorageAccountAttributes managedStorageAccountAttributes, Hashtable tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageSasDefinition SetManagedStorageSasDefinition(string vaultName, string managedStorageAccountName, string sasDefinitionName, string templateUri, string sasType, string validityPeriod, PSKeyVaultManagedStorageSasDefinitionAttributes sasDefinitionAttributes, Hashtable tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultSecret SetSecret(string vaultName, string secretName, SecureString secretValue, PSKeyVaultSecretAttributes secretAttributes) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificate UpdateCertificate(string vaultName, string certificateName, string certificateVersion, CertificateAttributes certificateAttributes, IDictionary tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultCertificatePolicy UpdateCertificatePolicy(string vaultName, string certificateName, CertificatePolicy certificatePolicy) + { + throw new NotImplementedException(); + } + + public PSKeyVaultKey UpdateKey(string vaultName, string keyName, string keyVersion, PSKeyVaultKeyAttributes keyAttributes) + { + throw new NotImplementedException(); + } + + public PSKeyVaultManagedStorageAccount UpdateManagedStorageAccount(string vaultName, string managedStorageAccountName, string activeKeyName, bool? autoRegenerateKey, TimeSpan? regenerationPeriod, PSKeyVaultManagedStorageAccountAttributes managedStorageAccountAttributes, Hashtable tags) + { + throw new NotImplementedException(); + } + + public PSKeyVaultSecret UpdateSecret(string vaultName, string secretName, string secretVersion, PSKeyVaultSecretAttributes secretAttributes) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/src/KeyVault/KeyVault/Track2Models/Track2ModelConvertionExtensions.cs b/src/KeyVault/KeyVault/Track2Models/Track2ModelConvertionExtensions.cs new file mode 100644 index 000000000000..670cbc489bf7 --- /dev/null +++ b/src/KeyVault/KeyVault/Track2Models/Track2ModelConvertionExtensions.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Track2Sdk = Azure.Security.KeyVault.Keys; +using Track1Sdk = Microsoft.Azure.KeyVault.WebKey; +using System.Security.Cryptography; + +namespace Microsoft.Azure.Commands.KeyVault +{ + internal static class Track2ModelConvertionExtensions + { + /// + /// Converts a track 2 JsonWebKey object to track 1 type + /// + /// track 2 key + /// equivalent track 1 key + public static Track1Sdk.JsonWebKey ToTrack1JsonWebKey(this Track2Sdk.JsonWebKey track2Key) + { + Track1Sdk.JsonWebKey track1Key; + + // convert key specific properties + if (track2Key.KeyType == Track2Sdk.KeyType.Ec || track2Key.KeyType == Track2Sdk.KeyType.EcHsm) + { + track1Key = new Track1Sdk.JsonWebKey(new Track1Sdk.ECParameters() + { + Curve = track2Key.CurveName.ToString(), + X = track2Key.X, + Y = track2Key.Y, + D = track2Key.D + }); + } + else if (track2Key.KeyType == Track2Sdk.KeyType.Rsa || track2Key.KeyType == Track2Sdk.KeyType.RsaHsm) + { + track1Key = new Track1Sdk.JsonWebKey(track2Key.ToRSA()); + } + // SDK doesn't have a definition of OctHSM, so I need to use string comparison + else if (track2Key.KeyType == Track2Sdk.KeyType.Oct || track2Key.KeyType.ToString() == @"oct-HSM") + { + // Track2 JsonWebKey.ToAes() requires key type to be oct only, but hsm always return the type as oct-HSM + // so I manually take care of the conversion + // however K is always null + // todo: check with Ma Bin + Aes aes = Aes.Create(); + aes.Key = track2Key.K; + track1Key = new Track1Sdk.JsonWebKey(aes); + } + else + { + throw new Exception("Not supported"); + } + + // metadata + track1Key.KeyOps = new List(); + foreach (var op in track2Key.KeyOps) + { + track1Key.KeyOps.Add(op.ToString()); + } + track1Key.Kid = track2Key.Id; + + return track1Key; + } + } +} diff --git a/src/KeyVault/KeyVault/Track2Models/Track2TokenCredential.cs b/src/KeyVault/KeyVault/Track2Models/Track2TokenCredential.cs new file mode 100644 index 000000000000..5a30578274d0 --- /dev/null +++ b/src/KeyVault/KeyVault/Track2Models/Track2TokenCredential.cs @@ -0,0 +1,28 @@ +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Microsoft.Azure.Commands.KeyVault.Models; + +namespace Microsoft.Azure.Commands.KeyVault.Track2Models +{ + internal class Track2TokenCredential : TokenCredential + { + private readonly DataServiceCredential dataServiceCredential; + + public Track2TokenCredential(DataServiceCredential dataServiceCredential) + { + this.dataServiceCredential = dataServiceCredential; + } + + public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) + { + return new AccessToken(dataServiceCredential.GetToken(), DateTimeOffset.UtcNow); + } + + public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) + { + return new ValueTask(this.GetToken(requestContext, cancellationToken)); + } + } +} \ No newline at end of file diff --git a/src/KeyVault/KeyVault/Track2Models/Track2VaultClient.cs b/src/KeyVault/KeyVault/Track2Models/Track2VaultClient.cs new file mode 100644 index 000000000000..9cd484037069 --- /dev/null +++ b/src/KeyVault/KeyVault/Track2Models/Track2VaultClient.cs @@ -0,0 +1,84 @@ +using Azure.Security.KeyVault.Keys; +using Microsoft.Azure.Commands.Common.Authentication.Abstractions; +using Microsoft.Azure.Commands.KeyVault.Models; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Azure.Commands.KeyVault.Track2Models +{ + internal class Track2VaultClient + { + public Track2VaultClient(IAuthenticationFactory authFactory, IAzureContext context) + { + _credential = new Track2TokenCredential(new DataServiceCredential(authFactory, context, AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId)); + _vaultUriHelper = new VaultUriHelper(context.Environment.GetEndpoint(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix)); + } + + private Track2TokenCredential _credential; + private VaultUriHelper _vaultUriHelper; + + // After a track 2 client is created, the vault / hsm uri associated to it cannot be changed + // however azure powershell may deal with multiple vaults / hsms + // so I choose to create a new client for every new request + // todo: consider caching clients + private KeyClient CreateKeyClient(string vaultName) => new KeyClient(_vaultUriHelper.CreateVaultUri(vaultName), _credential); + + internal PSKeyVaultKey CreateKey(string vaultName, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + var client = CreateKeyClient(vaultName); + return CreateKey(client, keyName, keyAttributes, size, curveName); + } + + private PSKeyVaultKey CreateKey(KeyClient client, string keyName, PSKeyVaultKeyAttributes keyAttributes, int? size, string curveName) + { + CreateKeyOptions options; + bool isHsm = keyAttributes.KeyType == KeyType.RsaHsm || keyAttributes.KeyType == KeyType.EcHsm; + + if (keyAttributes.KeyType == KeyType.Rsa || keyAttributes.KeyType == KeyType.RsaHsm) + { + options = new CreateRsaKeyOptions(keyName, isHsm) { KeySize = size }; + } + else if (keyAttributes.KeyType == KeyType.Ec || keyAttributes.KeyType == KeyType.EcHsm) + { + options = new CreateEcKeyOptions(keyName, isHsm) { CurveName = string.IsNullOrEmpty(curveName) ? null : new KeyCurveName(curveName) }; + } + else + { + // oct (AES) is only supported by managed HSM + throw new NotSupportedException($"{keyAttributes.KeyType} is not supported"); + } + options.NotBefore = keyAttributes.NotBefore; + options.ExpiresOn = keyAttributes.Expires; + options.Enabled = keyAttributes.Enabled; + if (keyAttributes.KeyOps != null) + { + foreach (var keyOp in keyAttributes.KeyOps) + { + options.KeyOperations.Add(new KeyOperation(keyOp)); + } + } + if (keyAttributes.Tags != null) + { + foreach (DictionaryEntry entry in keyAttributes.Tags) + { + options.Tags.Add(entry.Key.ToString(), entry.Value.ToString()); + } + } + + if (keyAttributes.KeyType == KeyType.Rsa || keyAttributes.KeyType == KeyType.RsaHsm) + { + return new PSKeyVaultKey(client.CreateRsaKey(options as CreateRsaKeyOptions).Value, _vaultUriHelper); + } + else if (keyAttributes.KeyType == KeyType.Ec || keyAttributes.KeyType == KeyType.EcHsm) + { + return new PSKeyVaultKey(client.CreateEcKey(options as CreateEcKeyOptions).Value, _vaultUriHelper); + } + else + { + throw new NotSupportedException($"{keyAttributes.KeyType} is not supported"); + } + } + } +} diff --git a/src/lib/NetCorePreloadAssemblies/Azure.Core.dll b/src/lib/NetCorePreloadAssemblies/Azure.Core.dll index fba773755864..9677f6218361 100644 Binary files a/src/lib/NetCorePreloadAssemblies/Azure.Core.dll and b/src/lib/NetCorePreloadAssemblies/Azure.Core.dll differ diff --git a/src/lib/NetFxPreloadAssemblies/Azure.Core.dll b/src/lib/NetFxPreloadAssemblies/Azure.Core.dll index fba773755864..9677f6218361 100644 Binary files a/src/lib/NetFxPreloadAssemblies/Azure.Core.dll and b/src/lib/NetFxPreloadAssemblies/Azure.Core.dll differ diff --git a/src/lib/PreloadAssemblyInfo.json b/src/lib/PreloadAssemblyInfo.json index 1402cba825fa..11d66d67d9f9 100644 --- a/src/lib/PreloadAssemblyInfo.json +++ b/src/lib/PreloadAssemblyInfo.json @@ -1,6 +1,6 @@ { "netfx": { - "Azure.Core": "1.2.1.0", + "Azure.Core": "1.5.0.0", "Microsoft.Bcl.AsyncInterfaces": "1.0.0.0", "Microsoft.IdentityModel.Clients.ActiveDirectory": "3.19.2.6005", "Microsoft.IdentityModel.Clients.ActiveDirectory.Platform": "3.19.2.6005", @@ -23,7 +23,7 @@ "System.Xml.ReaderWriter": "4.1.0.0" }, "netcore": { - "Azure.Core": "1.2.1.0", + "Azure.Core": "1.5.0.0", "Microsoft.Bcl.AsyncInterfaces": "1.0.0.0", "Microsoft.IdentityModel.Clients.ActiveDirectory": "3.19.2.6005", "Microsoft.IdentityModel.Clients.ActiveDirectory.Platform": "3.19.2.6005", diff --git a/tools/Common.Netcore.Dependencies.targets b/tools/Common.Netcore.Dependencies.targets index d4286cbd90f9..c3b8eff713c4 100644 --- a/tools/Common.Netcore.Dependencies.targets +++ b/tools/Common.Netcore.Dependencies.targets @@ -3,21 +3,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -32,7 +32,7 @@ - $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.3.20-preview\tools\ + $(NugetPackageRoot)\microsoft.azure.powershell.storage\1.5.8-preview\tools\ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.nupkg new file mode 100644 index 000000000000..7dc0b048a969 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..3b241779e11c Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Authentication.Abstractions.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.nupkg new file mode 100644 index 000000000000..3d30cc549d4b Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..0f4655630dac Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Aks.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.nupkg new file mode 100644 index 000000000000..222750363d82 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..885deff5ef04 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Authorization.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.nupkg new file mode 100644 index 000000000000..7b7579dc8733 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..20015d79b2dc Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Compute.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.nupkg new file mode 100644 index 000000000000..f68f88827e96 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..3ee9427b450d Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.nupkg new file mode 100644 index 000000000000..843760758805 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..1d1498c2eabf Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.KeyVault.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.nupkg new file mode 100644 index 000000000000..529463fc7b57 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..1934168736c7 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Monitor.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.nupkg new file mode 100644 index 000000000000..b9fc4c5116c5 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..13bda766fd1a Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Network.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.nupkg new file mode 100644 index 000000000000..afc84d552cb3 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..ec79161d3cf2 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.PolicyInsights.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.nupkg new file mode 100644 index 000000000000..311f8736f785 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..082bf335cf6a Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.ResourceManager.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.nupkg new file mode 100644 index 000000000000..7851d515c1cd Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..0e4ce6098253 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Storage.Management.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.nupkg new file mode 100644 index 000000000000..200279c531ab Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..dae6260b8db5 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Clients.Websites.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.nupkg new file mode 100644 index 000000000000..894979e1abca Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..527209476cff Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Common.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.nupkg new file mode 100644 index 000000000000..1cf2854eb4bb Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..852e0272d71c Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Storage.1.5.8-preview.symbols.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.nupkg new file mode 100644 index 000000000000..53dcd5d0e181 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.nupkg differ diff --git a/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.symbols.nupkg b/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.symbols.nupkg new file mode 100644 index 000000000000..d9bd6f697c44 Binary files /dev/null and b/tools/LocalFeed/Microsoft.Azure.PowerShell.Strategies.1.5.8-preview.symbols.nupkg differ diff --git a/tools/StaticAnalysis/Exceptions/Az.KeyVault/MissingAssemblies.csv b/tools/StaticAnalysis/Exceptions/Az.KeyVault/MissingAssemblies.csv index 2b47e3bc04b0..255e975a7da4 100644 --- a/tools/StaticAnalysis/Exceptions/Az.KeyVault/MissingAssemblies.csv +++ b/tools/StaticAnalysis/Exceptions/Az.KeyVault/MissingAssemblies.csv @@ -1,3 +1,4 @@ "Directory","Assembly Name","Assembly Version","Referencing Assembly","Severity","ProblemId","Description","Remediation" "Az.KeyVault","Microsoft.Win32.Registry","4.1.1.0","System.Management.Automation","0","3000","Missing assembly Microsoft.Win32.Registry referenced from System.Management.Automation","Ensure that the assembly is included in the Wix file or directory" "Az.KeyVault","Microsoft.PowerShell.CoreCLR.Eventing","6.1.0.0","System.Management.Automation","0","3000","Missing assembly Microsoft.PowerShell.CoreCLR.Eventing referenced from System.Management.Automation","Ensure that the assembly is included in the Wix file or directory" +"Az.KeyVault","System.Text.Encodings.Web","4.0.4.0","Azure.Security.KeyVault.Keys","0","3000","Missing assembly System.Text.Encodings.Web referenced from Azure.Security.KeyVault.Keys","Ensure that the assembly is included in the Wix file or directory"