From 3f1065f5412b5d1b3aff6c587243311ca3807a37 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 18 Aug 2020 17:18:19 -0500 Subject: [PATCH 01/16] samples - pre-recordings --- .../samples/README.md | 2 + .../samples/Sample1_BackupHelloWorldAsync.md | 69 ++++++++++ .../samples/Sample1_BackupHelloWorldSync.md | 78 +++++++++++ .../samples/Sample1_RbacHelloWorldAsync.md | 1 + .../samples/Sample1_RbacHelloWorldSync.md | 2 + .../tests/BackupRestoreTestBase.cs | 13 +- ...pets.cs => AccessControlSampleSnippets.cs} | 6 +- .../tests/samples/Sample1_BackupHelloWorld.cs | 124 ++++++++++++++++++ 8 files changed, 287 insertions(+), 8 deletions(-) create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md rename sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/{SampleSnippets.cs => AccessControlSampleSnippets.cs} (94%) create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/README.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/README.md index 64504851252d9..8340b59e1d9e0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/README.md @@ -13,3 +13,5 @@ description: Samples for the Azure.Security.KeyVault.Administration client libra - Creating, getting, and deleting role assignments [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md) or [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md) - [Assigning roles for specific scopes](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md) +- Performing a full key backup and restore [synchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md) and [asynchronously](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md) +- [Performing selective key restore] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md new file mode 100644 index 0000000000000..df0d12852910c --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -0,0 +1,69 @@ +# Performing a full key backup and restore (Async) + +This sample demonstrates how to a full key backup and restore in Azure Key Vault. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. + +## Creating a KeyVaultBackupClient + +To create a new `KeyVaultBackupClient`, you'll need the endpoint to an Azure Key Vault and credentials. +You can use the [DefaultAzureCredential][DefaultAzureCredential] to try a number of common authentication methods optimized for both running as a service and development. + +In the sample below, you can set `keyVaultUrl` based on an environment variable, configuration setting, or any way that works for your application. + +```C# Snippet:HelloCreateKeyVaultBackupClient +KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new DefaultAzureCredential()); +``` + +## Performing a full key backup + +Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) + +To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_keyvault) and [Creating a key](creating_key) samples. + +In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. + +```C# Snippet:HelloFullBackupAsync +// Create a Uri with the storage container +UriBuilder builder = new UriBuilder(blobStorageUrl) +{ + Path = blobContainerName, +}; + +// Start the backup. +BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); + +// Wait for completion of the BackupOperation. +var backupResult = await backupOperation.WaitForCompletionAsync(); + +// Get the Uri for the location of you backup blob. +Uri backupBlobUri = backupResult.Value; +``` + +## Performing a full key restore + +Using the `KeyVaultBackupClient`, you can restore your entire collection of keys from backup. The data source for full key restore is a storage blob accessed using Shared Access Signature authentication. +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) + +```C# Snippet:HelloFullRestoreAsync +// Get the folder name from the backupBlobUri returned from a previous BackupOperation +var uriSegments = backupBlobUri.Segments; +string folderName = uriSegments[uriSegments.Length - 1]; + +// Start the restore. +RestoreOperation restoreOperation = await Client.StartRestoreAsync(builder.Uri, sasToken, folderName); + +// Wait for completion of the RestoreOperation. +var restoreResult = await restoreOperation.WaitForCompletionAsync(); +``` + + +[DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md +[creating_keyvault]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclient +[creating_key]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key +[blob_readme]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md +[blob_auth]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs +[storage_explorer_sas]: https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md new file mode 100644 index 0000000000000..b0ace850e5ff7 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -0,0 +1,78 @@ +# Performing a full key backup and restore (Sync) + +This sample demonstrates how to a full key backup and restore in Azure Key Vault. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. + +## Creating a KeyVaultBackupClient + +To create a new `KeyVaultBackupClient`, you'll need the endpoint to an Azure Key Vault and credentials. +You can use the [DefaultAzureCredential][DefaultAzureCredential] to try a number of common authentication methods optimized for both running as a service and development. + +In the sample below, you can set `keyVaultUrl` based on an environment variable, configuration setting, or any way that works for your application. + +```C# Snippet:HelloCreateKeyVaultBackupClient +KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new DefaultAzureCredential()); +``` + +## Performing a full key backup + +Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) + +To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_keyvault) and [Creating a key](creating_key) samples. + +In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. + +```C# Snippet:HelloFullBackupSync +// Create a Uri with the storage container +UriBuilder builder = new UriBuilder(blobStorageUrl) +{ + Path = blobContainerName, +}; + +// Start the backup. +BackupOperation backupOperation = Client.StartBackup(builder.Uri, sasToken); + +// Wait for completion of the BackupOperation. +while (!backupOperation.HasCompleted) +{ + backupOperation.UpdateStatus(); + Thread.Sleep(3000); +} + +// Get the Uri for the location of you backup blob. +Uri backupBlobUri = backupOperation.Value; +``` + +## Performing a full key restore + +Using the `KeyVaultBackupClient`, you can restore your entire collection of keys from backup. The data source for full key restore is a storage blob accessed using Shared Access Signature authentication. +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) + +```C# Snippet:HelloFullRestoreSync +// Get the folder name from the backupBlobUri returned from a previous BackupOperation +var uriSegments = backupBlobUri.Segments; +string folderName = uriSegments[uriSegments.Length - 1]; + +// Start the restore. +RestoreOperation restoreOperation = Client.StartRestore(builder.Uri, sasToken, folderName); + +// Wait for completion of the RestoreOperation. +while (!restoreOperation.HasCompleted) +{ + restoreOperation.UpdateStatus(); + Thread.Sleep(3000); +} +var restoreResult = backupOperation.Value; +``` + + +[DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md +[creating_keyvault]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclient +[creating_key]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key +[blob_readme]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md +[blob_auth]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs +[storage_explorer_sas]: https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md index 6593908ea3a35..145d4ef8373f3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md @@ -75,3 +75,4 @@ RoleAssignment deletedAssignment = await client.DeleteRoleAssignmentAsync(RoleAs [azure_cli]: https://docs.microsoft.com/cli/azure +[DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md index ceb97681f3df1..acf6e659a4552 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md @@ -67,3 +67,5 @@ RoleAssignment deletedAssignment = client.DeleteRoleAssignment(RoleAssignmentSco [azure_cli]: https://docs.microsoft.com/cli/azure +[DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md + diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs index 0afb52f76f897..02e7bc6a9cf88 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs @@ -30,11 +30,14 @@ private KeyVaultBackupClient GetClient(TestRecording recording = null) { recording ??= Recording; - return InstrumentClient - (new KeyVaultBackupClient( - new Uri(TestEnvironment.KeyVaultUrl), - TestEnvironment.Credential, - recording.InstrumentClientOptions(new KeyVaultBackupClientOptions()))); + + + // return InstrumentClient + // (new KeyVaultBackupClient( + // new Uri(TestEnvironment.KeyVaultUrl), + // TestEnvironment.Credential, + // recording.InstrumentClientOptions(new KeyVaultBackupClientOptions()))); + } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/SampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs similarity index 94% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/SampleSnippets.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs index 07c7f45068fff..e7624775445ac 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/SampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -16,9 +16,9 @@ namespace Azure.Security.KeyVault.Administration.Samples /// /// Samples that are used in the associated README.md file. /// - public class SampleSnippets : AccessControlTestBase + public class AccessControlSampleSnippets : AccessControlTestBase { - public SampleSnippets(bool isAsync) : base(isAsync, RecordedTestMode.Playback /* To record tests, change this argument to RecordedTestMode.Record */) + public AccessControlSampleSnippets(bool isAsync) : base(isAsync, RecordedTestMode.Playback /* To record tests, change this argument to RecordedTestMode.Record */) { } [SetUp] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs new file mode 100644 index 0000000000000..9e4905297343d --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; +using System; +using System.Threading; +using Azure.Identity; + +namespace Azure.Security.KeyVault.Administration.Tests +{ + public class Sample1_BackupHelloWorld : BackupRestoreTestBase + { + public Sample1_BackupHelloWorld(bool isAsync) : base(isAsync, RecordedTestMode.Record /* To record tests, change this argument to RecordedTestMode.Record */) + { } + + [Test] + public void CreateClientSample() + { + var keyVaultUrl = TestEnvironment.KeyVaultUrl; + + #region Snippet:HelloCreateKeyVaultBackupClient + KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new DefaultAzureCredential()); + #endregion + } + + [Test] + [AsyncOnly] + public async Task BackupAndRestoreSampleAsync() + { + var blobStorageUrl = TestEnvironment.StorageUri; + var blobContainerName = BlobContainerName; + var sasToken = "?" + SasToken; + + #region Snippet:HelloFullBackupAsync + // Create a Uri with the storage container + UriBuilder builder = new UriBuilder(blobStorageUrl) + { + Path = blobContainerName, + }; + + // Start the backup. + BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); + + // Wait for completion of the BackupOperation. + var backupResult = await backupOperation.WaitForCompletionAsync(); + + // Get the Uri for the location of you backup blob. + Uri backupBlobUri = backupResult.Value; + #endregion + + Assert.That(backupBlobUri, Is.Not.Null); + Assert.That(backupOperation.HasValue, Is.True); + + #region Snippet:HelloFullRestoreAsync + // Get the folder name from the backupBlobUri returned from a previous BackupOperation + var uriSegments = backupBlobUri.Segments; + string folderName = uriSegments[uriSegments.Length - 1]; + + // Start the restore. + RestoreOperation restoreOperation = await Client.StartRestoreAsync(builder.Uri, sasToken, folderName); + + // Wait for completion of the RestoreOperation. + var restoreResult = await restoreOperation.WaitForCompletionAsync(); + #endregion + Assert.That(restoreResult, Is.Not.Null); + Assert.That(restoreOperation.HasValue, Is.True); + } + + [Test] + [SyncOnly] + public void BackupAndRestoreSampleSync() + { + var blobStorageUrl = TestEnvironment.StorageUri; + var blobContainerName = BlobContainerName; + var sasToken = "?" + SasToken; + + #region Snippet:HelloFullBackupSync + // Create a Uri with the storage container + UriBuilder builder = new UriBuilder(blobStorageUrl) + { + Path = blobContainerName, + }; + + // Start the backup. + BackupOperation backupOperation = Client.StartBackup(builder.Uri, sasToken); + + // Wait for completion of the BackupOperation. + while (!backupOperation.HasCompleted) + { + backupOperation.UpdateStatus(); + Thread.Sleep(3000); + } + + // Get the Uri for the location of you backup blob. + Uri backupBlobUri = backupOperation.Value; + #endregion + + Assert.That(backupBlobUri, Is.Not.Null); + Assert.That(backupOperation.HasValue, Is.True); + + #region Snippet:HelloFullRestoreSync + // Get the folder name from the backupBlobUri returned from a previous BackupOperation + var uriSegments = backupBlobUri.Segments; + string folderName = uriSegments[uriSegments.Length - 1]; + + // Start the restore. + RestoreOperation restoreOperation = Client.StartRestore(builder.Uri, sasToken, folderName); + + // Wait for completion of the RestoreOperation. + while (!restoreOperation.HasCompleted) + { + restoreOperation.UpdateStatus(); + Thread.Sleep(3000); + } + var restoreResult = backupOperation.Value; + #endregion + + Assert.That(restoreResult, Is.Not.Null); + Assert.That(restoreOperation.HasValue, Is.True); + } + } +} From 8d550020e5f555b226e1a6ab5eb7ad7ae41bfcfc Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 24 Aug 2020 20:02:19 -0500 Subject: [PATCH 02/16] use CodeGenModel Usage --- .../KeyVaultPermission.Serialization.cs | 48 ++++++++++++++++++- .../Generated/Models/KeyVaultPermission.cs | 11 ++++- .../Models/RoleDefinition.Serialization.cs | 46 +++++++++++++++++- .../src/Generated/Models/RoleDefinition.cs | 12 +++-- .../src/KeyVaultPermision.cs | 13 ----- .../src/KeyVaultPermission.cs | 12 +---- .../src/RoleDefinition.cs | 9 +--- .../tests/BackupRestoreTestBase.cs | 12 ++--- 8 files changed, 119 insertions(+), 44 deletions(-) delete mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermision.cs diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs index 91e7df707f261..5500c06383fb5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.Serialization.cs @@ -11,8 +11,54 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class KeyVaultPermission + public partial class KeyVaultPermission : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(NotActions)) + { + writer.WritePropertyName("notActions"); + writer.WriteStartArray(); + foreach (var item in NotActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DataActions)) + { + writer.WritePropertyName("dataActions"); + writer.WriteStartArray(); + foreach (var item in DataActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(NotDataActions)) + { + writer.WritePropertyName("notDataActions"); + writer.WriteStartArray(); + foreach (var item in NotDataActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + internal static KeyVaultPermission DeserializeKeyVaultPermission(JsonElement element) { Optional> actions = default; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs index 1cdffa6e0c75f..08f0c7b80be77 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultPermission.cs @@ -14,7 +14,7 @@ namespace Azure.Security.KeyVault.Administration.Models public partial class KeyVaultPermission { /// Initializes a new instance of KeyVaultPermission. - internal KeyVaultPermission() + public KeyVaultPermission() { Actions = new ChangeTrackingList(); NotActions = new ChangeTrackingList(); @@ -34,5 +34,14 @@ internal KeyVaultPermission(IList actions, IList notActions, ILi DataActions = dataActions; NotDataActions = notDataActions; } + + /// Allowed actions. + public IList Actions { get; } + /// Denied actions. + public IList NotActions { get; } + /// Allowed Data actions. + public IList DataActions { get; } + /// Denied Data actions. + public IList NotDataActions { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs index 0b1b89f64119a..273c12fe73f20 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs @@ -11,8 +11,52 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class RoleDefinition + public partial class RoleDefinition : IUtf8JsonSerializable { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(RoleName)) + { + writer.WritePropertyName("roleName"); + writer.WriteStringValue(RoleName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(RoleType)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(RoleType); + } + if (Optional.IsCollectionDefined(Permissions)) + { + writer.WritePropertyName("permissions"); + writer.WriteStartArray(); + foreach (var item in Permissions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AssignableScopes)) + { + writer.WritePropertyName("assignableScopes"); + writer.WriteStartArray(); + foreach (var item in AssignableScopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + internal static RoleDefinition DeserializeRoleDefinition(JsonElement element) { Optional id = default; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs index e04ed2c78964d..3319b6c77953f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs @@ -14,7 +14,7 @@ namespace Azure.Security.KeyVault.Administration.Models public partial class RoleDefinition { /// Initializes a new instance of RoleDefinition. - internal RoleDefinition() + public RoleDefinition() { Permissions = new ChangeTrackingList(); AssignableScopes = new ChangeTrackingList(); @@ -48,10 +48,14 @@ internal RoleDefinition(string id, string name, string type, string roleName, st /// The role definition type. public string Type { get; } /// The role name. - public string RoleName { get; } + public string RoleName { get; set; } /// The role definition description. - public string Description { get; } + public string Description { get; set; } /// The role type. - public string RoleType { get; } + public string RoleType { get; set; } + /// Role definition permissions. + public IList Permissions { get; } + /// Role definition assignable scopes. + public IList AssignableScopes { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermision.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermision.cs deleted file mode 100644 index ce27551d8d4b1..0000000000000 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermision.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.Security.KeyVault.Administration.Models -{ - /// - [CodeGenModel("Permission")] - public partial class KeyVaultPermission - { - } -} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs index 93d343bb39ef0..d146596d8e94d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultPermission.cs @@ -7,15 +7,7 @@ namespace Azure.Security.KeyVault.Administration.Models { /// + [CodeGenModel("Permission", Usage = new[]{"input", "output"})] public partial class KeyVaultPermission - { - /// - public IList Actions { get; } - /// - public IList NotActions { get; } - /// - public IList DataActions { get; } - /// - public IList NotDataActions { get; } - } + { } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs index 0a546f914575b..5b2cc7281c2fc 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs @@ -1,17 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Collections.Generic; using Azure.Core; namespace Azure.Security.KeyVault.Administration.Models { /// + [CodeGenModel(Usage = new[]{"input", "output"})] public partial class RoleDefinition - { - /// - public IList Permissions { get; } - /// - public IList AssignableScopes { get; } - } + { } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs index 02e7bc6a9cf88..690652dd1ce72 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs @@ -30,13 +30,11 @@ private KeyVaultBackupClient GetClient(TestRecording recording = null) { recording ??= Recording; - - - // return InstrumentClient - // (new KeyVaultBackupClient( - // new Uri(TestEnvironment.KeyVaultUrl), - // TestEnvironment.Credential, - // recording.InstrumentClientOptions(new KeyVaultBackupClientOptions()))); + return InstrumentClient + (new KeyVaultBackupClient( + new Uri(TestEnvironment.KeyVaultUrl), + TestEnvironment.Credential, + recording.InstrumentClientOptions(new KeyVaultBackupClientOptions()))); } From 155f9add322473f36210bdd8de9abe9ed142130a Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 24 Aug 2020 20:08:16 -0500 Subject: [PATCH 03/16] take latest swagger spec and remove hacks --- .../Models/RestoreDetailsInternal.cs | 4 +- .../Models/SelectiveKeyRestoreDetails.cs | 4 +- .../src/autorest.md | 78 +------------------ 3 files changed, 6 insertions(+), 80 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.cs index 293f9cda89cf5..6063c8087b2c7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RestoreDetailsInternal.cs @@ -23,7 +23,7 @@ internal RestoreDetailsInternal() /// Error encountered, if any, during the restore operation. /// Identifier for the restore operation. /// The start time of the restore operation. - /// The end time of the restore operation in UTC. + /// The end time of the restore operation. internal RestoreDetailsInternal(string status, string statusDetails, KeyVaultServiceError error, string jobId, DateTimeOffset? startTime, DateTimeOffset? endTime) { Status = status; @@ -44,7 +44,7 @@ internal RestoreDetailsInternal(string status, string statusDetails, KeyVaultSer public string JobId { get; } /// The start time of the restore operation. public DateTimeOffset? StartTime { get; } - /// The end time of the restore operation in UTC. + /// The end time of the restore operation. public DateTimeOffset? EndTime { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs index a60192b7d06a8..04f62dc349119 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs @@ -23,7 +23,7 @@ internal SelectiveKeyRestoreDetails() /// Error encountered, if any, during the selective key restore operation. /// Identifier for the selective key restore operation. /// The start time of the restore operation. - /// The end time of the restore operation in UTC. + /// The end time of the restore operation. internal SelectiveKeyRestoreDetails(string status, string statusDetails, KeyVaultServiceError error, string jobId, DateTimeOffset? startTime, DateTimeOffset? endTime) { Status = status; @@ -44,7 +44,7 @@ internal SelectiveKeyRestoreDetails(string status, string statusDetails, KeyVaul public string JobId { get; } /// The start time of the restore operation. public DateTimeOffset? StartTime { get; } - /// The end time of the restore operation in UTC. + /// The end time of the restore operation. public DateTimeOffset? EndTime { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md index fe6bbb5c71820..2339d558cdd9c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/autorest.md @@ -8,82 +8,8 @@ Run `dotnet msbuild /t:GenerateCode` in src directory to re-generate. ``` yaml title: Azure.Security.KeyVault.Administration input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0902e37d8806dc8f5d7866a9960581e366f5f5b3/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0902e37d8806dc8f5d7866a9960581e366f5f5b3/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/backuprestore.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/edecc359f7d4219a73bed5c7114f51754b7ef7db/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/rbac.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/edecc359f7d4219a73bed5c7114f51754b7ef7db/specification/keyvault/data-plane/Microsoft.KeyVault/preview/7.2-preview/backuprestore.json namespace: Azure.Security.KeyVault.Administration include-csproj: disable ``` - -## Swagger hacks -These should eventually be fixed in the swagger files. See Azure/azure-rest-api-specs#10262 - -### Add "x-nullable": true to FullBackupOperation.endTime -``` yaml -directive: -- from: backuprestore.json - where: $.definitions["FullBackupOperation"]["properties"].endTime - transform: > - return { - "type": "integer", - "format": "unixtime", - "description": "The end time of the backup operation in UTC", - "x-nullable": true - }; -``` - -### Add "x-nullable": true to RestoreOperation.endTime -``` yaml -directive: -- from: backuprestore.json - where: $.definitions["RestoreOperation"]["properties"].endTime - transform: > - return { - "type": "integer", - "format": "unixtime", - "description": "The end time of the restore operation in UTC", - "x-nullable": true - }; -``` - -### Add "x-nullable": true to SelectiveKeyRestoreOperation.endTime -``` yaml -directive: -- from: backuprestore.json - where: $.definitions["SelectiveKeyRestoreOperation"]["properties"].endTime - transform: > - return { - "type": "integer", - "format": "unixtime", - "description": "The end time of the restore operation in UTC", - "x-nullable": true - }; -``` - -### Add "x-nullable": true to the Error property -``` yaml -directive: -- from: common.json - where: $.definitions["Error"] - transform: > - return { - "properties": { - "code": { - "type": "string", - "readOnly": true, - "description": "The error code." - }, - "message": { - "type": "string", - "readOnly": true, - "description": "The error message." - }, - "innererror": { - "x-ms-client-name": "innerError", - "readOnly": true, - "$ref": "#/definitions/Error" - } - }, - "description": "The key vault server error.", - "x-nullable": true - }; -``` From 17d48e9c3c03b1fe3ff6010c7183f576a3039ef3 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 28 Aug 2020 12:43:40 -0500 Subject: [PATCH 04/16] renaming --- ....KeyVault.Administration.netstandard2.0.cs | 102 +++++++++--------- .../readme.md | 16 +-- .../samples/Sample1_RbacHelloWorldAsync.md | 14 +-- .../samples/Sample1_RbacHelloWorldSync.md | 10 +- .../samples/Sample2_RbacScopeAssignment.md | 2 +- ...> KeyVaultRoleAssignment.Serialization.cs} | 10 +- ...ssignment.cs => KeyVaultRoleAssignment.cs} | 12 +-- ...RoleAssignmentProperties.Serialization.cs} | 2 +- ...cs => KeyVaultRoleAssignmentProperties.cs} | 6 +- ...nmentPropertiesWithScope.Serialization.cs} | 6 +- ...VaultRoleAssignmentPropertiesWithScope.cs} | 10 +- ...> KeyVaultRoleDefinition.Serialization.cs} | 6 +- ...efinition.cs => KeyVaultRoleDefinition.cs} | 10 +- .../Models/RoleAssignmentCreateParameters.cs | 4 +- .../RoleAssignmentListResult.Serialization.cs | 6 +- .../Models/RoleAssignmentListResult.cs | 6 +- .../RoleDefinitionListResult.Serialization.cs | 6 +- .../Models/RoleDefinitionListResult.cs | 6 +- .../Generated/RoleAssignmentsRestClient.cs | 36 +++---- .../src/KeyVaultAccessControlClient.cs | 32 +++--- .../src/KeyVaultModelFactory.cs | 8 +- .../src/KeyVaultRoleAssignment.cs | 12 +++ .../src/KeyVaultRoleAssignmentProperties.cs | 12 +++ ...yVaultRoleAssignmentPropertiesWithScope.cs | 12 +++ ...ssignmentScope.cs => KeyVaultRoleScope.cs} | 40 +++---- .../src/RoleDefinition.cs | 4 +- .../tests/AccessControlClientLiveTests.cs | 24 ++--- .../tests/AccessControlTestBase.cs | 2 +- .../tests/RoleAssignmentScopeTests.cs | 10 +- .../samples/AccessControlSampleSnippets.cs | 20 ++-- .../tests/samples/Sample1_RbacHelloWorld.cs | 32 +++--- .../samples/Sample2_RbacScopeAssignment.cs | 8 +- 32 files changed, 261 insertions(+), 225 deletions(-) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignment.Serialization.cs => KeyVaultRoleAssignment.Serialization.cs} (70%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignment.cs => KeyVaultRoleAssignment.cs} (68%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignmentProperties.Serialization.cs => KeyVaultRoleAssignmentProperties.Serialization.cs} (88%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignmentProperties.cs => KeyVaultRoleAssignmentProperties.cs} (85%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignmentPropertiesWithScope.Serialization.cs => KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs} (76%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleAssignmentPropertiesWithScope.cs => KeyVaultRoleAssignmentPropertiesWithScope.cs} (67%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleDefinition.Serialization.cs => KeyVaultRoleDefinition.Serialization.cs} (92%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{RoleDefinition.cs => KeyVaultRoleDefinition.cs} (82%) create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignment.cs create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentProperties.cs create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentPropertiesWithScope.cs rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/{RoleAssignmentScope.cs => KeyVaultRoleScope.cs} (56%) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs index 00d333aa0a9d1..afead38632ee9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs @@ -21,16 +21,16 @@ protected KeyVaultAccessControlClient() { } public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential) { } public KeyVaultAccessControlClient(System.Uri vaultUri, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Administration.KeyVaultAccessControlClientOptions options) { } public virtual System.Uri VaultUri { get { throw null; } } - public virtual Azure.Response CreateRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, Azure.Security.KeyVault.Administration.Models.RoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRoleAssignment(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetRoleAssignments(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetRoleDefinitions(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.RoleAssignmentScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleAssignmentProperties properties, System.Guid name = default(System.Guid), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRoleAssignment(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoleAssignmentAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, string roleAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRoleAssignments(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRoleAssignmentsAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRoleDefinitions(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRoleDefinitionsAsync(Azure.Security.KeyVault.Administration.KeyVaultRoleScope roleScope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class KeyVaultAccessControlClientOptions : Azure.Core.ClientOptions { @@ -63,6 +63,25 @@ public enum ServiceVersion V7_2_Preview = 1, } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KeyVaultRoleScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KeyVaultRoleScope(string value) { throw null; } + public KeyVaultRoleScope(System.Uri resourceId) { throw null; } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleScope Global { get { throw null; } } + public static Azure.Security.KeyVault.Administration.KeyVaultRoleScope Keys { get { throw null; } } + public bool Equals(Azure.Security.KeyVault.Administration.KeyVaultRoleScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Security.KeyVault.Administration.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.KeyVaultRoleScope right) { throw null; } + public static implicit operator Azure.Security.KeyVault.Administration.KeyVaultRoleScope (string value) { throw null; } + public static bool operator !=(Azure.Security.KeyVault.Administration.KeyVaultRoleScope left, Azure.Security.KeyVault.Administration.KeyVaultRoleScope right) { throw null; } + public override string ToString() { throw null; } + } public partial class RestoreOperation : Azure.Operation { public RestoreOperation(string id, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client) { } @@ -78,25 +97,6 @@ public RestoreOperation(string id, Azure.Security.KeyVault.Administration.KeyVau public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RoleAssignmentScope : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RoleAssignmentScope(string value) { throw null; } - public RoleAssignmentScope(System.Uri resourceId) { throw null; } - public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Global { get { throw null; } } - public static Azure.Security.KeyVault.Administration.RoleAssignmentScope Keys { get { throw null; } } - public bool Equals(Azure.Security.KeyVault.Administration.RoleAssignmentScope other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } - public static implicit operator Azure.Security.KeyVault.Administration.RoleAssignmentScope (string value) { throw null; } - public static bool operator !=(Azure.Security.KeyVault.Administration.RoleAssignmentScope left, Azure.Security.KeyVault.Administration.RoleAssignmentScope right) { throw null; } - public override string ToString() { throw null; } - } } namespace Azure.Security.KeyVault.Administration.Models { @@ -104,57 +104,57 @@ public static partial class KeyVaultModelFactory { public static Azure.Security.KeyVault.Administration.BackupOperation BackupOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.Uri blobContainerUri, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } public static Azure.Security.KeyVault.Administration.RestoreOperation RestoreOperation(Azure.Response response, Azure.Security.KeyVault.Administration.KeyVaultBackupClient client, string id, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string errorMessage = null) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.RoleAssignment RoleAssignment(string id, string name, string type, Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope properties) { throw null; } - public static Azure.Security.KeyVault.Administration.Models.RoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IList permissions, System.Collections.Generic.IList assignableScopes) { throw null; } + public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleAssignment RoleAssignment(string id, string name, string type, Azure.Security.KeyVault.Administration.Models.KeyVaultRoleAssignmentPropertiesWithScope properties) { throw null; } + public static Azure.Security.KeyVault.Administration.Models.KeyVaultRoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, System.Collections.Generic.IList permissions, System.Collections.Generic.IList assignableScopes) { throw null; } } public partial class KeyVaultPermission { - internal KeyVaultPermission() { } + public KeyVaultPermission() { } public System.Collections.Generic.IList Actions { get { throw null; } } public System.Collections.Generic.IList DataActions { get { throw null; } } public System.Collections.Generic.IList NotActions { get { throw null; } } public System.Collections.Generic.IList NotDataActions { get { throw null; } } } - public partial class KeyVaultServiceError + public partial class KeyVaultRoleAssignment { - internal KeyVaultServiceError() { } - public string Code { get { throw null; } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultServiceError InnerError { get { throw null; } } - public string Message { get { throw null; } } - } - public partial class RoleAssignment - { - internal RoleAssignment() { } + internal KeyVaultRoleAssignment() { } public string Id { get { throw null; } } public string Name { get { throw null; } } - public Azure.Security.KeyVault.Administration.Models.RoleAssignmentPropertiesWithScope Properties { get { throw null; } } + public Azure.Security.KeyVault.Administration.Models.KeyVaultRoleAssignmentPropertiesWithScope Properties { get { throw null; } } public string Type { get { throw null; } } } - public partial class RoleAssignmentProperties + public partial class KeyVaultRoleAssignmentProperties { - public RoleAssignmentProperties(string roleDefinitionId, string principalId) { } + public KeyVaultRoleAssignmentProperties(string roleDefinitionId, string principalId) { } public string PrincipalId { get { throw null; } } public string RoleDefinitionId { get { throw null; } } } - public partial class RoleAssignmentPropertiesWithScope + public partial class KeyVaultRoleAssignmentPropertiesWithScope { - internal RoleAssignmentPropertiesWithScope() { } + internal KeyVaultRoleAssignmentPropertiesWithScope() { } public string PrincipalId { get { throw null; } } public string RoleDefinitionId { get { throw null; } } public string Scope { get { throw null; } } } - public partial class RoleDefinition + public partial class KeyVaultRoleDefinition { - internal RoleDefinition() { } + public KeyVaultRoleDefinition() { } public System.Collections.Generic.IList AssignableScopes { get { throw null; } } - public string Description { get { throw null; } } + public string Description { get { throw null; } set { } } public string Id { get { throw null; } } public string Name { get { throw null; } } public System.Collections.Generic.IList Permissions { get { throw null; } } - public string RoleName { get { throw null; } } - public string RoleType { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public string RoleType { get { throw null; } set { } } public string Type { get { throw null; } } } + public partial class KeyVaultServiceError + { + internal KeyVaultServiceError() { } + public string Code { get { throw null; } } + public Azure.Security.KeyVault.Administration.Models.KeyVaultServiceError InnerError { get { throw null; } } + public string Message { get { throw null; } } + } public partial class SelectiveKeyRestoreDetails { internal SelectiveKeyRestoreDetails() { } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index 5300d4eb94f36..e0c557107d99f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -81,10 +81,10 @@ Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZU KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(vaultUri: new Uri(keyVaultUrl), credential: new DefaultAzureCredential()); // Retrieve all the role definitions. -List roleDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global).ToList(); +List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); // Retrieve all the role assignments. -List roleAssignments = client.GetRoleAssignments(RoleAssignmentScope.Global).ToList(); +List roleAssignments = client.GetRoleAssignments(KeyVaultRoleScope.Global).ToList(); ``` ## Key concepts @@ -109,9 +109,9 @@ The following section provides several code snippets using the `client` [created List the role definitions available for assignment. ```C# Snippet:GetRoleDefinitions -Pageable allDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global); +Pageable allDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); -foreach (RoleDefinition roleDefinition in allDefinitions) +foreach (KeyVaultRoleDefinition roleDefinition in allDefinitions) { Console.WriteLine(roleDefinition.Id); Console.WriteLine(roleDefinition.RoleName); @@ -130,20 +130,20 @@ string definitionIdToAssign = ""; // Replace with the service principal object id from the Create/Get credentials section above string servicePrincipalObjectId = ""; -RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); +KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); Console.WriteLine(createdAssignment.Name); Console.WriteLine(createdAssignment.Properties.PrincipalId); Console.WriteLine(createdAssignment.Properties.RoleDefinitionId); -RoleAssignment fetchedAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); Console.WriteLine(fetchedAssignment.Name); Console.WriteLine(fetchedAssignment.Properties.PrincipalId); Console.WriteLine(fetchedAssignment.Properties.RoleDefinitionId); -RoleAssignment deletedAssignment = client.DeleteRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment deletedAssignment = client.DeleteRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); Console.WriteLine(deletedAssignment.Name); Console.WriteLine(deletedAssignment.Properties.PrincipalId); @@ -159,7 +159,7 @@ For example, if you try to retrieve a role assignment that doesn't exist in your ```C# Snippet:RoleAssignmentNotFound try { - RoleAssignment roleAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, "invalid-name"); + KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "invalid-name"); } catch (RequestFailedException ex) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md index 145d4ef8373f3..908aa3abca27a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md @@ -19,8 +19,8 @@ KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(new Uri(key In order to assign a role to a service principal, we'll have to know which role definitions are available. Let's get all of them. ```C# Snippet:GetRoleDefinitionsAsync -List roleDefinitions = new List(); -await foreach (var definition in client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global)) +List roleDefinitions = new List(); +await foreach (var definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) { roleDefinitions.Add(definition); } @@ -31,8 +31,8 @@ await foreach (var definition in client.GetRoleDefinitionsAsync(RoleAssignmentSc Before assigning any new roles, let's get all the current role assignments. ```C# Snippet:GetRoleAssignmentsAsync -List roleAssignments = new List(); -await foreach (var assignment in client.GetRoleAssignmentsAsync(RoleAssignmentScope.Global)) +List roleAssignments = new List(); +await foreach (var assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) { roleAssignments.Add(assignment); } @@ -54,7 +54,7 @@ az ad signed-in-user show --query objectId string definitionIdToAssign = ""; string servicePrincipalObjectId = ""; -RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); +KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); RoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties); ``` @@ -63,14 +63,14 @@ RoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(RoleAs To get an existing role assignment, we'll need the `Name` property from an existing assignment. Let's use the `createdAssignment` from the previous example. ```C# Snippet:GetRoleAssignmentAsync -RoleAssignment fetchedAssignment = await client.GetRoleAssignmentAsync(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment fetchedAssignment = await client.GetRoleAssignmentAsync(KeyVaultRoleScope.Global, createdAssignment.Name); ``` # Deleting a Role Assignment To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. ```C# Snippet:DeleteRoleAssignmentAsync -RoleAssignment deletedAssignment = await client.DeleteRoleAssignmentAsync(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment deletedAssignment = await client.DeleteRoleAssignmentAsync(KeyVaultRoleScope.Global, createdAssignment.Name); ``` diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md index acf6e659a4552..b83257179ac9d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md @@ -19,7 +19,7 @@ KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(new Uri(key In order to assign a role to a service principal, we'll have to know which role definitions are available. Let's get all of them. ```C# Snippet:GetRoleDefinitionsSync -List roleDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global).ToList(); +List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); ``` ## Listing All Role Assignments @@ -27,7 +27,7 @@ List roleDefinitions = client.GetRoleDefinitions(RoleAssignmentS Before assigning any new roles, let's get all the current role assignments. ```C# Snippet:GetRoleAssignmentsSync -List roleAssignments = client.GetRoleAssignments(RoleAssignmentScope.Global).ToList(); +List roleAssignments = client.GetRoleAssignments(KeyVaultRoleScope.Global).ToList(); ``` # Creating a Role Assignment @@ -46,7 +46,7 @@ az ad signed-in-user show --query objectId string definitionIdToAssign = ""; string servicePrincipalObjectId = ""; -RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); +KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); ``` @@ -55,14 +55,14 @@ RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentSco To get an existing role assignment, we'll need the `Name` property from an existing assignment. Let's use the `createdAssignment` from the previous example. ```C# Snippet:GetRoleAssignment -RoleAssignment fetchedAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); ``` # Deleting a Role Assignment To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. ```C# Snippet:DeleteRoleAssignment -RoleAssignment deletedAssignment = client.DeleteRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); +KeyVaultRoleAssignment deletedAssignment = client.DeleteRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); ``` diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md index f3470decd91c5..b46fbf9dd6462 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md @@ -19,7 +19,7 @@ A role definition Id can be obtained from the `Id` property of one of the role d string definitionIdToAssign = ""; string servicePrincipalObjectId = ""; -RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); +KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); RoleAssignment keysScopedAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties); ``` diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs similarity index 70% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.Serialization.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs index 9646954b9ba51..9b81f6b4cd1de 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.Serialization.cs @@ -10,14 +10,14 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class RoleAssignment + public partial class KeyVaultRoleAssignment { - internal static RoleAssignment DeserializeRoleAssignment(JsonElement element) + internal static KeyVaultRoleAssignment DeserializeKeyVaultRoleAssignment(JsonElement element) { Optional id = default; Optional name = default; Optional type = default; - Optional properties = default; + Optional properties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -37,11 +37,11 @@ internal static RoleAssignment DeserializeRoleAssignment(JsonElement element) } if (property.NameEquals("properties")) { - properties = RoleAssignmentPropertiesWithScope.DeserializeRoleAssignmentPropertiesWithScope(property.Value); + properties = KeyVaultRoleAssignmentPropertiesWithScope.DeserializeKeyVaultRoleAssignmentPropertiesWithScope(property.Value); continue; } } - return new RoleAssignment(id.Value, name.Value, type.Value, properties.Value); + return new KeyVaultRoleAssignment(id.Value, name.Value, type.Value, properties.Value); } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.cs similarity index 68% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.cs index feaa794113d23..26de85f2b2c1e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignment.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignment.cs @@ -8,19 +8,19 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Role Assignments. - public partial class RoleAssignment + public partial class KeyVaultRoleAssignment { - /// Initializes a new instance of RoleAssignment. - internal RoleAssignment() + /// Initializes a new instance of KeyVaultRoleAssignment. + internal KeyVaultRoleAssignment() { } - /// Initializes a new instance of RoleAssignment. + /// Initializes a new instance of KeyVaultRoleAssignment. /// The role assignment ID. /// The role assignment name. /// The role assignment type. /// Role assignment properties. - internal RoleAssignment(string id, string name, string type, RoleAssignmentPropertiesWithScope properties) + internal KeyVaultRoleAssignment(string id, string name, string type, KeyVaultRoleAssignmentPropertiesWithScope properties) { Id = id; Name = name; @@ -35,6 +35,6 @@ internal RoleAssignment(string id, string name, string type, RoleAssignmentPrope /// The role assignment type. public string Type { get; } /// Role assignment properties. - public RoleAssignmentPropertiesWithScope Properties { get; } + public KeyVaultRoleAssignmentPropertiesWithScope Properties { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs similarity index 88% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs index a5c5d1fb11384..a66fc1bc8561f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class RoleAssignmentProperties : IUtf8JsonSerializable + public partial class KeyVaultRoleAssignmentProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.cs similarity index 85% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.cs index 6ba61c7a6c103..68025230855fb 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentProperties.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentProperties.cs @@ -10,13 +10,13 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Role assignment properties. - public partial class RoleAssignmentProperties + public partial class KeyVaultRoleAssignmentProperties { - /// Initializes a new instance of RoleAssignmentProperties. + /// Initializes a new instance of KeyVaultRoleAssignmentProperties. /// The role definition ID used in the role assignment. /// The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. /// or is null. - public RoleAssignmentProperties(string roleDefinitionId, string principalId) + public KeyVaultRoleAssignmentProperties(string roleDefinitionId, string principalId) { if (roleDefinitionId == null) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs similarity index 76% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.Serialization.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs index eb30e653c0962..7423599317e71 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class RoleAssignmentPropertiesWithScope + public partial class KeyVaultRoleAssignmentPropertiesWithScope { - internal static RoleAssignmentPropertiesWithScope DeserializeRoleAssignmentPropertiesWithScope(JsonElement element) + internal static KeyVaultRoleAssignmentPropertiesWithScope DeserializeKeyVaultRoleAssignmentPropertiesWithScope(JsonElement element) { Optional scope = default; Optional roleDefinitionId = default; @@ -35,7 +35,7 @@ internal static RoleAssignmentPropertiesWithScope DeserializeRoleAssignmentPrope continue; } } - return new RoleAssignmentPropertiesWithScope(scope.Value, roleDefinitionId.Value, principalId.Value); + return new KeyVaultRoleAssignmentPropertiesWithScope(scope.Value, roleDefinitionId.Value, principalId.Value); } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs similarity index 67% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs index 9618cf35ad9b1..3c7cca0bd63b8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentPropertiesWithScope.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleAssignmentPropertiesWithScope.cs @@ -8,18 +8,18 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Role assignment properties with scope. - public partial class RoleAssignmentPropertiesWithScope + public partial class KeyVaultRoleAssignmentPropertiesWithScope { - /// Initializes a new instance of RoleAssignmentPropertiesWithScope. - internal RoleAssignmentPropertiesWithScope() + /// Initializes a new instance of KeyVaultRoleAssignmentPropertiesWithScope. + internal KeyVaultRoleAssignmentPropertiesWithScope() { } - /// Initializes a new instance of RoleAssignmentPropertiesWithScope. + /// Initializes a new instance of KeyVaultRoleAssignmentPropertiesWithScope. /// The role assignment scope. /// The role definition ID. /// The principal ID. - internal RoleAssignmentPropertiesWithScope(string scope, string roleDefinitionId, string principalId) + internal KeyVaultRoleAssignmentPropertiesWithScope(string scope, string roleDefinitionId, string principalId) { Scope = scope; RoleDefinitionId = roleDefinitionId; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs similarity index 92% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs index 273c12fe73f20..576be973be5ab 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class RoleDefinition : IUtf8JsonSerializable + public partial class KeyVaultRoleDefinition : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -57,7 +57,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static RoleDefinition DeserializeRoleDefinition(JsonElement element) + internal static KeyVaultRoleDefinition DeserializeKeyVaultRoleDefinition(JsonElement element) { Optional id = default; Optional name = default; @@ -127,7 +127,7 @@ internal static RoleDefinition DeserializeRoleDefinition(JsonElement element) continue; } } - return new RoleDefinition(id.Value, name.Value, type.Value, roleName.Value, description.Value, type0.Value, Optional.ToList(permissions), Optional.ToList(assignableScopes)); + return new KeyVaultRoleDefinition(id.Value, name.Value, type.Value, roleName.Value, description.Value, type0.Value, Optional.ToList(permissions), Optional.ToList(assignableScopes)); } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs similarity index 82% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs index 3319b6c77953f..220d3e91c2266 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinition.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultRoleDefinition.cs @@ -11,16 +11,16 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Role definition. - public partial class RoleDefinition + public partial class KeyVaultRoleDefinition { - /// Initializes a new instance of RoleDefinition. - public RoleDefinition() + /// Initializes a new instance of KeyVaultRoleDefinition. + public KeyVaultRoleDefinition() { Permissions = new ChangeTrackingList(); AssignableScopes = new ChangeTrackingList(); } - /// Initializes a new instance of RoleDefinition. + /// Initializes a new instance of KeyVaultRoleDefinition. /// The role definition ID. /// The role definition name. /// The role definition type. @@ -29,7 +29,7 @@ public RoleDefinition() /// The role type. /// Role definition permissions. /// Role definition assignable scopes. - internal RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, IList permissions, IList assignableScopes) + internal KeyVaultRoleDefinition(string id, string name, string type, string roleName, string description, string roleType, IList permissions, IList assignableScopes) { Id = id; Name = name; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.cs index 3404c89bfcae4..c7140ea69e022 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentCreateParameters.cs @@ -15,7 +15,7 @@ internal partial class RoleAssignmentCreateParameters /// Initializes a new instance of RoleAssignmentCreateParameters. /// Role assignment properties. /// is null. - public RoleAssignmentCreateParameters(RoleAssignmentProperties properties) + public RoleAssignmentCreateParameters(KeyVaultRoleAssignmentProperties properties) { if (properties == null) { @@ -26,6 +26,6 @@ public RoleAssignmentCreateParameters(RoleAssignmentProperties properties) } /// Role assignment properties. - public RoleAssignmentProperties Properties { get; } + public KeyVaultRoleAssignmentProperties Properties { get; } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs index 19b19f25d5904..b758e361a153e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.Serialization.cs @@ -15,16 +15,16 @@ internal partial class RoleAssignmentListResult { internal static RoleAssignmentListResult DeserializeRoleAssignmentListResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RoleAssignment.DeserializeRoleAssignment(item)); + array.Add(KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(item)); } value = array; continue; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.cs index 6209546ee059b..4de51bc0a4c99 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleAssignmentListResult.cs @@ -16,20 +16,20 @@ internal partial class RoleAssignmentListResult /// Initializes a new instance of RoleAssignmentListResult. internal RoleAssignmentListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of RoleAssignmentListResult. /// Role assignment list. /// The URL to use for getting the next set of results. - internal RoleAssignmentListResult(IReadOnlyList value, string nextLink) + internal RoleAssignmentListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Role assignment list. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The URL to use for getting the next set of results. public string NextLink { get; } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs index 828e65613223f..9eda97240a73e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.Serialization.cs @@ -15,16 +15,16 @@ internal partial class RoleDefinitionListResult { internal static RoleDefinitionListResult DeserializeRoleDefinitionListResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RoleDefinition.DeserializeRoleDefinition(item)); + array.Add(KeyVaultRoleDefinition.DeserializeKeyVaultRoleDefinition(item)); } value = array; continue; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.cs index 5ba723cdfd04a..2a106b64a2242 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/RoleDefinitionListResult.cs @@ -16,20 +16,20 @@ internal partial class RoleDefinitionListResult /// Initializes a new instance of RoleDefinitionListResult. internal RoleDefinitionListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of RoleDefinitionListResult. /// Role definition list. /// The URL to use for getting the next set of results. - internal RoleDefinitionListResult(IReadOnlyList value, string nextLink) + internal RoleDefinitionListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Role definition list. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The URL to use for getting the next set of results. public string NextLink { get; } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs index d1af7719ee8f7..59d3d76a2f911 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs @@ -61,7 +61,7 @@ internal HttpMessage CreateDeleteRequest(string vaultBaseUrl, string scope, stri /// The name of the role assignment to delete. /// The cancellation token to use. /// , , or is null. - public async Task> DeleteAsync(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -82,9 +82,9 @@ public async Task> DeleteAsync(string vaultBaseUrl, str { case 200: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -98,7 +98,7 @@ public async Task> DeleteAsync(string vaultBaseUrl, str /// The name of the role assignment to delete. /// The cancellation token to use. /// , , or is null. - public Response Delete(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) + public Response Delete(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -119,9 +119,9 @@ public Response Delete(string vaultBaseUrl, string scope, string { case 200: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -156,7 +156,7 @@ internal HttpMessage CreateCreateRequest(string vaultBaseUrl, string scope, stri /// Parameters for the role assignment. /// The cancellation token to use. /// , , , or is null. - public async Task> CreateAsync(string vaultBaseUrl, string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string vaultBaseUrl, string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -181,9 +181,9 @@ public async Task> CreateAsync(string vaultBaseUrl, str { case 201: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -198,7 +198,7 @@ public async Task> CreateAsync(string vaultBaseUrl, str /// Parameters for the role assignment. /// The cancellation token to use. /// , , , or is null. - public Response Create(string vaultBaseUrl, string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, CancellationToken cancellationToken = default) + public Response Create(string vaultBaseUrl, string scope, string roleAssignmentName, RoleAssignmentCreateParameters parameters, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -223,9 +223,9 @@ public Response Create(string vaultBaseUrl, string scope, string { case 201: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -255,7 +255,7 @@ internal HttpMessage CreateGetRequest(string vaultBaseUrl, string scope, string /// The name of the role assignment to get. /// The cancellation token to use. /// , , or is null. - public async Task> GetAsync(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -276,9 +276,9 @@ public async Task> GetAsync(string vaultBaseUrl, string { case 200: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -292,7 +292,7 @@ public async Task> GetAsync(string vaultBaseUrl, string /// The name of the role assignment to get. /// The cancellation token to use. /// , , or is null. - public Response Get(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) + public Response Get(string vaultBaseUrl, string scope, string roleAssignmentName, CancellationToken cancellationToken = default) { if (vaultBaseUrl == null) { @@ -313,9 +313,9 @@ public Response Get(string vaultBaseUrl, string scope, string ro { case 200: { - RoleAssignment value = default; + KeyVaultRoleAssignment value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RoleAssignment.DeserializeRoleAssignment(document.RootElement); + value = KeyVaultRoleAssignment.DeserializeKeyVaultRoleAssignment(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs index 6aa817e482b30..7616ed0207fd1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs @@ -12,8 +12,8 @@ namespace Azure.Security.KeyVault.Administration { /// /// The KeyVaultAccessControlClient provides synchronous and asynchronous methods to view and manage Role Based Access for the Azure Key Vault. - /// The client supports creating, listing, updating, and deleting . - /// The client also supports listing . + /// The client supports creating, listing, updating, and deleting . + /// The client also supports listing . /// public class KeyVaultAccessControlClient { @@ -77,7 +77,7 @@ public KeyVaultAccessControlClient(Uri vaultUri, TokenCredential credential, Key /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// is null. - public virtual Pageable GetRoleDefinitions(RoleAssignmentScope roleScope, CancellationToken cancellationToken = default) + public virtual Pageable GetRoleDefinitions(KeyVaultRoleScope roleScope, CancellationToken cancellationToken = default) { return PageableHelpers.CreateEnumerable(_ => { @@ -117,7 +117,7 @@ public virtual Pageable GetRoleDefinitions(RoleAssignmentScope r /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// is null. - public virtual AsyncPageable GetRoleDefinitionsAsync(RoleAssignmentScope roleScope, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetRoleDefinitionsAsync(KeyVaultRoleScope roleScope, CancellationToken cancellationToken = default) { return PageableHelpers.CreateAsyncEnumerable(async _ => { @@ -153,13 +153,13 @@ public virtual AsyncPageable GetRoleDefinitionsAsync(RoleAssignm } /// - /// Gets the s for a scope. + /// Gets the s for a scope. /// /// The scope of the role assignments. /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// is null. - public virtual Pageable GetRoleAssignments(RoleAssignmentScope roleScope, CancellationToken cancellationToken = default) + public virtual Pageable GetRoleAssignments(KeyVaultRoleScope roleScope, CancellationToken cancellationToken = default) { return PageableHelpers.CreateEnumerable(_ => { @@ -193,13 +193,13 @@ public virtual Pageable GetRoleAssignments(RoleAssignmentScope r } /// 0 - /// Gets the s for a scope. + /// Gets the s for a scope. /// /// The scope of the role assignments. /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// is null. - public virtual AsyncPageable GetRoleAssignmentsAsync(RoleAssignmentScope roleScope, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetRoleAssignmentsAsync(KeyVaultRoleScope roleScope, CancellationToken cancellationToken = default) { return PageableHelpers.CreateAsyncEnumerable(async _ => { @@ -235,7 +235,7 @@ public virtual AsyncPageable GetRoleAssignmentsAsync(RoleAssignm } /// - /// Creates a . + /// Creates a . /// /// The scope of the role assignment to create. /// Properties for the role assignment. @@ -243,7 +243,7 @@ public virtual AsyncPageable GetRoleAssignmentsAsync(RoleAssignm /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual Response CreateRoleAssignment(RoleAssignmentScope roleScope, RoleAssignmentProperties properties, Guid name = default, CancellationToken cancellationToken = default) + public virtual Response CreateRoleAssignment(KeyVaultRoleScope roleScope, KeyVaultRoleAssignmentProperties properties, Guid name = default, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(CreateRoleAssignment)}"); scope.Start(); @@ -260,7 +260,7 @@ public virtual Response CreateRoleAssignment(RoleAssignmentScope } /// - /// Creates a . + /// Creates a . /// /// The scope of the role assignment to create. /// Properties for the role assignment. @@ -268,7 +268,7 @@ public virtual Response CreateRoleAssignment(RoleAssignmentScope /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual async Task> CreateRoleAssignmentAsync(RoleAssignmentScope roleScope, RoleAssignmentProperties properties, Guid name = default, CancellationToken cancellationToken = default) + public virtual async Task> CreateRoleAssignmentAsync(KeyVaultRoleScope roleScope, KeyVaultRoleAssignmentProperties properties, Guid name = default, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(CreateRoleAssignment)}"); scope.Start(); @@ -293,7 +293,7 @@ public virtual async Task> CreateRoleAssignmentAsync(Ro /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual Response GetRoleAssignment(RoleAssignmentScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) + public virtual Response GetRoleAssignment(KeyVaultRoleScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(GetRoleAssignment)}"); scope.Start(); @@ -316,7 +316,7 @@ public virtual Response GetRoleAssignment(RoleAssignmentScope ro /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual async Task> GetRoleAssignmentAsync(RoleAssignmentScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) + public virtual async Task> GetRoleAssignmentAsync(KeyVaultRoleScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(GetRoleAssignment)}"); scope.Start(); @@ -340,7 +340,7 @@ public virtual async Task> GetRoleAssignmentAsync(RoleA /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual Response DeleteRoleAssignment(RoleAssignmentScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) + public virtual Response DeleteRoleAssignment(KeyVaultRoleScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(DeleteRoleAssignment)}"); scope.Start(); @@ -363,7 +363,7 @@ public virtual Response DeleteRoleAssignment(RoleAssignmentScope /// The cancellation token to use. /// The server returned an error. See for details returned from the server. /// or is null. - public virtual async Task> DeleteRoleAssignmentAsync(RoleAssignmentScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) + public virtual async Task> DeleteRoleAssignmentAsync(KeyVaultRoleScope roleScope, string roleAssignmentName, CancellationToken cancellationToken = default) { using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(KeyVaultAccessControlClient)}.{nameof(DeleteRoleAssignment)}"); scope.Start(); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultModelFactory.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultModelFactory.cs index 57b64ef15fd9b..37a0bed494dc1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultModelFactory.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultModelFactory.cs @@ -22,8 +22,8 @@ public static class KeyVaultModelFactory /// The role type. /// Role definition permissions. /// Role definition assignable scopes. - public static RoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, IList permissions, IList assignableScopes) => - new RoleDefinition(id, name, type, roleName, description, roleType, permissions, assignableScopes); + public static KeyVaultRoleDefinition RoleDefinition(string id, string name, string type, string roleName, string description, string roleType, IList permissions, IList assignableScopes) => + new KeyVaultRoleDefinition(id, name, type, roleName, description, roleType, permissions, assignableScopes); /// /// Initializes a new instance of RoleAssignment. @@ -32,8 +32,8 @@ public static RoleDefinition RoleDefinition(string id, string name, string type, /// The role assignment name. /// The role assignment type. /// Role assignment properties. - public static RoleAssignment RoleAssignment(string id, string name, string type, RoleAssignmentPropertiesWithScope properties) => - new RoleAssignment(id, name, type, properties); + public static KeyVaultRoleAssignment RoleAssignment(string id, string name, string type, KeyVaultRoleAssignmentPropertiesWithScope properties) => + new KeyVaultRoleAssignment(id, name, type, properties); /// /// Initializes a new instance of a FullRestoreOperation for mocking purposes. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignment.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignment.cs new file mode 100644 index 0000000000000..5d6ef403d41a6 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignment.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Security.KeyVault.Administration.Models +{ + /// > + [CodeGenModel("RoleAssignment")] + public partial class KeyVaultRoleAssignment + { } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentProperties.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentProperties.cs new file mode 100644 index 0000000000000..e9e6b68b5ae5b --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentProperties.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Security.KeyVault.Administration.Models +{ + /// > + [CodeGenModel("RoleAssignmentProperties")] + public partial class KeyVaultRoleAssignmentProperties + { } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentPropertiesWithScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentPropertiesWithScope.cs new file mode 100644 index 0000000000000..d0169f7875945 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleAssignmentPropertiesWithScope.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Security.KeyVault.Administration.Models +{ + /// > + [CodeGenModel("RoleAssignmentPropertiesWithScope")] + public partial class KeyVaultRoleAssignmentPropertiesWithScope + { } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleAssignmentScope.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs similarity index 56% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleAssignmentScope.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs index 5cb43ddd5380d..00fb50ed60798 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleAssignmentScope.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultRoleScope.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -10,7 +10,7 @@ namespace Azure.Security.KeyVault.Administration /// /// A scope of the role assignment. /// - public readonly struct RoleAssignmentScope : IEquatable + public readonly struct KeyVaultRoleScope : IEquatable { internal const string GlobalValue = "/"; internal const string KeysValue = "/keys"; @@ -18,19 +18,19 @@ namespace Azure.Security.KeyVault.Administration private readonly string _value; /// - /// Initializes a new instance of the structure. + /// Initializes a new instance of the structure. /// /// The string value of the instance. - public RoleAssignmentScope(string value) + public KeyVaultRoleScope(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } /// - /// Initializes a new instance of the structure. + /// Initializes a new instance of the structure. /// /// The Resource Id for the given Resource. - public RoleAssignmentScope(Uri resourceId) + public KeyVaultRoleScope(Uri resourceId) { Argument.AssertNotNull(resourceId, nameof(resourceId)); @@ -50,41 +50,41 @@ public RoleAssignmentScope(Uri resourceId) /// /// Role assignments apply to everything on the resource. /// - public static RoleAssignmentScope Global { get; } = new RoleAssignmentScope(GlobalValue); + public static KeyVaultRoleScope Global { get; } = new KeyVaultRoleScope(GlobalValue); /// /// Role assignments apply to all Keys. /// - public static RoleAssignmentScope Keys { get; } = new RoleAssignmentScope(KeysValue); + public static KeyVaultRoleScope Keys { get; } = new KeyVaultRoleScope(KeysValue); /// - /// Determines if two values are the same. + /// Determines if two values are the same. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// True if and are the same; otherwise, false. - public static bool operator ==(RoleAssignmentScope left, RoleAssignmentScope right) => left.Equals(right); + public static bool operator ==(KeyVaultRoleScope left, KeyVaultRoleScope right) => left.Equals(right); /// - /// Determines if two values are different. + /// Determines if two values are different. /// - /// The first to compare. - /// The second to compare. + /// The first to compare. + /// The second to compare. /// True if and are different; otherwise, false. - public static bool operator !=(RoleAssignmentScope left, RoleAssignmentScope right) => !left.Equals(right); + public static bool operator !=(KeyVaultRoleScope left, KeyVaultRoleScope right) => !left.Equals(right); /// - /// Converts a string to a . + /// Converts a string to a . /// /// The string value to convert. - public static implicit operator RoleAssignmentScope(string value) => new RoleAssignmentScope(value); + public static implicit operator KeyVaultRoleScope(string value) => new KeyVaultRoleScope(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RoleAssignmentScope other && Equals(other); + public override bool Equals(object obj) => obj is KeyVaultRoleScope other && Equals(other); /// - public bool Equals(RoleAssignmentScope other) => string.Equals(_value, other._value, StringComparison.Ordinal); + public bool Equals(KeyVaultRoleScope other) => string.Equals(_value, other._value, StringComparison.Ordinal); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs index 5b2cc7281c2fc..8cf126a2c8da7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/RoleDefinition.cs @@ -6,7 +6,7 @@ namespace Azure.Security.KeyVault.Administration.Models { /// - [CodeGenModel(Usage = new[]{"input", "output"})] - public partial class RoleDefinition + [CodeGenModel("RoleDefinition", Usage = new[]{"input", "output"})] + public partial class KeyVaultRoleDefinition { } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs index 6d683d9031923..7f7456b3c4320 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs @@ -18,7 +18,7 @@ public AccessControlClientLiveTests(bool isAsync) : base(isAsync, RecordedTestMo [Test] public async Task GetRoleDefinitions() { - List results = await Client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List results = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); Assert.That(results.Count, Is.Not.Zero); Assert.That(results[0].AssignableScopes, Is.Not.Empty); @@ -34,11 +34,11 @@ public async Task GetRoleDefinitions() [Test] public async Task CreateRoleAssignment() { - List definitions = await Client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); - var properties = new RoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); - RoleAssignment result = await Client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); + var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); + KeyVaultRoleAssignment result = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); RegisterForCleanup(result); @@ -52,15 +52,15 @@ public async Task CreateRoleAssignment() [Test] public async Task GetRoleAssignment() { - List definitions = await Client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); - var properties = new RoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); - RoleAssignment assignment = await Client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); + var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); + KeyVaultRoleAssignment assignment = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); RegisterForCleanup(assignment); - RoleAssignment result = await Client.GetRoleAssignmentAsync(RoleAssignmentScope.Global, assignment.Name).ConfigureAwait(false); + KeyVaultRoleAssignment result = await Client.GetRoleAssignmentAsync(KeyVaultRoleScope.Global, assignment.Name).ConfigureAwait(false); Assert.That(result.Id, Is.EqualTo(assignment.Id)); Assert.That(result.Name, Is.EqualTo(assignment.Name)); @@ -73,13 +73,13 @@ public async Task GetRoleAssignment() [Test] public async Task DeleteRoleAssignment() { - List definitions = await Client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); - var properties = new RoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); - RoleAssignment assignment = await Client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); + var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); + KeyVaultRoleAssignment assignment = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); - RoleAssignment result = await Client.DeleteRoleAssignmentAsync(RoleAssignmentScope.Global, assignment.Name).ConfigureAwait(false); + KeyVaultRoleAssignment result = await Client.DeleteRoleAssignmentAsync(KeyVaultRoleScope.Global, assignment.Name).ConfigureAwait(false); Assert.That(result.Id, Is.EqualTo(assignment.Id)); Assert.That(result.Name, Is.EqualTo(assignment.Name)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs index 95098bf41d239..dc25e2e16b48c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs @@ -102,7 +102,7 @@ protected async Task DeleteRoleAssignment((string Name, string Scope) assignment } } - protected void RegisterForCleanup(RoleAssignment assignment) + protected void RegisterForCleanup(KeyVaultRoleAssignment assignment) { _roleAssignmentsToDelete.Enqueue((assignment.Name, assignment.Properties.Scope)); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs index 63ec378c95281..d48b251178f39 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/RoleAssignmentScopeTests.cs @@ -16,11 +16,11 @@ public class RoleAssignmentScopeTests [TestCase(default(Uri))] public void CtorValidatesArgs(object arg) { - Assert.That(() => new RoleAssignmentScope(default(string)), Throws.ArgumentNullException); - Assert.That(() => new RoleAssignmentScope(default(Uri)), Throws.ArgumentNullException); + Assert.That(() => new KeyVaultRoleScope(default(string)), Throws.ArgumentNullException); + Assert.That(() => new KeyVaultRoleScope(default(Uri)), Throws.ArgumentNullException); - Assert.That(() => new RoleAssignmentScope("someScope"), Throws.Nothing); - Assert.That(() => new RoleAssignmentScope(new Uri("https://myvault.vault.azure.net/keys/keyName")), Throws.Nothing); + Assert.That(() => new KeyVaultRoleScope("someScope"), Throws.Nothing); + Assert.That(() => new KeyVaultRoleScope(new Uri("https://myvault.vault.azure.net/keys/keyName")), Throws.Nothing); } [Test] @@ -29,7 +29,7 @@ public void CtorValidatesArgs(object arg) [TestCase("https://myvault.vault.azure.net/foo/fooName", "/foo/fooName")] public void CtorValidatesArgs(string id, string expectedValue) { - var ras = new RoleAssignmentScope(new Uri(id)); + var ras = new KeyVaultRoleScope(new Uri(id)); Assert.That(ras.ToString(), Is.EqualTo(expectedValue)); } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs index e7624775445ac..cb05744bf8f26 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs @@ -41,10 +41,10 @@ public void CreateClient() /*@@*/client = Client; // Retrieve all the role definitions. - List roleDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global).ToList(); + List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); // Retrieve all the role assignments. - List roleAssignments = client.GetRoleAssignments(RoleAssignmentScope.Global).ToList(); + List roleAssignments = client.GetRoleAssignments(KeyVaultRoleScope.Global).ToList(); #endregion } @@ -54,9 +54,9 @@ public void GetRoleDefinitions() { client = Client; #region Snippet:GetRoleDefinitions - Pageable allDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global); + Pageable allDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); - foreach (RoleDefinition roleDefinition in allDefinitions) + foreach (KeyVaultRoleDefinition roleDefinition in allDefinitions) { Console.WriteLine(roleDefinition.Id); Console.WriteLine(roleDefinition.RoleName); @@ -71,7 +71,7 @@ public void GetRoleDefinitions() public async Task CreateRoleAssignment() { client = Client; - List definitions = await Client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); _roleDefinitionId = definitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from the List the role definitions section above @@ -87,21 +87,21 @@ public async Task CreateRoleAssignment() // Replace with the service principal object id from the Create/Get credentials section above //@@string servicePrincipalObjectId = ""; - RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); + KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); //@@RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); - /*@@*/RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties, _roleAssignmentId); + /*@@*/KeyVaultRoleAssignment createdAssignment = client.CreateRoleAssignment(KeyVaultRoleScope.Global, properties, _roleAssignmentId); Console.WriteLine(createdAssignment.Name); Console.WriteLine(createdAssignment.Properties.PrincipalId); Console.WriteLine(createdAssignment.Properties.RoleDefinitionId); - RoleAssignment fetchedAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); Console.WriteLine(fetchedAssignment.Name); Console.WriteLine(fetchedAssignment.Properties.PrincipalId); Console.WriteLine(fetchedAssignment.Properties.RoleDefinitionId); - RoleAssignment deletedAssignment = client.DeleteRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment deletedAssignment = client.DeleteRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); Console.WriteLine(deletedAssignment.Name); Console.WriteLine(deletedAssignment.Properties.PrincipalId); @@ -118,7 +118,7 @@ public void RoleAssignmentNotFound() #region Snippet:RoleAssignmentNotFound try { - RoleAssignment roleAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, "invalid-name"); + KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "invalid-name"); } catch (RequestFailedException ex) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs index 6c7cc22c3c403..57e3c53e77a4d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs @@ -49,12 +49,12 @@ public void GetDefinitionsAndAssignmentsSync() // Retrieve all the role definitions. #region Snippet:GetRoleDefinitionsSync - List roleDefinitions = client.GetRoleDefinitions(RoleAssignmentScope.Global).ToList(); + List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); #endregion // Retrieve all the role assignments. #region Snippet:GetRoleAssignmentsSync - List roleAssignments = client.GetRoleAssignments(RoleAssignmentScope.Global).ToList(); + List roleAssignments = client.GetRoleAssignments(KeyVaultRoleScope.Global).ToList(); #endregion } @@ -68,8 +68,8 @@ public async Task GetDefinitionsAndAssignmentsAsync() // Retrieve all the role definitions. #region Snippet:GetRoleDefinitionsAsync - List roleDefinitions = new List(); - await foreach (var definition in client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global)) + List roleDefinitions = new List(); + await foreach (var definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) { roleDefinitions.Add(definition); } @@ -77,8 +77,8 @@ public async Task GetDefinitionsAndAssignmentsAsync() // Retrieve all the role assignments. #region Snippet:GetRoleAssignmentsAsync - List roleAssignments = new List(); - await foreach (var assignment in client.GetRoleAssignmentsAsync(RoleAssignmentScope.Global)) + List roleAssignments = new List(); + await foreach (var assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) { roleAssignments.Add(assignment); } @@ -92,7 +92,7 @@ public void CreateRoleAssignment() // Replace client with the Instrumented Client. client = Client; - List definitions = client.GetRoleDefinitions(RoleAssignmentScope.Global).ToList(); + List definitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); _roleDefinitionId = definitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from GetRoleAssignments. @@ -105,17 +105,17 @@ public void CreateRoleAssignment() //@@string definitionIdToAssign = ""; //@@string servicePrincipalObjectId = ""; - RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); + KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); //@@RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); - /*@@*/RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties, _roleAssignmentId); + /*@@*/KeyVaultRoleAssignment createdAssignment = client.CreateRoleAssignment(KeyVaultRoleScope.Global, properties, _roleAssignmentId); #endregion #region Snippet:GetRoleAssignment - RoleAssignment fetchedAssignment = client.GetRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); #endregion #region Snippet:DeleteRoleAssignment - RoleAssignment deletedAssignment = client.DeleteRoleAssignment(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment deletedAssignment = client.DeleteRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); #endregion } @@ -126,7 +126,7 @@ public async Task CreateRoleAssignmentAsync() // Replace client with the Instrumented Client. client = Client; - List definitions = await client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); _roleDefinitionId = definitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from GetRoleDefinitionsAsync. @@ -139,17 +139,17 @@ public async Task CreateRoleAssignmentAsync() //@@string definitionIdToAssign = ""; //@@string servicePrincipalObjectId = ""; - RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); + KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); //@@RoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties); - /*@@*/RoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); + /*@@*/KeyVaultRoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); #endregion #region Snippet:GetRoleAssignmentAsync - RoleAssignment fetchedAssignment = await client.GetRoleAssignmentAsync(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment fetchedAssignment = await client.GetRoleAssignmentAsync(KeyVaultRoleScope.Global, createdAssignment.Name); #endregion #region Snippet:DeleteRoleAssignmentAsync - RoleAssignment deletedAssignment = await client.DeleteRoleAssignmentAsync(RoleAssignmentScope.Global, createdAssignment.Name); + KeyVaultRoleAssignment deletedAssignment = await client.DeleteRoleAssignmentAsync(KeyVaultRoleScope.Global, createdAssignment.Name); #endregion } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs index 7a56ab479633b..de30a2b8cb554 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs @@ -32,7 +32,7 @@ public async Task CreateRoleAssignmentAsync() // Replace client with the Instrumented Client. client = Client; - List definitions = await client.GetRoleDefinitionsAsync(RoleAssignmentScope.Global).ToEnumerableAsync().ConfigureAwait(false); + List definitions = await client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); _roleDefinitionId = definitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from GetRoleDefinitionsAsync. @@ -45,9 +45,9 @@ public async Task CreateRoleAssignmentAsync() //@@string definitionIdToAssign = ""; //@@string servicePrincipalObjectId = ""; - RoleAssignmentProperties properties = new RoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); + KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); //@@RoleAssignment keysScopedAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties); - /*@@*/RoleAssignment keysScopedAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Keys, properties, _roleAssignmentId).ConfigureAwait(false); + /*@@*/KeyVaultRoleAssignment keysScopedAssignment = await client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Keys, properties, _roleAssignmentId).ConfigureAwait(false); #endregion RegisterForCleanup(keysScopedAssignment); @@ -61,7 +61,7 @@ public async Task CreateRoleAssignmentAsync() KeyVaultKey key = await keyClient.GetKeyAsync(keyName); //@@RoleAssignment keyScopedAssignment = await client.CreateRoleAssignmentAsync(new RoleAssignmentScope(key.Id), properties); - /*@@*/RoleAssignment keyScopedAssignment = await client.CreateRoleAssignmentAsync(new RoleAssignmentScope(key.Id), properties, _roleAssignmentId).ConfigureAwait(false); + /*@@*/KeyVaultRoleAssignment keyScopedAssignment = await client.CreateRoleAssignmentAsync(new KeyVaultRoleScope(key.Id), properties, _roleAssignmentId).ConfigureAwait(false); #endregion RegisterForCleanup(keyScopedAssignment); From de8909577e9f1b4490d38995e5c288df79e44c10 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 28 Aug 2020 13:43:41 -0500 Subject: [PATCH 05/16] version change --- .../Azure.Security.KeyVault.Administration/CHANGELOG.md | 3 ++- sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md | 2 +- .../src/Azure.Security.KeyVault.Administration.csproj | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md index dd46299edc3d2..802ddf8fc787c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 4.1.0-preview.1 (Unreleased) +## 4.2.0-beta.1 (Unreleased) ### Added - Add `KeyVaultAccessControlClient`. +- Add `KeyVaultBackupClient`. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index e0c557107d99f..442ba276abc68 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -10,7 +10,7 @@ The Azure Key Vault administration library clients support administrative tasks Install the Azure Key Vault administration client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Administration --version 4.2.0-preview.1 +Install-Package Azure.Security.KeyVault.Administration --version 4.2.0-beta.1 ``` ### Prerequisites diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj index ce9f455385ccb..79e45ca09d475 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj @@ -3,7 +3,7 @@ This is the Microsoft Azure Key Vault Administration client library Microsoft Azure.Security.KeyVault.Administration client library - 4.1.0-preview.1 + 4.2.0-beta.1 Microsoft Azure Key Vault Administration;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021;CA1812 From 6921fff0093b171c0a15e31aaa432f1f4f092b70 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 09:48:47 -0500 Subject: [PATCH 06/16] fix readme nuget version --- sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index 442ba276abc68..635a805397ab6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -10,7 +10,7 @@ The Azure Key Vault administration library clients support administrative tasks Install the Azure Key Vault administration client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Administration --version 4.2.0-beta.1 +Install-Package Azure.Security.KeyVault.Administration --version 4.0.0-beta.1 ``` ### Prerequisites From 70bd691310903f701e457a347f66beaba81ac717 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 09:56:03 -0500 Subject: [PATCH 07/16] remove test auth --- .../tests/BackupRestoreTestBase.cs | 6 ++---- .../BackupAndRestoreSampleAsyncAsync.json | 5 +++-- .../BackupAndRestoreSampleSync.json | 5 +++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs index cf2e71d68df70..690652dd1ce72 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/BackupRestoreTestBase.cs @@ -32,10 +32,8 @@ private KeyVaultBackupClient GetClient(TestRecording recording = null) return InstrumentClient (new KeyVaultBackupClient( - //new Uri(TestEnvironment.KeyVaultUrl), - new Uri("https://eastus2.chriss-EU2.managedhsm-int.azure-int.net"), - //TestEnvironment.Credential, - new Identity.DefaultAzureCredential(new Identity.DefaultAzureCredentialOptions { SharedTokenCacheTenantId = "f686d426-8d16-42db-81b7-ab578e110ccd", VisualStudioTenantId = "f686d426-8d16-42db-81b7-ab578e110ccd" }), + new Uri(TestEnvironment.KeyVaultUrl), + TestEnvironment.Credential, recording.InstrumentClientOptions(new KeyVaultBackupClientOptions()))); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json index 9fee2f4a3df70..08428624bb0e7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json @@ -346,6 +346,7 @@ "Variables": { "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "380846839" + "RandomSeed": "380846839", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json index 201721092d5f8..16bf239d682b8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json @@ -517,6 +517,7 @@ "Variables": { "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "2048415340" + "RandomSeed": "2048415340", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" } -} \ No newline at end of file +} From d348b276dbe015252254f817e9d67fe679d2ea38 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 11:37:29 -0500 Subject: [PATCH 08/16] fix tests --- .../readme.md | 4 +- .../tests/AccessControlClientLiveTests.cs | 14 +- .../tests/AccessControlTestBase.cs | 2 +- .../CreateClient.json | 365 +++++++++++++++ .../CreateRoleAssignment.json | 414 ++++++++++++++++++ .../GetRoleDefinitions.json | 292 ++++++++++++ .../RoleAssignmentNotFound.json | 70 +++ .../RbacHelloWorld/CreateClient.json | 4 +- .../RbacHelloWorld/CreateRoleAssignment.json | 141 ++++-- .../CreateRoleAssignmentAsyncAsync.json | 147 +++++-- ...etDefinitionsAndAssignmentsAsyncAsync.json | 193 ++++---- .../GetDefinitionsAndAssignmentsSync.json | 193 ++++---- .../CreateRoleAssignmentAsync.json | 275 ++++++------ .../CreateRoleAssignmentAsyncAsync.json | 285 +++++++----- .../CreateClientSample.json | 4 +- .../CreateClientSampleAsync.json | 4 +- .../SampleSnippets/CreateClient.json | 12 +- .../SampleSnippets/CreateRoleAssignment.json | 16 +- .../SampleSnippets/GetRoleDefinitions.json | 10 +- .../RoleAssignmentNotFound.json | 8 +- .../samples/AccessControlSampleSnippets.cs | 19 +- .../tests/samples/Sample1_RbacHelloWorld.cs | 10 +- .../samples/Sample2_RbacScopeAssignment.cs | 2 +- 23 files changed, 1906 insertions(+), 578 deletions(-) create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json create mode 100644 sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index 635a805397ab6..24c109a5e54a1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -10,7 +10,7 @@ The Azure Key Vault administration library clients support administrative tasks Install the Azure Key Vault administration client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Administration --version 4.0.0-beta.1 +dotnet install Azure.Security.KeyVault.Administration --version 4.0.0-beta.1 ``` ### Prerequisites @@ -27,7 +27,7 @@ Client secret credential authentication is being used in this getting started se or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: ```PowerShell -Install-Package Azure.Identity +dotnet install Azure.Identity ``` #### Create/Get credentials diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs index 7f7456b3c4320..99257063f8ecd 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlClientLiveTests.cs @@ -15,7 +15,7 @@ public class AccessControlClientLiveTests : AccessControlTestBase public AccessControlClientLiveTests(bool isAsync) : base(isAsync, RecordedTestMode.Playback /* To record tests, change this argument to RecordedTestMode.Record */) { } - [Test] + [RecordedTest] public async Task GetRoleDefinitions() { List results = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); @@ -31,11 +31,11 @@ public async Task GetRoleDefinitions() Assert.That(results[0].Type, Is.Not.Null); } - [Test] + [RecordedTest] public async Task CreateRoleAssignment() { List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); - var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); + var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName.Contains(RoleName)); var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); KeyVaultRoleAssignment result = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); @@ -49,11 +49,11 @@ public async Task CreateRoleAssignment() Assert.That(result.Properties.RoleDefinitionId, Is.EqualTo(properties.RoleDefinitionId)); } - [Test] + [RecordedTest] public async Task GetRoleAssignment() { List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); - var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); + var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName.Contains(RoleName)); var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); KeyVaultRoleAssignment assignment = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); @@ -70,11 +70,11 @@ public async Task GetRoleAssignment() Assert.That(result.Properties.Scope, Is.EqualTo(assignment.Properties.Scope)); } - [Test] + [RecordedTest] public async Task DeleteRoleAssignment() { List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); - var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName == RoleName); + var definitionToAssign = definitions.FirstOrDefault(d => d.RoleName.Contains(RoleName)); var properties = new KeyVaultRoleAssignmentProperties(definitionToAssign.Id, TestEnvironment.ClientObjectId); KeyVaultRoleAssignment assignment = await Client.CreateRoleAssignmentAsync(KeyVaultRoleScope.Global, properties, _roleAssignmentId).ConfigureAwait(false); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs index dc25e2e16b48c..09faebeb84318 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/AccessControlTestBase.cs @@ -24,7 +24,7 @@ public class AccessControlTestBase : RecordedTestBase internal KeyVaultAccessControlClient client; #pragma warning restore IDE1006 // Naming Styles - internal const string RoleName = "Azure Key Vault Managed HSM Crypto User"; + internal const string RoleName = "Managed HSM Crypto User"; internal readonly Guid _roleAssignmentId = new Guid("e7ae2aff-eb17-4c9d-84f0-d12f7f468f16"); internal string _roleDefinitionId; internal string _objectId; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json new file mode 100644 index 0000000000000..acc71a2ea5197 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json @@ -0,0 +1,365 @@ +{ + "Entries": [ + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "051884ad2febc6d83830eb9cda2374d2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "1" + }, + "ResponseBody": "OK" + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "051884ad2febc6d83830eb9cda2374d2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "424" + }, + "ResponseBody": { + "value": [ + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "name": "a290e904-7015-4bba-90c8-60543313cdb4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "name": "515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Officer", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "name": "21dbd100-6940-42c2-9190-5d6cb909625b", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto User", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "name": "4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Policy Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "name": "2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Auditor", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17", + "name": "33413926-3206-4cdd-b39a-83574fe37a17", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + } + ] + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "6593970583c338fa4c437cd4ad2aecce", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1607", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "1" + }, + "ResponseBody": { + "value": [ + { + "id": "/providers/Microsoft.Authorization/roleAssignments/967a0ebd-73a1-0145-85fc-3b6514ac2581", + "name": "967a0ebd-73a1-0145-85fc-3b6514ac2581", + "properties": { + "principalId": "e7941875-b7e4-4ba2-9527-d3ef2a9b58fa", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + }, + { + "id": "/providers/Microsoft.Authorization/roleAssignments/8e7fe831-35fe-0488-beaf-5b0866306cbb", + "name": "8e7fe831-35fe-0488-beaf-5b0866306cbb", + "properties": { + "principalId": "4f584d72-47b3-48d1-971c-ce0ae8a47560", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + }, + { + "id": "/providers/Microsoft.Authorization/roleAssignments/1587adcd-1227-4799-03dc-a4194c659c07", + "name": "1587adcd-1227-4799-03dc-a4194c659c07", + "properties": { + "principalId": "2bca474d-4fac-495d-919a-30376e0fe515", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + }, + { + "id": "/providers/Microsoft.Authorization/roleAssignments/129c2001-45e7-0814-13d0-9d933e794b37", + "name": "129c2001-45e7-0814-13d0-9d933e794b37", + "properties": { + "principalId": "d0596a07-8d8d-433f-a25e-5c6f46787784", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + } + ] + } + } + ], + "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", + "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "RandomSeed": "464879308" + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json new file mode 100644 index 0000000000000..e2f73c91c6bc1 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json @@ -0,0 +1,414 @@ +{ + "Entries": [ + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "a89708424c75bad9e33639b9b744e27b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-server-latency": "1" + }, + "ResponseBody": "OK" + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "a89708424c75bad9e33639b9b744e27b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-server-latency": "1" + }, + "ResponseBody": { + "value": [ + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "name": "a290e904-7015-4bba-90c8-60543313cdb4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "name": "515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Officer", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "name": "21dbd100-6940-42c2-9190-5d6cb909625b", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto User", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "name": "4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Policy Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "name": "2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Auditor", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17", + "name": "33413926-3206-4cdd-b39a-83574fe37a17", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + } + ] + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestMethod": "PUT", + "RequestHeaders": { + "Authorization": "Sanitized", + "Content-Length": "196", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "9f98a703f069a344e404498c3486c6bd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "properties": { + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "398", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-server-latency": "263" + }, + "ResponseBody": { + "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "name": "e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "properties": { + "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "0be3e95248e3e354785d06295258d4bd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "398", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-server-latency": "0" + }, + "ResponseBody": { + "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "name": "e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "properties": { + "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "1a9badbabe555105c3f4c470034c855c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "398", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-server-latency": "264" + }, + "ResponseBody": { + "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "name": "e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", + "properties": { + "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "scope": "/" + }, + "type": "Microsoft.Authorization/roleAssignments" + } + } + ], + "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", + "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "RandomSeed": "1044942597" + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json new file mode 100644 index 0000000000000..22537991d24d2 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json @@ -0,0 +1,292 @@ +{ + "Entries": [ + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "13406a6821ce5ec1f2dd073496777611", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "0" + }, + "ResponseBody": "OK" + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "13406a6821ce5ec1f2dd073496777611", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "1" + }, + "ResponseBody": { + "value": [ + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", + "name": "a290e904-7015-4bba-90c8-60543313cdb4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "name": "515eb02d-2335-4d2d-92f2-b1cbdf9c3778", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/restore/action", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/delete", + "Microsoft.KeyVault/managedHsm/keys/export/action", + "Microsoft.KeyVault/managedHsm/keys/import/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Officer", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", + "name": "21dbd100-6940-42c2-9190-5d6cb909625b", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/write/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action", + "Microsoft.KeyVault/managedHsm/keys/create", + "Microsoft.KeyVault/managedHsm/keys/encrypt/action", + "Microsoft.KeyVault/managedHsm/keys/decrypt/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action", + "Microsoft.KeyVault/managedHsm/keys/sign/action", + "Microsoft.KeyVault/managedHsm/keys/verify/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto User", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "name": "4bd23610-cdcf-4971-bdee-bdc562cc28e4", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", + "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Policy Administrator", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "name": "2c18b078-7c48-4d3a-af88-5a3a1b3f82b3", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Auditor", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/33413926-3206-4cdd-b39a-83574fe37a17", + "name": "33413926-3206-4cdd-b39a-83574fe37a17", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/keys/read/action", + "Microsoft.KeyVault/managedHsm/keys/wrap/action", + "Microsoft.KeyVault/managedHsm/keys/unwrap/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + } + ] + } + } + ], + "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", + "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "RandomSeed": "1832433612" + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json new file mode 100644 index 0000000000000..2cf18b4668f37 --- /dev/null +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "1d6a817047b13794f0a3a4f396eeabe5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "0" + }, + "ResponseBody": "OK" + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "1d6a817047b13794f0a3a4f396eeabe5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "143", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-server-latency": "1" + }, + "ResponseBody": { + "error": { + "code": "RoleAssignmentNotFound", + "message": "Requested role assignment not found (Activity ID: 2aacf0fc-ec62-11ea-a758-0242ac120008)" + } + } + } + ], + "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", + "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", + "RandomSeed": "599689335" + } +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateClient.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateClient.json index 4145fdfbf41ec..8d3ea0ea061a3 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateClient.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateClient.json @@ -1,8 +1,8 @@ { "Entries": [], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1129588271" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json index 3208006f32175..2405bd556725c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d9fdd9205609333967f0f6501670e9b1", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d9fdd9205609333967f0f6501670e9b1", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,15 +284,15 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e81f3a85f94db58dde6c641c8ea7273d", "x-ms-return-client-request-id": "true" @@ -260,12 +305,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "251" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -279,13 +329,13 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "af559c4c92cd0a64f14d8d01ba26a28e", "x-ms-return-client-request-id": "true" @@ -293,12 +343,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -312,13 +368,13 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f3b961055aa0274f4b47fb9cf21ca4bf", "x-ms-return-client-request-id": "true" @@ -326,12 +382,17 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "306" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -346,8 +407,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1288883537" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json index 7abf5c9bfc150..3c8ef89d61ca7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8e35e518c3599a4353f0f97d21d8a1c4", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8e35e518c3599a4353f0f97d21d8a1c4", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +284,16 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-da641a2def3d464698a44d37b88856b9-6b80d6edada75046-00", + "traceparent": "00-90bb22465679c4488498f035be7a61e8-7c594aea6935c643-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "6e4fda9ec81a63495a9a0fc713b47115", "x-ms-return-client-request-id": "true" @@ -261,12 +306,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "233" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +330,14 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-eaa25ffd52b2cf4bbddfa7f2cebfe285-1eb65c78524d9245-00", + "traceparent": "00-96957834b475a14686cd5d50e98aa47e-b4d37e92ecf78643-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1907f0453149d1671ec2f0f13d2fff2e", "x-ms-return-client-request-id": "true" @@ -295,12 +345,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -314,14 +370,14 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", - "traceparent": "00-334a943fca7e9b49ac5af3bcf8202b6f-be5dd5565f63564b-00", + "traceparent": "00-4b739b0a1ba502478ff336852be587cf-82a93fb2459bfe4c-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2d9ba953643d4fbc9bd134bfb47c869f", "x-ms-return-client-request-id": "true" @@ -329,12 +385,17 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "275" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -349,8 +410,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "943677510" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json index 434ac7000767f..8920d0f32e618 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "fe0ca39894b11413c136da734dd3f3f1", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "fe0ca39894b11413c136da734dd3f3f1", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,13 +284,13 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5dc73b68d07d5cd5e12fb6eff1f8e81c", "x-ms-return-client-request-id": "true" @@ -253,110 +298,56 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "4013", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "1607", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ { - "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae1909-ad3f-4816-9101-4d70d38c04cc", - "name": "e7ae1909-ad3f-4816-9101-4d70d38c04cc", + "id": "/providers/Microsoft.Authorization/roleAssignments/967a0ebd-73a1-0145-85fc-3b6514ac2581", + "name": "967a0ebd-73a1-0145-85fc-3b6514ac2581", "properties": { - "principalId": "74677558-f369-4792-afe5-f99738b5fa7c", + "principalId": "e7941875-b7e4-4ba2-9527-d3ef2a9b58fa", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/e557f309-c91e-4171-97ce-2fe127fce594", - "name": "e557f309-c91e-4171-97ce-2fe127fce594", + "id": "/providers/Microsoft.Authorization/roleAssignments/8e7fe831-35fe-0488-beaf-5b0866306cbb", + "name": "8e7fe831-35fe-0488-beaf-5b0866306cbb", "properties": { - "principalId": "bf0cee9f-b26b-4e25-b4ab-92ec7466cf33", + "principalId": "4f584d72-47b3-48d1-971c-ce0ae8a47560", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/5a3ee042-6c5e-4043-a24a-446e1fd37c02", - "name": "5a3ee042-6c5e-4043-a24a-446e1fd37c02", + "id": "/providers/Microsoft.Authorization/roleAssignments/1587adcd-1227-4799-03dc-a4194c659c07", + "name": "1587adcd-1227-4799-03dc-a4194c659c07", "properties": { - "principalId": "8917b591-e9ee-4ad8-8340-a202d5f619e7", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/3f2ebfaa-3b3c-42af-a5ff-28784f16121c", - "name": "3f2ebfaa-3b3c-42af-a5ff-28784f16121c", - "properties": { - "principalId": "8917b591-e9ee-4ad8-8340-a202d5f619e7", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/214524a2-a558-47a3-9c8a-361ac87de2a9", - "name": "214524a2-a558-47a3-9c8a-361ac87de2a9", - "properties": { - "principalId": "ade81686-dde7-4bb0-9062-8f5250ff95eb", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/f91ad36a-1052-465a-b827-4bac774ffe9e", - "name": "f91ad36a-1052-465a-b827-4bac774ffe9e", - "properties": { - "principalId": "484a373e-10ae-4ce3-bef3-2a25e9df2c4c", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/2bdc452b-14c0-4aed-85b1-6bb85d36a7e8", - "name": "2bdc452b-14c0-4aed-85b1-6bb85d36a7e8", - "properties": { - "principalId": "484a373e-10ae-4ce3-bef3-2a25e9df2c4c", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/0534df84-73d4-4242-bdbd-e023254dd73e", - "name": "0534df84-73d4-4242-bdbd-e023254dd73e", - "properties": { - "principalId": "3c1303ad-140b-493c-ab45-bed8ddbfa72c", + "principalId": "2bca474d-4fac-495d-919a-30376e0fe515", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/8aac35e6-56ef-4832-b646-200cb59bf3fd", - "name": "8aac35e6-56ef-4832-b646-200cb59bf3fd", - "properties": { - "principalId": "ade81686-dde7-4bb0-9062-8f5250ff95eb", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/032ae33e-6079-44f4-96a6-9f8a3bdce2b4", - "name": "032ae33e-6079-44f4-96a6-9f8a3bdce2b4", + "id": "/providers/Microsoft.Authorization/roleAssignments/129c2001-45e7-0814-13d0-9d933e794b37", + "name": "129c2001-45e7-0814-13d0-9d933e794b37", "properties": { - "principalId": "f84ae8f9-c979-4750-a2fe-b350a00bebff", + "principalId": "d0596a07-8d8d-433f-a25e-5c6f46787784", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, @@ -367,8 +358,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "677524810" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json index 0315a27235af8..c27f4a9c6fbed 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "bb313c589840408589435f23f8506c77", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "bb313c589840408589435f23f8506c77", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,13 +284,13 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8e0cc9ce5bbd7e88f4fa00a002903fe9", "x-ms-return-client-request-id": "true" @@ -253,110 +298,56 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "4013", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "1607", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "value": [ { - "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae1909-ad3f-4816-9101-4d70d38c04cc", - "name": "e7ae1909-ad3f-4816-9101-4d70d38c04cc", + "id": "/providers/Microsoft.Authorization/roleAssignments/967a0ebd-73a1-0145-85fc-3b6514ac2581", + "name": "967a0ebd-73a1-0145-85fc-3b6514ac2581", "properties": { - "principalId": "74677558-f369-4792-afe5-f99738b5fa7c", + "principalId": "e7941875-b7e4-4ba2-9527-d3ef2a9b58fa", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/e557f309-c91e-4171-97ce-2fe127fce594", - "name": "e557f309-c91e-4171-97ce-2fe127fce594", + "id": "/providers/Microsoft.Authorization/roleAssignments/8e7fe831-35fe-0488-beaf-5b0866306cbb", + "name": "8e7fe831-35fe-0488-beaf-5b0866306cbb", "properties": { - "principalId": "bf0cee9f-b26b-4e25-b4ab-92ec7466cf33", + "principalId": "4f584d72-47b3-48d1-971c-ce0ae8a47560", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/5a3ee042-6c5e-4043-a24a-446e1fd37c02", - "name": "5a3ee042-6c5e-4043-a24a-446e1fd37c02", + "id": "/providers/Microsoft.Authorization/roleAssignments/1587adcd-1227-4799-03dc-a4194c659c07", + "name": "1587adcd-1227-4799-03dc-a4194c659c07", "properties": { - "principalId": "8917b591-e9ee-4ad8-8340-a202d5f619e7", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/3f2ebfaa-3b3c-42af-a5ff-28784f16121c", - "name": "3f2ebfaa-3b3c-42af-a5ff-28784f16121c", - "properties": { - "principalId": "8917b591-e9ee-4ad8-8340-a202d5f619e7", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/214524a2-a558-47a3-9c8a-361ac87de2a9", - "name": "214524a2-a558-47a3-9c8a-361ac87de2a9", - "properties": { - "principalId": "ade81686-dde7-4bb0-9062-8f5250ff95eb", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/f91ad36a-1052-465a-b827-4bac774ffe9e", - "name": "f91ad36a-1052-465a-b827-4bac774ffe9e", - "properties": { - "principalId": "484a373e-10ae-4ce3-bef3-2a25e9df2c4c", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/2bdc452b-14c0-4aed-85b1-6bb85d36a7e8", - "name": "2bdc452b-14c0-4aed-85b1-6bb85d36a7e8", - "properties": { - "principalId": "484a373e-10ae-4ce3-bef3-2a25e9df2c4c", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/0534df84-73d4-4242-bdbd-e023254dd73e", - "name": "0534df84-73d4-4242-bdbd-e023254dd73e", - "properties": { - "principalId": "3c1303ad-140b-493c-ab45-bed8ddbfa72c", + "principalId": "2bca474d-4fac-495d-919a-30376e0fe515", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, "type": "Microsoft.Authorization/roleAssignments" }, { - "id": "/providers/Microsoft.Authorization/roleAssignments/8aac35e6-56ef-4832-b646-200cb59bf3fd", - "name": "8aac35e6-56ef-4832-b646-200cb59bf3fd", - "properties": { - "principalId": "ade81686-dde7-4bb0-9062-8f5250ff95eb", - "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/515eb02d-2335-4d2d-92f2-b1cbdf9c3778", - "scope": "/keys" - }, - "type": "Microsoft.Authorization/roleAssignments" - }, - { - "id": "/providers/Microsoft.Authorization/roleAssignments/032ae33e-6079-44f4-96a6-9f8a3bdce2b4", - "name": "032ae33e-6079-44f4-96a6-9f8a3bdce2b4", + "id": "/providers/Microsoft.Authorization/roleAssignments/129c2001-45e7-0814-13d0-9d933e794b37", + "name": "129c2001-45e7-0814-13d0-9d933e794b37", "properties": { - "principalId": "f84ae8f9-c979-4750-a2fe-b350a00bebff", + "principalId": "d0596a07-8d8d-433f-a25e-5c6f46787784", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/a290e904-7015-4bba-90c8-60543313cdb4", "scope": "/" }, @@ -367,8 +358,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1996890729" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json index 6d1885958dd27..b5569eebed54a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "08665a931011dc0761a6b5960748e519", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "08665a931011dc0761a6b5960748e519", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +284,16 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-117a275e5061a04ca3989ae6f3aaa9ab-78faed758356af42-00", + "traceparent": "00-0b196b83e907b14e84f6589fd36d2b4f-3aa16ef949be8d42-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e5e3e86e3240d4cb1aae210c06a286b3", "x-ms-return-client-request-id": "true" @@ -261,12 +306,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "402", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "275" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +330,14 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/?api-version=7.1", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Content-Type": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1ea9c044ad27be226002b1e118f10cee", "x-ms-return-client-request-id": "true" @@ -295,24 +345,30 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { - "Content-Length": "0", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" }, - "ResponseBody": [] + "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/?api-version=7.1", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1ea9c044ad27be226002b1e118f10cee", "x-ms-return-client-request-id": "true" @@ -320,90 +376,46 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "1321", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "249", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "340" }, "ResponseBody": { "value": [ { "attributes": { - "created": 1594281595, + "created": 1598970291, "enabled": true, - "exportable": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281613 + "exportable": false, + "recoverableDays": 7, + "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", + "updated": 1598970291 }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k" - }, - { - "attributes": { - "created": 1594281616, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281616 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-key-plain" - }, - { - "attributes": { - "created": 1594281618, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281618 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-key-encrypted" - }, - { - "attributes": { - "created": 1594281621, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281621 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-eckey-plain" - }, - { - "attributes": { - "created": 1594281632, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281632 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key1" - }, - { - "attributes": { - "created": 1594281638, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281638 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key2" + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1" } ] } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/?api-version=7.1", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", - "traceparent": "00-933d9428db373f48a626a68cccd289ed-e73388980b990b4e-00", + "traceparent": "00-3813349148f2cc4d9f7a0c742319552f-4e1357fff4922e4e-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "c95c890d0891619c8f92ee62eefbd6be", "x-ms-return-client-request-id": "true" @@ -411,45 +423,55 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "691", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "724", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "94" }, "ResponseBody": { "attributes": { - "created": 1594281595, + "created": 1598970291, "enabled": true, - "exportable": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281613 + "exportable": false, + "recoverableDays": 7, + "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", + "updated": 1598970291 }, "key": { "e": "AQAB", "key_ops": [ + "verify", + "sign", + "unwrapKey", "decrypt", - "encrypt" + "encrypt", + "wrapKey" ], - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/0500e9c3ca0e000da3524818a2a5ae6f", + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/ebba8d16972a096fa765aeccd263d667", "kty": "RSA-HSM", - "n": "u1mD_yqfBn_DNVa1UQkmQ9M3WFdvJrviO0urx-7rWSJ0W8EA9-px7Vhv9CN_OF-OcQ2hfgeKwXd6szM3BiGfpWK0LNDYYoqg1vJp9sxyjYcx3-PlLopyoSr1k2WKpf0o9yYJh0u0X8gs82H4NcRkokDuPbfuggHPUTkFtML7KnKs8N2d0YK79lr0RuSSE5G0_WFBxFOkHikBJROFZBPfqVST08tKJO6YYlTEJ7d0rLa5YVR43oRWiaGQbeq_no7-k0Td4QyRy6E4-nrnz_P5TvxU1gFC6av6SOjtpr_KO4M5DJ5rkOhmECjJ09398gLxMPD-2hJ6mhoWZmDEq_f2Ew" + "n": "j_QtVIhfpncf4uyO_w-6GJCed9XWEEFsVc7G7pB9rBRzDlK_4_JSCea3v-79rpQceIrNKc-l0QrGwOSsxFi-RD63DmloXVK-4j1Bj56BK_VQu2DD83QK-3eoAKuE4GusVgVOpM_RyHyYGH6OEHQzIoVhpDPWGb4m8d-2O6aHh2c9VIuQXMh9SSRATh76ZYaVPNiSpDtqKxSJxgbOTJcHzQOKMyJ2fidl2ib4foCChLuZ8hn_30i_YwDEj5Edn6hjNSDGmW5d3iT5IFJb-RP13anebrgNBEpCZ07dLsf1H30LAfQ24BCWZS0z6fXwgidM3wXE6pQWSTTZpiY73UXusQ" } } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-d419f8f620b16846a3c2fea4428afb2d-7f42888d7ff30949-00", + "traceparent": "00-6623c769afcc2f478fa93f46a070089e-eba4c4043fcba149-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "4752011fc69fc0f2c624853e80eabc28", "x-ms-return-client-request-id": "true" @@ -462,12 +484,17 @@ }, "StatusCode": 201, "ResponseHeaders": { - "Content-Length": "427", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "408", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "413" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -475,14 +502,14 @@ "properties": { "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/keys/key-ov5x4xujjptq7dud4g4k" + "scope": "/keys/rsa-1" }, "type": "Microsoft.Authorization/roleAssignments" } } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "291087922" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json index 4826359bdca51..956fcd739f854 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json @@ -1,12 +1,12 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f1c23ebdec89e40b6f68bf4f08f90195", "x-ms-return-client-request-id": "true" @@ -14,22 +14,28 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f1c23ebdec89e40b6f68bf4f08f90195", "x-ms-return-client-request-id": "true" @@ -37,12 +43,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +90,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +143,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +175,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +201,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +225,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +250,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +284,16 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-cb928eda3683c84785f878593332c8d5-9d7874b7bf556540-00", + "traceparent": "00-6a48321d2d679549a8feb036f9299806-5c3806ec4223c24b-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1a64803059eccde05376084e51d096ba", "x-ms-return-client-request-id": "true" @@ -261,12 +306,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "402", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "310" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,15 +330,45 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/?api-version=7.1", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "2ca588a11f25550cbd1dc7e38af25108", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "2", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "0" + }, + "ResponseBody": "OK" + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2ca588a11f25550cbd1dc7e38af25108", "x-ms-return-client-request-id": "true" @@ -296,90 +376,46 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "1321", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "249", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "221" }, "ResponseBody": { "value": [ { "attributes": { - "created": 1594281595, - "enabled": true, - "exportable": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281613 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k" - }, - { - "attributes": { - "created": 1594281616, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281616 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-key-plain" - }, - { - "attributes": { - "created": 1594281618, + "created": 1598970291, "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281618 + "exportable": false, + "recoverableDays": 7, + "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", + "updated": 1598970291 }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-key-encrypted" - }, - { - "attributes": { - "created": 1594281621, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281621 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/import-eckey-plain" - }, - { - "attributes": { - "created": 1594281632, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281632 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key1" - }, - { - "attributes": { - "created": 1594281638, - "enabled": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281638 - }, - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key2" + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1" } ] } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/?api-version=7.1", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/?api-version=7.1", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", - "traceparent": "00-9715e929b22cea4793ec617db11877fb-befd753167b4aa48-00", + "traceparent": "00-41b9b9eff04f754798991bc46b24ec3b-cda4025bb66a5d42-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "bb64f190de25631c5ef59e12e3bd929f", "x-ms-return-client-request-id": "true" @@ -387,45 +423,55 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "691", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "724", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "143" }, "ResponseBody": { "attributes": { - "created": 1594281595, + "created": 1598970291, "enabled": true, - "exportable": true, - "recoverableDays": 90, - "recoveryLevel": "Recoverable\u002BPurgeable", - "updated": 1594281613 + "exportable": false, + "recoverableDays": 7, + "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", + "updated": 1598970291 }, "key": { "e": "AQAB", "key_ops": [ + "verify", + "sign", + "unwrapKey", "decrypt", - "encrypt" + "encrypt", + "wrapKey" ], - "kid": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/0500e9c3ca0e000da3524818a2a5ae6f", + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/ebba8d16972a096fa765aeccd263d667", "kty": "RSA-HSM", - "n": "u1mD_yqfBn_DNVa1UQkmQ9M3WFdvJrviO0urx-7rWSJ0W8EA9-px7Vhv9CN_OF-OcQ2hfgeKwXd6szM3BiGfpWK0LNDYYoqg1vJp9sxyjYcx3-PlLopyoSr1k2WKpf0o9yYJh0u0X8gs82H4NcRkokDuPbfuggHPUTkFtML7KnKs8N2d0YK79lr0RuSSE5G0_WFBxFOkHikBJROFZBPfqVST08tKJO6YYlTEJ7d0rLa5YVR43oRWiaGQbeq_no7-k0Td4QyRy6E4-nrnz_P5TvxU1gFC6av6SOjtpr_KO4M5DJ5rkOhmECjJ09398gLxMPD-2hJ6mhoWZmDEq_f2Ew" + "n": "j_QtVIhfpncf4uyO_w-6GJCed9XWEEFsVc7G7pB9rBRzDlK_4_JSCea3v-79rpQceIrNKc-l0QrGwOSsxFi-RD63DmloXVK-4j1Bj56BK_VQu2DD83QK-3eoAKuE4GusVgVOpM_RyHyYGH6OEHQzIoVhpDPWGb4m8d-2O6aHh2c9VIuQXMh9SSRATh76ZYaVPNiSpDtqKxSJxgbOTJcHzQOKMyJ2fidl2ib4foCChLuZ8hn_30i_YwDEj5Edn6hjNSDGmW5d3iT5IFJb-RP13anebrgNBEpCZ07dLsf1H30LAfQ24BCWZS0z6fXwgidM3wXE6pQWSTTZpiY73UXusQ" } } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/keys/key-ov5x4xujjptq7dud4g4k/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-f7e118926a61da4ea729dab80aaa2ed6-5822c85f9342ee42-00", + "traceparent": "00-0b5434475b2cf049852769ba7af59db8-3207380c3e20354d-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200710.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "80ad05d1d4541170740f5dce91fc4360", "x-ms-return-client-request-id": "true" @@ -438,12 +484,17 @@ }, "StatusCode": 201, "ResponseHeaders": { - "Content-Length": "427", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "408", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "6efe8100-bb32-11ea-a6f0-0242ac120006" + "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-server-latency": "473" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -451,15 +502,15 @@ "properties": { "principalId": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "roleDefinitionId": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/21dbd100-6940-42c2-9190-5d6cb909625b", - "scope": "/keys/key-ov5x4xujjptq7dud4g4k" + "scope": "/keys/rsa-1" }, "type": "Microsoft.Authorization/roleAssignments" } } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1588834660" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSample.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSample.json index ef5e06c408e5f..cb5c067b73fc0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSample.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSample.json @@ -1,7 +1,7 @@ { "Entries": [], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "RandomSeed": "1493448143" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSampleAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSampleAsync.json index afedaf8ed7eca..6a9ad00148f6f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSampleAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/CreateClientSampleAsync.json @@ -1,7 +1,7 @@ { "Entries": [], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "RandomSeed": "1468448133" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateClient.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateClient.json index 15dd0a03648f9..478d06f8a5dab 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateClient.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateClient.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ @@ -23,7 +23,7 @@ "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -155,7 +155,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,7 +239,7 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -367,8 +367,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "2051227585" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateRoleAssignment.json index f8cfd5607ade3..6c4f51d1a3a98 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/CreateRoleAssignment.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ @@ -23,7 +23,7 @@ "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -155,7 +155,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,7 +239,7 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { "Authorization": "Sanitized", @@ -279,7 +279,7 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -312,7 +312,7 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { "Authorization": "Sanitized", @@ -346,8 +346,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "2120151692" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/GetRoleDefinitions.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/GetRoleDefinitions.json index 8dcf9c9ff2d9f..21f76045f4fcc 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/GetRoleDefinitions.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/GetRoleDefinitions.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ @@ -23,7 +23,7 @@ "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -155,7 +155,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -240,8 +240,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1419592200" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/RoleAssignmentNotFound.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/RoleAssignmentNotFound.json index 72b82d48a2214..6b9d556ffc7e7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/RoleAssignmentNotFound.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/SampleSnippets/RoleAssignmentNotFound.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "User-Agent": [ @@ -23,7 +23,7 @@ "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Authorization": "Sanitized", @@ -51,8 +51,8 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1834870442" } -} \ No newline at end of file +} diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs index cb05744bf8f26..4847c1bd818ad 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs @@ -27,7 +27,7 @@ public void TestSetup() _objectId = TestEnvironment.ClientObjectId; } - [Test] + [RecordedTest] [SyncOnly] public void CreateClient() { @@ -48,7 +48,7 @@ public void CreateClient() #endregion } - [Test] + [RecordedTest] [SyncOnly] public void GetRoleDefinitions() { @@ -66,13 +66,18 @@ public void GetRoleDefinitions() #endregion } - [Test] + [RecordedTest] [SyncOnly] - public async Task CreateRoleAssignment() + public void CreateRoleAssignment() { client = Client; - List definitions = await Client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global).ToEnumerableAsync().ConfigureAwait(false); - _roleDefinitionId = definitions.FirstOrDefault(d => d.RoleName == RoleName).Id; + Pageable definitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); + List allDefinitions = new List(); + foreach (KeyVaultRoleDefinition roleDefinition in definitions) + { + allDefinitions.Add(roleDefinition); + } + _roleDefinitionId = allDefinitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from the List the role definitions section above string definitionIdToAssign = _roleDefinitionId; @@ -110,7 +115,7 @@ public async Task CreateRoleAssignment() #endregion } - [Test] + [RecordedTest] [SyncOnly] public void RoleAssignmentNotFound() { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs index 57e3c53e77a4d..dad0a86dfc69c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs @@ -27,7 +27,7 @@ public void TestSetup() _objectId = TestEnvironment.ClientObjectId; } - [Test] + [RecordedTest] [SyncOnly] public void CreateClient() { @@ -40,7 +40,7 @@ public void CreateClient() client = Client; } - [Test] + [RecordedTest] [SyncOnly] public void GetDefinitionsAndAssignmentsSync() { @@ -59,7 +59,7 @@ public void GetDefinitionsAndAssignmentsSync() } - [Test] + [RecordedTest] [AsyncOnly] public async Task GetDefinitionsAndAssignmentsAsync() { @@ -85,7 +85,7 @@ public async Task GetDefinitionsAndAssignmentsAsync() #endregion } - [Test] + [RecordedTest] [SyncOnly] public void CreateRoleAssignment() { @@ -119,7 +119,7 @@ public void CreateRoleAssignment() #endregion } - [Test] + [RecordedTest] [AsyncOnly] public async Task CreateRoleAssignmentAsync() { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs index de30a2b8cb554..1279f32546e52 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs @@ -26,7 +26,7 @@ public void TestSetup() _objectId = TestEnvironment.ClientObjectId; } - [Test] + [RecordedTest] public async Task CreateRoleAssignmentAsync() { // Replace client with the Instrumented Client. From 5d9806a7bed4e51fbb7689a9a9a98a80f649a10d Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 12:49:04 -0500 Subject: [PATCH 09/16] update generator and re-record --- .../src/RecordedTestAttribute.cs | 2 +- .../samples/Sample1_BackupHelloWorldAsync.md | 11 +- .../samples/Sample1_BackupHelloWorldSync.md | 11 +- ...re.Security.KeyVault.Administration.csproj | 1 - .../src/Generated/BackupRestoreRestClient.cs | 5 + .../Generated/RoleAssignmentsRestClient.cs | 5 + .../Generated/RoleDefinitionsRestClient.cs | 2 + .../tests/FullBackupClientLiveTests.cs | 2 +- .../CreateRoleAssignment.json | 109 ++++-- .../CreateRoleAssignmentAsync.json | 109 ++++-- .../DeleteRoleAssignment.json | 129 +++++-- .../DeleteRoleAssignmentAsync.json | 129 +++++-- .../GetRoleAssignment.json | 130 +++++-- .../GetRoleAssignmentAsync.json | 130 +++++-- .../GetRoleDefinitions.json | 89 +++-- .../GetRoleDefinitionsAsync.json | 89 +++-- .../CreateClient.json | 21 +- .../CreateRoleAssignment.json | 29 +- .../GetRoleDefinitions.json | 12 +- .../RoleAssignmentNotFound.json | 14 +- .../BackupAndRestore.json | 207 ++++++----- .../BackupAndRestoreAsync.json | 322 +++++++++++++----- .../RbacHelloWorld/CreateRoleAssignment.json | 31 +- .../CreateRoleAssignmentAsyncAsync.json | 37 +- ...etDefinitionsAndAssignmentsAsyncAsync.json | 17 +- .../GetDefinitionsAndAssignmentsSync.json | 17 +- .../CreateRoleAssignmentAsync.json | 58 ++-- .../CreateRoleAssignmentAsyncAsync.json | 82 ++--- .../BackupAndRestoreSampleAsyncAsync.json | 140 ++++---- .../BackupAndRestoreSampleSync.json | 248 ++++++++------ 30 files changed, 1450 insertions(+), 738 deletions(-) diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestAttribute.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestAttribute.cs index f95a8fa3ad282..3fbf93198bf08 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestAttribute.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestAttribute.cs @@ -61,7 +61,7 @@ public override TestResult Execute(TestExecutionContext context) context.CurrentResult.SetResult(context.CurrentResult.ResultState, "Error while trying to re-record: " + Environment.NewLine + context.CurrentResult.Message + Environment.NewLine + - "Original error: " + originalResult.Message, context.CurrentResult.Message); + "Original error: " + originalResult.Message, context.CurrentResult.StackTrace); } // revert RecordTestMode to Playback diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md index df0d12852910c..fc3dc8b57430c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -17,11 +17,11 @@ KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new ## Performing a full key backup Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. -For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). -Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. -To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_keyvault) and [Creating a key](creating_key) samples. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. @@ -62,8 +62,3 @@ var restoreResult = await restoreOperation.WaitForCompletionAsync(); [DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md -[creating_keyvault]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclient -[creating_key]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key -[blob_readme]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md -[blob_auth]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs -[storage_explorer_sas]: https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md index b0ace850e5ff7..f41b6bcf43025 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -17,11 +17,11 @@ KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new ## Performing a full key backup Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. -For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). -Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. -To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_keyvault) and [Creating a key](creating_key) samples. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. @@ -71,8 +71,3 @@ var restoreResult = backupOperation.Value; [DefaultAzureCredential]: ../../../identity/Azure.Identity/README.md -[creating_keyvault]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclient -[creating_key]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key -[blob_readme]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md -[blob_auth]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs -[storage_explorer_sas]: https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj index 637c50b4cb68a..658cc3c6cbfbf 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Azure.Security.KeyVault.Administration.csproj @@ -7,7 +7,6 @@ Microsoft Azure Key Vault Administration;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021;CA1812 - true diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs index fe72f543f5fa8..e22de2ad3197b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/BackupRestoreRestClient.cs @@ -50,6 +50,7 @@ internal HttpMessage CreateFullBackupRequest(string vaultBaseUrl, SASTokenParame uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); if (azureStorageBlobContainerUri != null) { var content = new Utf8JsonRequestContent(); @@ -119,6 +120,7 @@ internal HttpMessage CreateFullBackupStatusRequest(string vaultBaseUrl, string j uri.AppendPath("/pending", false); uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -197,6 +199,7 @@ internal HttpMessage CreateFullRestoreOperationRequest(string vaultBaseUrl, Rest uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); if (restoreBlobDetails != null) { var content = new Utf8JsonRequestContent(); @@ -266,6 +269,7 @@ internal HttpMessage CreateRestoreStatusRequest(string vaultBaseUrl, string jobI uri.AppendPath("/pending", false); uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -346,6 +350,7 @@ internal HttpMessage CreateSelectiveKeyRestoreOperationRequest(string vaultBaseU uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); if (restoreBlobDetails != null) { var content = new Utf8JsonRequestContent(); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs index 59d3d76a2f911..e38ffb17a8de7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleAssignmentsRestClient.cs @@ -52,6 +52,7 @@ internal HttpMessage CreateDeleteRequest(string vaultBaseUrl, string scope, stri uri.AppendPath(roleAssignmentName, true); uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -143,6 +144,7 @@ internal HttpMessage CreateCreateRequest(string vaultBaseUrl, string scope, stri uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Accept", "application/json"); var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(parameters); request.Content = content; @@ -246,6 +248,7 @@ internal HttpMessage CreateGetRequest(string vaultBaseUrl, string scope, string uri.AppendPath(roleAssignmentName, true); uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -339,6 +342,7 @@ internal HttpMessage CreateListForScopeRequest(string vaultBaseUrl, string scope } uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -417,6 +421,7 @@ internal HttpMessage CreateListForScopeNextPageRequest(string nextLink, string v uri.AppendRaw(vaultBaseUrl, false); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs index 6bce8c55cb3db..0c0c4b58470a8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/RoleDefinitionsRestClient.cs @@ -55,6 +55,7 @@ internal HttpMessage CreateListRequest(string vaultBaseUrl, string scope, string } uri.AppendQuery("api-version", apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } @@ -133,6 +134,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string vaultBase uri.AppendRaw(vaultBaseUrl, false); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); return message; } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs index 60529ce60b21d..b74fb659f9973 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/FullBackupClientLiveTests.cs @@ -14,7 +14,7 @@ public class FullBackupClientLiveTests : BackupRestoreTestBase public FullBackupClientLiveTests(bool isAsync) : base(isAsync, RecordedTestMode.Playback /* To record tests, change this argument to RecordedTestMode.Record */) { } - [Test] + [RecordedTest] public async Task BackupAndRestore() { var source = new CancellationTokenSource(TimeSpan.FromMinutes(2)); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignment.json index c776c155ccdcf..4e49a96b65bc2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignment.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5e8636028f65bb56594d809618e68b9c", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5e8636028f65bb56594d809618e68b9c", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "119" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-795ecd5e80915a4391e8149b00f7c932-ebebbe61c4127749-00", + "traceparent": "00-e2543be4486b704cb63abad76ed21fc0-e44b4722d60ec341-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "16093e51ef8cfc750e2d28064b66eddd", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "314" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -281,7 +334,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1126588322" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignmentAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignmentAsync.json index 3358d0e6e09fe..83865a6e13106 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignmentAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/CreateRoleAssignmentAsync.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "c23c658117723d55cd717f5f53da57f6", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "c23c658117723d55cd717f5f53da57f6", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-45c603df1c416548b8c344586076bc5d-4b537456c46dfe42-00", + "traceparent": "00-0be3bdbcb86b4f4188d09938f68db821-73375c5a7e63fd45-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8172d5e41db7e9e5c84ad8c05c75332c", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "298" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -281,7 +334,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1820470144" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignment.json index 0313e427f9f59..98a85ba9c6dc9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignment.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5f9412fda0f0133d146f7775c4434755", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5f9412fda0f0133d146f7775c4434755", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-aebc54bd7fc99e4f891f346fea033cdd-2f6e8b19d3247a43-00", + "traceparent": "00-0192d66e58323342958035105f37adee-8b22561c982c8f41-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a62283a033ccd643d3ca47462f9e8cc5", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "310" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +333,15 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-2ada8a3a8e46e24a96dc4e1e61048704-7c9081ed35ed7a44-00", + "traceparent": "00-660aee6071d8e445be83314fa2494dcf-330b26a421fece4d-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f213e6c0e20b3b9ee285854e4f62a8b4", "x-ms-return-client-request-id": "true" @@ -295,12 +349,17 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "302" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -315,7 +374,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "26204039" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignmentAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignmentAsync.json index c8f4b235b2392..162c464323c4a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignmentAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/DeleteRoleAssignmentAsync.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "90089dd99809a512d432fd1a0d8f4b26", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "90089dd99809a512d432fd1a0d8f4b26", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-7427b92b69836743a1dbdf959a9368e5-4d40873686202a48-00", + "traceparent": "00-c4ead639288d4648a1c3c19431fd5611-fa11e644eb44204d-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ffce91e513374f917bd26e76b166002d", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "226" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +333,15 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-5fb6c9f270d86749b5b5b5843ae1331b-5c5826b3211c1d42-00", + "traceparent": "00-636ca577be3c4243a0bb4f798453e270-8399a4fcf440f542-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3d63015b5be35d7e1461862d46efbe59", "x-ms-return-client-request-id": "true" @@ -295,12 +349,17 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "285" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -315,7 +374,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "829785785" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignment.json index 50bffc2428b0b..2985f392b7198 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignment.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "495eaeb69be85f6afeff2958f3da8d60", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "495eaeb69be85f6afeff2958f3da8d60", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "114" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-d2af868f1159df4988cb1cd064be61ef-86ea7b92d28ed84b-00", + "traceparent": "00-33589d3deba65544966a1b0a315d2927-597a59c97a82fa43-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d499b987535015555758ba33a25b0a64", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "315" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +333,15 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-6af0dd670df83746a523a8e34b57a428-6793d98bec069c4b-00", + "traceparent": "00-9e556499410f6f4ea15a0165889dadac-4ed0a3950a1c8348-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "599096f85657ea8ac7b19ce201831758", "x-ms-return-client-request-id": "true" @@ -295,12 +349,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -315,7 +375,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1965379599" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignmentAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignmentAsync.json index 90969d34b981b..bffd751afb1f0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignmentAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleAssignmentAsync.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "b1527bf3417a79628d90dd6275e693c2", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "b1527bf3417a79628d90dd6275e693c2", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -239,16 +286,17 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-379c4e72dce7e241926f9b839757f7ce-1f11d260e94a3b4a-00", + "traceparent": "00-2deb7d35ad538b4e8b4645a93ae0c7b0-97ccaab9a08fb842-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "97ca12c57d1eafa690e4cfbfaa6b1783", "x-ms-return-client-request-id": "true" @@ -261,12 +309,17 @@ }, "StatusCode": 201, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "286" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -280,14 +333,15 @@ } }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-c6005ad9233cf6459c6ddbf2857b04d6-56bcc6265f7f0749-00", + "traceparent": "00-bc3da834b9819142965c30c77df16f48-5f7d2f6ed992494a-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e8814a7bcc82cbf1a39bc7d83ee0eb34", "x-ms-return-client-request-id": "true" @@ -295,12 +349,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "398", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -315,7 +375,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1144294929" } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitions.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitions.json index 162d9a5d8d0c2..e3b6ab3e15373 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitions.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitions.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ceef6d0ab68b4b8d6235ca38ce984db2", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ceef6d0ab68b4b8d6235ca38ce984db2", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -240,7 +287,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "RandomSeed": "520554031" } } \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitionsAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitionsAsync.json index 3ed767c231aa4..974d658b2b107 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitionsAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlClientLiveTests/GetRoleDefinitionsAsync.json @@ -1,12 +1,13 @@ { "Entries": [ { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e053ba5483ab0ec55202f62324301f5e", "x-ms-return-client-request-id": "true" @@ -14,22 +15,29 @@ "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "2", - "Content-Type": "application/json", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47\u0022, resource=\u0022https://managedhsm.azure.net\u0022", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus.clitest.managedhsm-preview.azure.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200617.1", - "(.NET Core 4.6.28928.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e053ba5483ab0ec55202f62324301f5e", "x-ms-return-client-request-id": "true" @@ -37,12 +45,18 @@ "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "Content-Length": "5517", - "Content-Type": "application/json", + "Cache-Control": "no-cache", + "Content-Length": "6428", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7a0bdfa8-b0eb-11ea-9d3b-0242ac12000a" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -78,13 +92,21 @@ "Microsoft.KeyVault/managedHsm/keys/delete", "Microsoft.KeyVault/managedHsm/keys/export/action", "Microsoft.KeyVault/managedHsm/keys/import/action", - "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete" + "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", + "Microsoft.KeyVault/managedHsm/securitydomain/download/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", + "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", + "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/restore/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/restore/status/action" ], "notActions": [], "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Administrator", + "roleName": "Managed HSM Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -123,7 +145,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Officer", + "roleName": "Managed HSM Crypto Officer", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -155,7 +177,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto User", + "roleName": "Managed HSM Crypto User", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -181,7 +203,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Policy Administrator", + "roleName": "Managed HSM Policy Administrator", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -205,7 +227,7 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Auditor", + "roleName": "Managed HSM Crypto Auditor", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -230,7 +252,32 @@ "notDataActions": [] } ], - "roleName": "Azure Key Vault Managed HSM Crypto Service Encryption", + "roleName": "Managed HSM Crypto Service Encryption", + "type": "" + }, + "type": "Microsoft.Authorization/roleDefinitions" + }, + { + "id": "Microsoft.KeyVault/providers/Microsoft.Authorization/roleDefinitions/7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "name": "7b127d3c-77bd-4e3e-bbe0-dbb8971fa7f8", + "properties": { + "assignableScopes": [ + "/" + ], + "description": "", + "permissions": [ + { + "actions": [], + "dataActions": [ + "Microsoft.KeyVault/managedHsm/backup/start/action", + "Microsoft.KeyVault/managedHsm/backup/status/action", + "Microsoft.KeyVault/managedHsm/keys/backup/action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Managed HSM Backup", "type": "" }, "type": "Microsoft.Authorization/roleDefinitions" @@ -240,7 +287,7 @@ } ], "Variables": { - "AZURE_KEYVAULT_URL": "https://eastus.clitest.managedhsm-preview.azure.net", + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "RandomSeed": "775111323" } } \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json index acc71a2ea5197..47d8d46a6f247 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateClient.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,11 +52,11 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", - "x-ms-server-latency": "424" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -287,6 +289,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -305,11 +308,11 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", - "x-ms-server-latency": "1" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "value": [ @@ -362,4 +365,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "464879308" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json index e2f73c91c6bc1..80006b0eff6bf 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/CreateRoleAssignment.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,9 +23,9 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", - "x-ms-server-latency": "1" + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -287,6 +289,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", @@ -314,8 +317,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", - "x-ms-server-latency": "263" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "355" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -332,6 +335,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -350,10 +354,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": { @@ -371,6 +375,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -391,8 +396,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c5574728-ec63-11ea-93b8-0242ac120006", - "x-ms-server-latency": "264" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "252" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -411,4 +416,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1044942597" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json index 22537991d24d2..afd6ee35727ec 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/GetRoleDefinitions.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -289,4 +291,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1832433612" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json index 2cf18b4668f37..d98fab54ff0b7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,14 +52,14 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "2aacf0fc-ec62-11ea-a758-0242ac120008", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { "error": { "code": "RoleAssignmentNotFound", - "message": "Requested role assignment not found (Activity ID: 2aacf0fc-ec62-11ea-a758-0242ac120008)" + "message": "Requested role assignment not found (Activity ID: 147983c8-ec70-11ea-84e4-0242ac120003)" } } } @@ -67,4 +69,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "599689335" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestore.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestore.json index 0f28cb02d8485..1b7b98fcdcf2b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestore.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestore.json @@ -4,23 +4,29 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Content-Type": "application/json", - "traceparent": "00-0c3050c50a41ad4e879e9b6ad73f797e-76b4799c32c32f44-00", + "traceparent": "00-42f4ee19c340ff4b91b9011e0ff2cf91-544329c6db6afb49-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "61e434d8ef8f4d91f3c05a955380d15f", + "x-ms-client-request-id": "39edbf623b2c233c41fb59907572b599", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "0", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": [] }, @@ -28,15 +34,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-0c3050c50a41ad4e879e9b6ad73f797e-76b4799c32c32f44-00", + "traceparent": "00-42f4ee19c340ff4b91b9011e0ff2cf91-544329c6db6afb49-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "61e434d8ef8f4d91f3c05a955380d15f", + "x-ms-client-request-id": "39edbf623b2c233c41fb59907572b599", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -45,16 +52,21 @@ }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/610399ae4d7f4c7e9d780e5a6c9bcd1d/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0d7601a051624991ab7c2e2fb4734d42/pending", + "Cache-Control": "no-cache", "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:51:51 GMT", + "Date": "Tue, 01 Sep 2020 17:32:32 GMT", "Retry-After": "0", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "777" }, "ResponseBody": { "status": "InProgress", @@ -64,35 +76,42 @@ "message": null, "innererror": null }, - "startTime": 1595868711, + "startTime": 1598981553, "endTime": null, - "jobId": "610399ae4d7f4c7e9d780e5a6c9bcd1d", + "jobId": "0d7601a051624991ab7c2e2fb4734d42", "azureStorageBlobContainerUri": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/610399ae4d7f4c7e9d780e5a6c9bcd1d/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0d7601a051624991ab7c2e2fb4734d42/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "e77c54791b96fb221f314f0ce5d0a743", + "x-ms-client-request-id": "80d855bb6554d140ad30018cc70902c7", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:51:53 GMT", + "Date": "Tue, 01 Sep 2020 17:32:33 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "481" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -102,42 +121,49 @@ "innererror": null, "message": null }, - "jobId": "610399ae4d7f4c7e9d780e5a6c9bcd1d", - "startTime": 1595868711, + "jobId": "0d7601a051624991ab7c2e2fb4734d42", + "startTime": 1598981553, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/610399ae4d7f4c7e9d780e5a6c9bcd1d/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0d7601a051624991ab7c2e2fb4734d42/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "3e4a7623ddc253cccfd1a8bdd1271db4", + "x-ms-client-request-id": "c940dc9b94699cf72c5dcdc7cc240c6c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "257", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:04 GMT", + "Date": "Tue, 01 Sep 2020 17:32:44 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "615" }, "ResponseBody": { - "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-EU2-2020072716515184", - "endTime": 1595868724, + "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090117323313", + "endTime": 1598981563, "error": null, - "jobId": "610399ae4d7f4c7e9d780e5a6c9bcd1d", - "startTime": 1595868711, + "jobId": "0d7601a051624991ab7c2e2fb4734d42", + "startTime": 1598981553, "status": "Succeeded", "statusDetails": null } @@ -146,15 +172,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "168", "Content-Type": "application/json", - "traceparent": "00-90ca41e11b12ca478ef327433171bf50-60cef9474a455649-00", + "traceparent": "00-7970d9bb162b8b4e87a0d126d182809c-e9edb15cce154f4b-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "e6432a62528cbd7112e8425e9f846723", + "x-ms-client-request-id": "8c0ae785aa22fc637f1c8cfb3ab05c38", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -162,20 +189,25 @@ "storageResourceUri": "https://chrissprim.blob.core.windows.net/backup", "token": "Sanitized" }, - "folderToRestore": "mhsm-chriss-EU2-2020072716515184" + "folderToRestore": "mhsm-chriss-eu2-2020090117323313" }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/4de70f16cd6b4670b75952a6d6404e2c/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/139099e0f9764549889befe858d513d0/pending", + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:04 GMT", + "Date": "Tue, 01 Sep 2020 17:32:44 GMT", "Retry-After": "0", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "723" }, "ResponseBody": { "endTime": null, @@ -184,35 +216,42 @@ "innererror": null, "message": null }, - "jobId": "4de70f16cd6b4670b75952a6d6404e2c", - "startTime": 1595868725, + "jobId": "139099e0f9764549889befe858d513d0", + "startTime": 1598981565, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/4de70f16cd6b4670b75952a6d6404e2c/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/139099e0f9764549889befe858d513d0/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "dd71161892359b9c882917c572642af7", + "x-ms-client-request-id": "99f492f8eb32262f5e3c53f798790488", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:05 GMT", + "Date": "Tue, 01 Sep 2020 17:32:45 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "501" }, "ResponseBody": { "endTime": null, @@ -221,35 +260,42 @@ "innererror": null, "message": null }, - "jobId": "4de70f16cd6b4670b75952a6d6404e2c", - "startTime": 1595868725, + "jobId": "139099e0f9764549889befe858d513d0", + "startTime": 1598981565, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/4de70f16cd6b4670b75952a6d6404e2c/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/139099e0f9764549889befe858d513d0/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "bbaa9b13c08cd1b7058d2cd99b6db34b", + "x-ms-client-request-id": "df06942476fff0a57843494d08fb627c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:16 GMT", + "Date": "Tue, 01 Sep 2020 17:32:55 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "525" }, "ResponseBody": { "endTime": null, @@ -258,50 +304,57 @@ "innererror": null, "message": null }, - "jobId": "4de70f16cd6b4670b75952a6d6404e2c", - "startTime": 1595868725, + "jobId": "139099e0f9764549889befe858d513d0", + "startTime": 1598981565, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/4de70f16cd6b4670b75952a6d6404e2c/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/139099e0f9764549889befe858d513d0/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "baa4856940b6cf7e8da85e633aab4aad", + "x-ms-client-request-id": "3ace9500732f9a39b7e32ee5566c6406", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "143", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:27 GMT", + "Date": "Tue, 01 Sep 2020 17:33:06 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "568" }, "ResponseBody": { - "endTime": 1595868744, + "endTime": 1598981582, "error": null, - "jobId": "4de70f16cd6b4670b75952a6d6404e2c", - "startTime": 1595868725, + "jobId": "139099e0f9764549889befe858d513d0", + "startTime": 1598981565, "status": "Succeeded", "statusDetails": null } } ], "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "2082116853", - "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" + "RandomSeed": "1277853065" } } \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestoreAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestoreAsync.json index 24930f6298a36..96c9b39d27821 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestoreAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/FullBackupClientLiveTests/BackupAndRestoreAsync.json @@ -4,23 +4,29 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Content-Type": "application/json", - "traceparent": "00-c0ac786746500c46be89edf81fdd1ddb-0ae493173e8ba54b-00", + "traceparent": "00-b107e4e2f3f1234ebe4f6d1ec993f3c1-726fdc5bd5104c44-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "780e0ee945eb81fcca70a45b3c7f1d1f", + "x-ms-client-request-id": "fd11268180250c0e84d8a04f84407099", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 401, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "0", - "Content-Type": "application/json", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "X-Frame-Options": "SAMEORIGIN", + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "1" }, "ResponseBody": [] }, @@ -28,15 +34,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-c0ac786746500c46be89edf81fdd1ddb-0ae493173e8ba54b-00", + "traceparent": "00-b107e4e2f3f1234ebe4f6d1ec993f3c1-726fdc5bd5104c44-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "780e0ee945eb81fcca70a45b3c7f1d1f", + "x-ms-client-request-id": "fd11268180250c0e84d8a04f84407099", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -45,16 +52,21 @@ }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/dd25a59dba8f46e0884b107191b76e2a/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending", + "Cache-Control": "no-cache", "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:29 GMT", + "Date": "Tue, 01 Sep 2020 17:33:57 GMT", "Retry-After": "0", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "613" }, "ResponseBody": { "status": "InProgress", @@ -64,35 +76,132 @@ "message": null, "innererror": null }, - "startTime": 1595868749, + "startTime": 1598981637, "endTime": null, - "jobId": "dd25a59dba8f46e0884b107191b76e2a", + "jobId": "95746dedc43544d7b21e275b9889fa3b", "azureStorageBlobContainerUri": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/dd25a59dba8f46e0884b107191b76e2a/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "ad008af4938bc164349ae946f7d616e8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 01 Sep 2020 17:33:57 GMT", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "471" + }, + "ResponseBody": { + "azureStorageBlobContainerUri": null, + "endTime": null, + "error": { + "code": null, + "innererror": null, + "message": null + }, + "jobId": "95746dedc43544d7b21e275b9889fa3b", + "startTime": 1598981637, + "status": "InProgress", + "statusDetails": null + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "b6b2cab2cc9b8a60006c1c6f15bd5d68", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 01 Sep 2020 17:34:08 GMT", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "470" + }, + "ResponseBody": { + "azureStorageBlobContainerUri": null, + "endTime": null, + "error": { + "code": null, + "innererror": null, + "message": null + }, + "jobId": "95746dedc43544d7b21e275b9889fa3b", + "startTime": 1598981637, + "status": "InProgress", + "statusDetails": null + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "128be15aa09a7e20d3840b4b9853925d", + "x-ms-client-request-id": "9f326f145686ed9fc14fc88a96c815ad", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:29 GMT", + "Date": "Tue, 01 Sep 2020 17:34:18 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "478" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -102,35 +211,42 @@ "innererror": null, "message": null }, - "jobId": "dd25a59dba8f46e0884b107191b76e2a", - "startTime": 1595868749, + "jobId": "95746dedc43544d7b21e275b9889fa3b", + "startTime": 1598981637, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/dd25a59dba8f46e0884b107191b76e2a/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "44c4cf279bab314b2c5bcd303488a7d2", + "x-ms-client-request-id": "b99cb7c1ba8e27fd2975ad1f76f5ab77", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "216", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:39 GMT", + "Date": "Tue, 01 Sep 2020 17:34:30 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "467" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -140,42 +256,49 @@ "innererror": null, "message": null }, - "jobId": "dd25a59dba8f46e0884b107191b76e2a", - "startTime": 1595868749, + "jobId": "95746dedc43544d7b21e275b9889fa3b", + "startTime": 1598981637, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/dd25a59dba8f46e0884b107191b76e2a/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/95746dedc43544d7b21e275b9889fa3b/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "79730ba1b3864942ed8fa56739b1e876", + "x-ms-client-request-id": "8732803d77a35c622bc5f44c04d6f438", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "257", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:50 GMT", + "Date": "Tue, 01 Sep 2020 17:34:40 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "472" }, "ResponseBody": { - "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-EU2-2020072716522909", - "endTime": 1595868760, + "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090117335769", + "endTime": 1598981670, "error": null, - "jobId": "dd25a59dba8f46e0884b107191b76e2a", - "startTime": 1595868749, + "jobId": "95746dedc43544d7b21e275b9889fa3b", + "startTime": 1598981637, "status": "Succeeded", "statusDetails": null } @@ -184,15 +307,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "168", "Content-Type": "application/json", - "traceparent": "00-3e011178ccd73c46893d6103d1935a4c-219019f5d6b46e4e-00", + "traceparent": "00-24859118f10bce41b624474f0a10c9ee-9e452e39cf76eb4c-00", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "6d3346ded8babf73955ae53ed2ef4a4a", + "x-ms-client-request-id": "5ead6e56a32159da710b7511a97f76cc", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -200,20 +324,25 @@ "storageResourceUri": "https://chrissprim.blob.core.windows.net/backup", "token": "Sanitized" }, - "folderToRestore": "mhsm-chriss-EU2-2020072716522909" + "folderToRestore": "mhsm-chriss-eu2-2020090117335769" }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/66f090ff64cb4fbaa31f6075626bdc94/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/ac177d8665784787a8557da37b4f7627/pending", + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:51 GMT", + "Date": "Tue, 01 Sep 2020 17:34:41 GMT", "Retry-After": "0", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "634" }, "ResponseBody": { "endTime": null, @@ -222,35 +351,42 @@ "innererror": null, "message": null }, - "jobId": "66f090ff64cb4fbaa31f6075626bdc94", - "startTime": 1595868771, + "jobId": "ac177d8665784787a8557da37b4f7627", + "startTime": 1598981681, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/66f090ff64cb4fbaa31f6075626bdc94/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/ac177d8665784787a8557da37b4f7627/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "8caa39dc18e073d68c7b561bf6e3f77b", + "x-ms-client-request-id": "154d51a38e95490a55408ec9c5b12353", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:52:51 GMT", + "Date": "Tue, 01 Sep 2020 17:34:41 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "512" }, "ResponseBody": { "endTime": null, @@ -259,35 +395,42 @@ "innererror": null, "message": null }, - "jobId": "66f090ff64cb4fbaa31f6075626bdc94", - "startTime": 1595868771, + "jobId": "ac177d8665784787a8557da37b4f7627", + "startTime": 1598981681, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/66f090ff64cb4fbaa31f6075626bdc94/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/ac177d8665784787a8557da37b4f7627/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "ed5156723a55c81897b4e42ccd0476fe", + "x-ms-client-request-id": "07c874814d479956a6d815980251b2ab", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:53:01 GMT", + "Date": "Tue, 01 Sep 2020 17:34:52 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "459" }, "ResponseBody": { "endTime": null, @@ -296,50 +439,57 @@ "innererror": null, "message": null }, - "jobId": "66f090ff64cb4fbaa31f6075626bdc94", - "startTime": 1595868771, + "jobId": "ac177d8665784787a8557da37b4f7627", + "startTime": 1598981681, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/66f090ff64cb4fbaa31f6075626bdc94/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/ac177d8665784787a8557da37b4f7627/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ - "azsdk-net-Security.KeyVault.Administration/4.1.0-dev.20200727.1", - "(.NET Core 4.6.29017.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "008b5a455c06c5966fbfe03f8258c8b1", + "x-ms-client-request-id": "b3a8274ede88c8a2646309e0141194c0", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { + "Cache-Control": "no-cache", "Content-Length": "143", + "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 27 Jul 2020 16:53:13 GMT", + "Date": "Tue, 01 Sep 2020 17:35:02 GMT", "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-keyvault-network-info": "addr=72.176.254.191", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "c42d7f42-ce7d-11ea-99aa-0242ac120004" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "463" }, "ResponseBody": { - "endTime": 1595868784, + "endTime": 1598981698, "error": null, - "jobId": "66f090ff64cb4fbaa31f6075626bdc94", - "startTime": 1595868771, + "jobId": "ac177d8665784787a8557da37b4f7627", + "startTime": 1598981681, "status": "Succeeded", "statusDetails": null } } ], "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "1591550792", - "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" + "RandomSeed": "1955361809" } } \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json index 2405bd556725c..165ece6eaa978 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignment.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,9 +23,9 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "1" + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -287,6 +289,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", @@ -314,8 +317,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "251" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "243" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -332,6 +335,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -350,11 +354,11 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "1" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -371,6 +375,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -391,8 +396,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "306" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "371" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -411,4 +416,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1288883537" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json index 3c8ef89d61ca7..0a9059cfc24e5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/CreateRoleAssignmentAsyncAsync.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,11 +52,11 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "0" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "value": [ @@ -287,10 +289,11 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-90bb22465679c4488498f035be7a61e8-7c594aea6935c643-00", + "traceparent": "00-01775931a8157946ba5f2b5821fb836e-f5f7fe64272f914d-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -315,8 +318,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "233" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "268" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -333,8 +336,9 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-96957834b475a14686cd5d50e98aa47e-b4d37e92ecf78643-00", + "traceparent": "00-b8c14f5a5017c34b80ead88b217c598c-44dcb7563d0c4447-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -352,11 +356,11 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "0" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -373,8 +377,9 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "DELETE", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-4b739b0a1ba502478ff336852be587cf-82a93fb2459bfe4c-00", + "traceparent": "00-bb353a570de4ef4e98f851cb32fd74c6-725cb67b9774a647-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -394,8 +399,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "275" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "331" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -414,4 +419,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "943677510" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json index 8920d0f32e618..4a03a6139e0d7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsAsyncAsync.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -287,6 +289,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -305,10 +308,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -362,4 +365,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "677524810" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json index c27f4a9c6fbed..898b2f6f24934 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacHelloWorld/GetDefinitionsAndAssignmentsSync.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,8 +23,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": "OK" @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": { @@ -287,6 +289,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -305,10 +308,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": { @@ -362,4 +365,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "1996890729" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json index b5569eebed54a..083cfa8f5779e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsync.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,9 +23,9 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "0" + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -287,10 +289,11 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-0b196b83e907b14e84f6589fd36d2b4f-3aa16ef949be8d42-00", + "traceparent": "00-7d0230bd0f42c5468b8eff77a3182bdc-4a0b792e5ba19344-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -315,8 +318,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "275" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "293" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -353,8 +356,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "0" }, "ResponseBody": "OK" @@ -383,22 +386,22 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "340" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "226" }, "ResponseBody": { "value": [ { "attributes": { - "created": 1598970291, + "created": 1598977147, "enabled": true, "exportable": false, "recoverableDays": 7, "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", - "updated": 1598970291 + "updated": 1598977147 }, "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1" } @@ -412,7 +415,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", - "traceparent": "00-3813349148f2cc4d9f7a0c742319552f-4e1357fff4922e4e-00", + "traceparent": "00-4327c8bcc6c0e04981ef2ea652758a74-568c3cc74668304b-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -430,20 +433,20 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "94" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "170" }, "ResponseBody": { "attributes": { - "created": 1598970291, + "created": 1598977147, "enabled": true, "exportable": false, "recoverableDays": 7, "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", - "updated": 1598970291 + "updated": 1598977147 }, "key": { "e": "AQAB", @@ -455,9 +458,9 @@ "encrypt", "wrapKey" ], - "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/ebba8d16972a096fa765aeccd263d667", + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/3f3da2c72c3a4b57150573cbd2ffa31b", "kty": "RSA-HSM", - "n": "j_QtVIhfpncf4uyO_w-6GJCed9XWEEFsVc7G7pB9rBRzDlK_4_JSCea3v-79rpQceIrNKc-l0QrGwOSsxFi-RD63DmloXVK-4j1Bj56BK_VQu2DD83QK-3eoAKuE4GusVgVOpM_RyHyYGH6OEHQzIoVhpDPWGb4m8d-2O6aHh2c9VIuQXMh9SSRATh76ZYaVPNiSpDtqKxSJxgbOTJcHzQOKMyJ2fidl2ib4foCChLuZ8hn_30i_YwDEj5Edn6hjNSDGmW5d3iT5IFJb-RP13anebrgNBEpCZ07dLsf1H30LAfQ24BCWZS0z6fXwgidM3wXE6pQWSTTZpiY73UXusQ" + "n": "nRNWZRhBVrICuRx_eoxvOXpYBrA-5VyZsz45QVZLXBTZNSMdQhTVM-B0pdIz13UN0GtevnqqbnucJvKYuP7oXIgWY6ojzh17QDQa4ib66_tWx8gXPIHb-dMJLoRWe5FsqFiTs3h1vPuuKgPVw5zPXjOaUt9tn0K8z4G2XS79U1j81T-6F3p0dwO8VIJhBVLbvr8UHzOWbn6mJD1SVKQaQxA76z9H_WCna-Pv9BlJ1Uy_at3jmRD5uavTSDEKYlw4xd1lEeBz9pKoXyQ36noV98UHaxOU9J7lOw4stKImzPMrWGF4qclfBCnGw3kXI4rO-7Z6E8Nk_bIHYNw7jDSsDQ" } } }, @@ -465,10 +468,11 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-6623c769afcc2f478fa93f46a070089e-eba4c4043fcba149-00", + "traceparent": "00-395e7af9a03abb4988b2ba1e6f1a606d-58b717c03d441640-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -493,8 +497,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "413" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "480" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -513,4 +517,4 @@ "CLIENT_OBJECTID": "693a17da-7022-4cdd-9d4e-4e72e4ad449d", "RandomSeed": "291087922" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json index 956fcd739f854..b4990158edcff 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/RbacScopeAssignment/CreateRoleAssignmentAsyncAsync.json @@ -4,6 +4,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -22,9 +23,9 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "1" + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "0" }, "ResponseBody": "OK" }, @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleDefinitions?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", @@ -50,10 +52,10 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", "x-ms-server-latency": "1" }, "ResponseBody": { @@ -287,10 +289,11 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-6a48321d2d679549a8feb036f9299806-5c3806ec4223c24b-00", + "traceparent": "00-eeee26534ced5148b73fae629805f92a-33a15a0e5550ad42-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -315,8 +318,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "310" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "273" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", @@ -329,36 +332,6 @@ "type": "Microsoft.Authorization/roleAssignments" } }, - { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", - "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" - ], - "x-ms-client-request-id": "2ca588a11f25550cbd1dc7e38af25108", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 401, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "2", - "Content-Security-Policy": "default-src \u0027self\u0027", - "Content-Type": "application/json; charset=utf-8", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", - "X-Content-Type-Options": "nosniff", - "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "0" - }, - "ResponseBody": "OK" - }, { "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/?api-version=7.1", "RequestMethod": "GET", @@ -383,22 +356,22 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "221" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "180" }, "ResponseBody": { "value": [ { "attributes": { - "created": 1598970291, + "created": 1598977147, "enabled": true, "exportable": false, "recoverableDays": 7, "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", - "updated": 1598970291 + "updated": 1598977147 }, "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1" } @@ -412,7 +385,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "Content-Type": "application/json", - "traceparent": "00-41b9b9eff04f754798991bc46b24ec3b-cda4025bb66a5d42-00", + "traceparent": "00-bdf95f48d069f849a171d6704fd12301-0440386e118ea544-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Keys/4.2.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -430,20 +403,20 @@ "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "143" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "108" }, "ResponseBody": { "attributes": { - "created": 1598970291, + "created": 1598977147, "enabled": true, "exportable": false, "recoverableDays": 7, "recoveryLevel": "CustomizedRecoverable\u002BPurgeable", - "updated": 1598970291 + "updated": 1598977147 }, "key": { "e": "AQAB", @@ -455,9 +428,9 @@ "encrypt", "wrapKey" ], - "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/ebba8d16972a096fa765aeccd263d667", + "kid": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/3f3da2c72c3a4b57150573cbd2ffa31b", "kty": "RSA-HSM", - "n": "j_QtVIhfpncf4uyO_w-6GJCed9XWEEFsVc7G7pB9rBRzDlK_4_JSCea3v-79rpQceIrNKc-l0QrGwOSsxFi-RD63DmloXVK-4j1Bj56BK_VQu2DD83QK-3eoAKuE4GusVgVOpM_RyHyYGH6OEHQzIoVhpDPWGb4m8d-2O6aHh2c9VIuQXMh9SSRATh76ZYaVPNiSpDtqKxSJxgbOTJcHzQOKMyJ2fidl2ib4foCChLuZ8hn_30i_YwDEj5Edn6hjNSDGmW5d3iT5IFJb-RP13anebrgNBEpCZ07dLsf1H30LAfQ24BCWZS0z6fXwgidM3wXE6pQWSTTZpiY73UXusQ" + "n": "nRNWZRhBVrICuRx_eoxvOXpYBrA-5VyZsz45QVZLXBTZNSMdQhTVM-B0pdIz13UN0GtevnqqbnucJvKYuP7oXIgWY6ojzh17QDQa4ib66_tWx8gXPIHb-dMJLoRWe5FsqFiTs3h1vPuuKgPVw5zPXjOaUt9tn0K8z4G2XS79U1j81T-6F3p0dwO8VIJhBVLbvr8UHzOWbn6mJD1SVKQaQxA76z9H_WCna-Pv9BlJ1Uy_at3jmRD5uavTSDEKYlw4xd1lEeBz9pKoXyQ36noV98UHaxOU9J7lOw4stKImzPMrWGF4qclfBCnGw3kXI4rO-7Z6E8Nk_bIHYNw7jDSsDQ" } } }, @@ -465,10 +438,11 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/keys/rsa-1/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-0b5434475b2cf049852769ba7af59db8-3207380c3e20354d-00", + "traceparent": "00-fabf5aaa79758043a6aa147e49e57bf3-f44f11c70eb4da4e-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" @@ -493,8 +467,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "42ff7f78-ec65-11ea-84f2-0242ac120003", - "x-ms-server-latency": "473" + "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", + "x-ms-server-latency": "378" }, "ResponseBody": { "id": "/providers/Microsoft.Authorization/roleAssignments/e7ae2aff-eb17-4c9d-84f0-d12f7f468f16", diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json index 08428624bb0e7..f393dae5e3b16 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleAsyncAsync.json @@ -4,13 +4,14 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Content-Type": "application/json", - "traceparent": "00-1e9e2115ded0064594006cf7a3f738d1-62cf281c0da8744e-00", + "traceparent": "00-3c5612e478fc894fadeecd9ff7212ca8-222aac17e3094141-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "2d9612d52d070c3ec979797a2565c505", + "x-ms-client-request-id": "c01b9901309a8724fb25d172d2426756", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -24,7 +25,7 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", "x-ms-server-latency": "1" }, "ResponseBody": [] @@ -33,15 +34,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "92", "Content-Type": "application/json", - "traceparent": "00-1e9e2115ded0064594006cf7a3f738d1-62cf281c0da8744e-00", + "traceparent": "00-3c5612e478fc894fadeecd9ff7212ca8-222aac17e3094141-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "2d9612d52d070c3ec979797a2565c505", + "x-ms-client-request-id": "c01b9901309a8724fb25d172d2426756", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -50,12 +52,12 @@ }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/4868dc725c38457880f60a20934003de/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0a6ee3ddf4bf476db9e989793fcbe3bd/pending", "Cache-Control": "no-cache", "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:18 GMT", + "Date": "Tue, 01 Sep 2020 17:35:49 GMT", "Retry-After": "0", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", @@ -63,8 +65,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "713" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "658" }, "ResponseBody": { "status": "InProgress", @@ -74,22 +76,23 @@ "message": null, "innererror": null }, - "startTime": 1598971338, + "startTime": 1598981749, "endTime": null, - "jobId": "4868dc725c38457880f60a20934003de", + "jobId": "0a6ee3ddf4bf476db9e989793fcbe3bd", "azureStorageBlobContainerUri": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/4868dc725c38457880f60a20934003de/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0a6ee3ddf4bf476db9e989793fcbe3bd/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "959f1c15c0b82e5dbf79d5a4c532f0ba", + "x-ms-client-request-id": "c4f9d7ef8a3abff3855b840c329e0b03", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -99,16 +102,16 @@ "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:19 GMT", + "Date": "Tue, 01 Sep 2020 17:35:50 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "550" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "484" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -118,22 +121,23 @@ "innererror": null, "message": null }, - "jobId": "4868dc725c38457880f60a20934003de", - "startTime": 1598971338, + "jobId": "0a6ee3ddf4bf476db9e989793fcbe3bd", + "startTime": 1598981749, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/4868dc725c38457880f60a20934003de/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/0a6ee3ddf4bf476db9e989793fcbe3bd/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "fee8b261bb7005c60125507caa26bfb8", + "x-ms-client-request-id": "8c7d6b8e251d53ffbc4b489b89317ffc", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -143,23 +147,23 @@ "Content-Length": "257", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:29 GMT", + "Date": "Tue, 01 Sep 2020 17:36:00 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "551" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "459" }, "ResponseBody": { - "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090114421858", - "endTime": 1598971348, + "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090117354974", + "endTime": 1598981759, "error": null, - "jobId": "4868dc725c38457880f60a20934003de", - "startTime": 1598971338, + "jobId": "0a6ee3ddf4bf476db9e989793fcbe3bd", + "startTime": 1598981749, "status": "Succeeded", "statusDetails": null } @@ -168,15 +172,16 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "168", "Content-Type": "application/json", - "traceparent": "00-f6b8ed485445c641bc64a461a2c58dd2-1df7bb3a37957645-00", + "traceparent": "00-1dc03c43f86d784ca90cbb3420f085d5-67515f93a335d540-00", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "259454e6efee144db4676e8d589a4696", + "x-ms-client-request-id": "6bfc05f7b8d477c9a55b3b3eab18555d", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -184,16 +189,16 @@ "storageResourceUri": "https://chrissprim.blob.core.windows.net/backup", "token": "Sanitized" }, - "folderToRestore": "mhsm-chriss-eu2-2020090114421858" + "folderToRestore": "mhsm-chriss-eu2-2020090117354974" }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8f9d108e65e9410d98dd02ac216e8f85/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8208c2a79c3e42eaa5a06f40eac52ead/pending", "Cache-Control": "no-cache", "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:30 GMT", + "Date": "Tue, 01 Sep 2020 17:36:00 GMT", "Retry-After": "0", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", @@ -201,8 +206,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "805" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "596" }, "ResponseBody": { "endTime": null, @@ -211,22 +216,23 @@ "innererror": null, "message": null }, - "jobId": "8f9d108e65e9410d98dd02ac216e8f85", - "startTime": 1598971350, + "jobId": "8208c2a79c3e42eaa5a06f40eac52ead", + "startTime": 1598981761, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8f9d108e65e9410d98dd02ac216e8f85/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8208c2a79c3e42eaa5a06f40eac52ead/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "7218bf89c77c5994569a94936fe18499", + "x-ms-client-request-id": "67e4ce19dac5c939d7a508ee41573653", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -236,16 +242,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:31 GMT", + "Date": "Tue, 01 Sep 2020 17:36:02 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "571" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "520" }, "ResponseBody": { "endTime": null, @@ -254,22 +260,23 @@ "innererror": null, "message": null }, - "jobId": "8f9d108e65e9410d98dd02ac216e8f85", - "startTime": 1598971350, + "jobId": "8208c2a79c3e42eaa5a06f40eac52ead", + "startTime": 1598981761, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8f9d108e65e9410d98dd02ac216e8f85/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8208c2a79c3e42eaa5a06f40eac52ead/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "71be1cbacb9d71cb65d449094d39ad67", + "x-ms-client-request-id": "2c1587dca0a2d62ea205e6c1e9c0a8a4", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -279,16 +286,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:41 GMT", + "Date": "Tue, 01 Sep 2020 17:36:12 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "573" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "498" }, "ResponseBody": { "endTime": null, @@ -297,22 +304,23 @@ "innererror": null, "message": null }, - "jobId": "8f9d108e65e9410d98dd02ac216e8f85", - "startTime": 1598971350, + "jobId": "8208c2a79c3e42eaa5a06f40eac52ead", + "startTime": 1598981761, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8f9d108e65e9410d98dd02ac216e8f85/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/8208c2a79c3e42eaa5a06f40eac52ead/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "ebf3b9de4c0e1f3cc03ace535bbaa4d3", + "x-ms-client-request-id": "bb81ebf6184d1c36cc32932eb0da364e", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -322,31 +330,31 @@ "Content-Length": "143", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:52 GMT", + "Date": "Tue, 01 Sep 2020 17:36:22 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "554" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "432" }, "ResponseBody": { - "endTime": 1598971362, + "endTime": 1598981778, "error": null, - "jobId": "8f9d108e65e9410d98dd02ac216e8f85", - "startTime": 1598971350, + "jobId": "8208c2a79c3e42eaa5a06f40eac52ead", + "startTime": 1598981761, "status": "Succeeded", "statusDetails": null } } ], "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "380846839", - "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" + "RandomSeed": "1656613402" } -} +} \ No newline at end of file diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json index 16bf239d682b8..8371e83233823 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/Sample1_BackupHelloWorld/BackupAndRestoreSampleSync.json @@ -4,12 +4,13 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Content-Type": "application/json", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "30da4e5aa88ca7fd7448744b3a972380", + "x-ms-client-request-id": "ac16a56e9ad696e3ede9ae721004f054", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -23,8 +24,8 @@ "WWW-Authenticate": "Bearer authorization=\u0022https://login.windows-ppe.net/f686d426-8d16-42db-81b7-ab578e110ccd\u0022, resource=\u0022https://managedhsm-int.azure-int.net\u0022", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "1" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "0" }, "ResponseBody": [] }, @@ -32,6 +33,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup?api-version=7.2-preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "92", "Content-Type": "application/json", @@ -39,7 +41,7 @@ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "30da4e5aa88ca7fd7448744b3a972380", + "x-ms-client-request-id": "ac16a56e9ad696e3ede9ae721004f054", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -48,12 +50,12 @@ }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/75195b08527a480a8c08b2afbc9e31ad/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/43f1fa45367e4cbbb840de6838d15f99/pending", "Cache-Control": "no-cache", "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:39 GMT", + "Date": "Tue, 01 Sep 2020 17:35:08 GMT", "Retry-After": "0", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", @@ -61,8 +63,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "1734" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "628" }, "ResponseBody": { "status": "InProgress", @@ -72,22 +74,23 @@ "message": null, "innererror": null }, - "startTime": 1598971299, + "startTime": 1598981708, "endTime": null, - "jobId": "75195b08527a480a8c08b2afbc9e31ad", + "jobId": "43f1fa45367e4cbbb840de6838d15f99", "azureStorageBlobContainerUri": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/75195b08527a480a8c08b2afbc9e31ad/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/43f1fa45367e4cbbb840de6838d15f99/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "6e07c103efe88e2de793efbe7d64fc00", + "x-ms-client-request-id": "d0c1b761b5403dadf3da5e2688421066", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -97,16 +100,16 @@ "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:40 GMT", + "Date": "Tue, 01 Sep 2020 17:35:08 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "702" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "454" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -116,22 +119,23 @@ "innererror": null, "message": null }, - "jobId": "75195b08527a480a8c08b2afbc9e31ad", - "startTime": 1598971299, + "jobId": "43f1fa45367e4cbbb840de6838d15f99", + "startTime": 1598981708, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/75195b08527a480a8c08b2afbc9e31ad/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/43f1fa45367e4cbbb840de6838d15f99/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "3fca4e07816602e1b5e1b0a0970f816e", + "x-ms-client-request-id": "791aff0c95d740ac1dfb6e671bdbed8d", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -141,16 +145,16 @@ "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:43 GMT", + "Date": "Tue, 01 Sep 2020 17:35:12 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "571" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "469" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -160,22 +164,23 @@ "innererror": null, "message": null }, - "jobId": "75195b08527a480a8c08b2afbc9e31ad", - "startTime": 1598971299, + "jobId": "43f1fa45367e4cbbb840de6838d15f99", + "startTime": 1598981708, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/75195b08527a480a8c08b2afbc9e31ad/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/43f1fa45367e4cbbb840de6838d15f99/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "5835a3c5974c6a09204c49f8b83f2910", + "x-ms-client-request-id": "0ea39cd22b33b8b8f7d9b9fb3cbc0dab", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -185,16 +190,16 @@ "Content-Length": "216", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:46 GMT", + "Date": "Tue, 01 Sep 2020 17:35:15 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "657" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "418" }, "ResponseBody": { "azureStorageBlobContainerUri": null, @@ -204,22 +209,23 @@ "innererror": null, "message": null }, - "jobId": "75195b08527a480a8c08b2afbc9e31ad", - "startTime": 1598971299, + "jobId": "43f1fa45367e4cbbb840de6838d15f99", + "startTime": 1598981708, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/75195b08527a480a8c08b2afbc9e31ad/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/backup/43f1fa45367e4cbbb840de6838d15f99/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "eb43734be3cd8219df05b8073f8df6d8", + "x-ms-client-request-id": "116547d976eacc7d0b81b34447462218", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -229,23 +235,23 @@ "Content-Length": "257", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:50 GMT", + "Date": "Tue, 01 Sep 2020 17:35:19 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "712" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "438" }, "ResponseBody": { - "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090114413931", - "endTime": 1598971309, + "azureStorageBlobContainerUri": "https://chrissprim.blob.core.windows.net/backup/mhsm-chriss-eu2-2020090117350860", + "endTime": 1598981718, "error": null, - "jobId": "75195b08527a480a8c08b2afbc9e31ad", - "startTime": 1598971299, + "jobId": "43f1fa45367e4cbbb840de6838d15f99", + "startTime": 1598981708, "status": "Succeeded", "statusDetails": null } @@ -254,6 +260,7 @@ "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore?api-version=7.2-preview", "RequestMethod": "PUT", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "168", "Content-Type": "application/json", @@ -261,7 +268,7 @@ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "daf88011a32f70b3455f1f1938e84976", + "x-ms-client-request-id": "ec53d0ed029ee132476182fedcb00460", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -269,16 +276,16 @@ "storageResourceUri": "https://chrissprim.blob.core.windows.net/backup", "token": "Sanitized" }, - "folderToRestore": "mhsm-chriss-eu2-2020090114413931" + "folderToRestore": "mhsm-chriss-eu2-2020090117350860" }, "StatusCode": 202, "ResponseHeaders": { - "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending", + "azure-asyncoperation": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending", "Cache-Control": "no-cache", "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:55 GMT", + "Date": "Tue, 01 Sep 2020 17:35:23 GMT", "Retry-After": "0", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", @@ -286,8 +293,8 @@ "X-Frame-Options": "SAMEORIGIN", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "806" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "641" }, "ResponseBody": { "endTime": null, @@ -296,22 +303,23 @@ "innererror": null, "message": null }, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "2354a0b896cbe2a189b37947de022b92", + "x-ms-client-request-id": "d38ec3eddb755ba31ed702b2787371b1", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -321,16 +329,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:55 GMT", + "Date": "Tue, 01 Sep 2020 17:35:23 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "673" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "462" }, "ResponseBody": { "endTime": null, @@ -339,22 +347,23 @@ "innererror": null, "message": null }, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "38e670554f46a8e0bfd2a66dc4ff4af6", + "x-ms-client-request-id": "6b0ea0b62169d60c1584ca88f47ef05a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -364,16 +373,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:41:59 GMT", + "Date": "Tue, 01 Sep 2020 17:35:26 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "555" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "460" }, "ResponseBody": { "endTime": null, @@ -382,22 +391,23 @@ "innererror": null, "message": null }, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "9e4e41bbd3397b0cdf16507c2a6c9142", + "x-ms-client-request-id": "8456527c4eb811a22cf7cec7ff8068d3", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -407,16 +417,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:03 GMT", + "Date": "Tue, 01 Sep 2020 17:35:31 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "549" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "500" }, "ResponseBody": { "endTime": null, @@ -425,22 +435,23 @@ "innererror": null, "message": null }, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "c7c48c341102692fbfab63f8f0341e8a", + "x-ms-client-request-id": "3b47d0ef98a2ccf6b6b7bef1111b669f", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -450,16 +461,16 @@ "Content-Length": "180", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:06 GMT", + "Date": "Tue, 01 Sep 2020 17:35:34 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "584" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "458" }, "ResponseBody": { "endTime": null, @@ -468,22 +479,67 @@ "innererror": null, "message": null }, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "InProgress", "statusDetails": null } }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/7e086a08615f486eb23ffb0843128f76/pending?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { + "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": [ "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" ], - "x-ms-client-request-id": "9d8b82688cb38259646b5830fe637d53", + "x-ms-client-request-id": "2535a8e7ed1d68f9fdfc3e725345d694", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "180", + "Content-Security-Policy": "default-src \u0027self\u0027", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 01 Sep 2020 17:35:38 GMT", + "Server": "Kestrel", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "X-Frame-Options": "SAMEORIGIN", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", + "x-ms-keyvault-network-info": "addr=70.121.15.5", + "x-ms-keyvault-region": "EASTUS", + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "510" + }, + "ResponseBody": { + "endTime": null, + "error": { + "code": null, + "innererror": null, + "message": null + }, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, + "status": "InProgress", + "statusDetails": null + } + }, + { + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/restore/a629fb2df8a74aaab232701bba8a5425/pending?api-version=7.2-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Security.KeyVault.Administration/4.0.0-dev.20200901.1", + "(.NET Core 4.6.29130.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "2399f71bb437e3b85c89cd008fb00011", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -493,31 +549,31 @@ "Content-Length": "143", "Content-Security-Policy": "default-src \u0027self\u0027", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 01 Sep 2020 14:42:10 GMT", + "Date": "Tue, 01 Sep 2020 17:35:41 GMT", "Server": "Kestrel", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", - "x-ms-build-version": "1.0.20200827-3-83ffcc79-develop", + "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", "x-ms-keyvault-network-info": "addr=70.121.15.5", "x-ms-keyvault-region": "EASTUS", - "x-ms-request-id": "7b539da8-ec5d-11ea-bfab-0242ac120006", - "x-ms-server-latency": "599" + "x-ms-request-id": "c8760180-ec6b-11ea-a7a1-0242ac120008", + "x-ms-server-latency": "457" }, "ResponseBody": { - "endTime": 1598971327, + "endTime": 1598981740, "error": null, - "jobId": "7e086a08615f486eb23ffb0843128f76", - "startTime": 1598971315, + "jobId": "a629fb2df8a74aaab232701bba8a5425", + "startTime": 1598981723, "status": "Succeeded", "statusDetails": null } } ], "Variables": { + "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net", "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY": "Sanitized", "BLOB_STORAGE_ACCOUNT_NAME": "chrissprim", - "RandomSeed": "2048415340", - "AZURE_KEYVAULT_URL": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net" + "RandomSeed": "232847108" } -} +} \ No newline at end of file From 6f8005dc8d1f8b49f1ba88b5fc5b5f03878bcac3 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 13:19:11 -0500 Subject: [PATCH 10/16] links --- .../samples/Sample1_BackupHelloWorldAsync.md | 4 ++-- .../samples/Sample1_BackupHelloWorldSync.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md index fc3dc8b57430c..2c8515f3b8761 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -45,8 +45,8 @@ Uri backupBlobUri = backupResult.Value; ## Performing a full key restore Using the `KeyVaultBackupClient`, you can restore your entire collection of keys from backup. The data source for full key restore is a storage blob accessed using Shared Access Signature authentication. -For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). -Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) ```C# Snippet:HelloFullRestoreAsync // Get the folder name from the backupBlobUri returned from a previous BackupOperation diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md index f41b6bcf43025..498b09a42d76a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -49,8 +49,8 @@ Uri backupBlobUri = backupOperation.Value; ## Performing a full key restore Using the `KeyVaultBackupClient`, you can restore your entire collection of keys from backup. The data source for full key restore is a storage blob accessed using Shared Access Signature authentication. -For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](blob_readme) and the [authentication samples](blob_auth). -Alternatively, it is possible to [generate a SAS token in Storage Explorer](storage_explorer_sas) +For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). +Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) ```C# Snippet:HelloFullRestoreSync // Get the folder name from the backupBlobUri returned from a previous BackupOperation From fa61c6c53e9890d41e8729d3611f585001a26e93 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 13:41:19 -0500 Subject: [PATCH 11/16] thanks, link validation :) --- .../samples/Sample1_BackupHelloWorldAsync.md | 2 +- .../samples/Sample1_BackupHelloWorldSync.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md index 2c8515f3b8761..cc183c53e123c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -21,7 +21,7 @@ For more details on creating a SAS token using the `BlobServiceClient`, see the Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. -To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md index 498b09a42d76a..0cbfed607622b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -21,7 +21,7 @@ For more details on creating a SAS token using the `BlobServiceClient`, see the Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) To ensure you have some keys for backup, you may want to first create a key using the `KeyClient`. -To create a new `KeyClient` to create a key, see the [Creating a KeyClient](creating_https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. +To create a new `KeyClient` to create a key, see the [Creating a KeyClient](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-keyclientkeyvault) and [Creating a key](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md#creating-a-key) samples. In the sample below, you can set `blobStorageUrl`, `blobContainerName`, and `sasToken` based on a environment variables, configuration settings, or any way that works for your application. From 3c78730946e3d1e95fe4c010fc59f341320207de Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 17:14:51 -0500 Subject: [PATCH 12/16] readme fixes --- .../readme.md | 84 ++++++++----------- .../samples/Sample1_RbacHelloWorldAsync.md | 6 +- .../samples/Sample1_RbacHelloWorldSync.md | 10 +-- 3 files changed, 43 insertions(+), 57 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index 24c109a5e54a1..eda1c0a53d1c2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -4,6 +4,8 @@ Azure Key Vault is a cloud service for securely storing and accessing secrets. A The Azure Key Vault administration library clients support administrative tasks such as full backup / restore and key-level role-based access control (RBAC). +[Source code][admin_client_src] | [Package (NuGet)][admin_client_nuget_package] | [API reference documentation][API_reference] | [Product documentation][keyvault_docs] | [Samples][admin_client_samples] + ## Getting started ### Install the package @@ -89,66 +91,35 @@ List roleAssignments = client.GetRoleAssignments(KeyVaul ## Key concepts -### RoleDefinition -A `RoleDefinition` is a collection of permissions. A role definition defines the operations that can be performed, such as read, write, and delete. It can also define the operations that are excluded from allowed operations. +### KeyVaultRoleDefinition +A `KeyVaultRoleDefinition` is a collection of permissions. A role definition defines the operations that can be performed, such as read, write, and delete. It can also define the operations that are excluded from allowed operations. -RoleDefinitions can be listed and specified as part of a `RoleAssignment`. +RoleDefinitions can be listed and specified as part of a `KeyVaultRoleAssignment`. ### RoleAssignment. -A `RoleAssignment` is the association of a RoleDefinition to a service principal. They can be created, listed, fetched individually, and deleted. +A `KeyVaultRoleAssignment` is the association of a KeyVaultRoleDefinition to a service principal. They can be created, listed, fetched individually, and deleted. ### KeyVaultAccessControlClient -A `KeyVaultAccessControlClient` provides both synchronous and asynchronous operations allowing for management of `RoleDefinition` and `RoleAssignment` objects. +A `KeyVaultAccessControlClient` provides both synchronous and asynchronous operations allowing for management of `KeyVaultRoleDefinition` and `KeyVaultRoleAssignment` objects. ## Examples The Azure.Security.KeyVault.Administration package supports synchronous and asynchronous APIs. The following section provides several code snippets using the `client` [created above](#create-keyvaultaccesscontrolclient), covering some of the most common Azure Key Vault access control related tasks: -### List the role definitions -List the role definitions available for assignment. - -```C# Snippet:GetRoleDefinitions -Pageable allDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); - -foreach (KeyVaultRoleDefinition roleDefinition in allDefinitions) -{ - Console.WriteLine(roleDefinition.Id); - Console.WriteLine(roleDefinition.RoleName); - Console.WriteLine(roleDefinition.Description); - Console.WriteLine(); -} -``` - -### Create, Get, and Delete a role assignment -Assign a role to a service principal. This will require a role definition id from the list retrieved in the [above snippet](#list-the-role-definitions) and the principal object id retrieved in the [Create/Get credentials](#create/get-credentials) - -```C# Snippet:ReadmeCreateRoleAssignment -// Replace with a role definition Id from the definitions returned from the List the role definitions section above -string definitionIdToAssign = ""; - -// Replace with the service principal object id from the Create/Get credentials section above -string servicePrincipalObjectId = ""; - -KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); -RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); +### Sync examples +- [Listing All Role Definitions](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md#listing-all-role-definitions-sync) +- [Listing All Role Assignments](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md#listing-all-role-assignments) +- [Creating a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md#creating-a-role-assignment) +- [Getting a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md#getting-a-role-assignment) +- [Deleting a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md#deleting-a-role-assignment) -Console.WriteLine(createdAssignment.Name); -Console.WriteLine(createdAssignment.Properties.PrincipalId); -Console.WriteLine(createdAssignment.Properties.RoleDefinitionId); - -KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); - -Console.WriteLine(fetchedAssignment.Name); -Console.WriteLine(fetchedAssignment.Properties.PrincipalId); -Console.WriteLine(fetchedAssignment.Properties.RoleDefinitionId); - -KeyVaultRoleAssignment deletedAssignment = client.DeleteRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); - -Console.WriteLine(deletedAssignment.Name); -Console.WriteLine(deletedAssignment.Properties.PrincipalId); -Console.WriteLine(deletedAssignment.Properties.RoleDefinitionId); -``` +### Async examples +- [Listing All Role Definitions](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md#listing-all-role-definitions-sync) +- [Listing All Role Assignments](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md#listing-all-role-assignments) +- [Creating a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md#creating-a-role-assignment) +- [Getting a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md#getting-a-role-assignment) +- [Deleting a Role Assignment](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md#deleting-a-role-assignment) ## Troubleshooting @@ -181,9 +152,20 @@ Content-Length: 143 Content-Type: application/json ``` +### Setting up console logging +The simplest way to see the logs is to enable the console logging. +To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method. + +``` +// Setup a listener to monitor logged events. +using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger(); +``` + +To learn more about other logging mechanisms see [here](logging). + ## Next steps -Content forthcoming +Get started with our [samples](admin_client_samples). ## Contributing @@ -205,9 +187,13 @@ additional questions or comments. [rbac_client]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs [keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [keyvault_rest]: https://docs.microsoft.com/rest/api/keyvault/ +[admin_client_nuget_package]: https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/ +[admin_client_samples]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples +[admin_client_src]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/keyvault/Azure.Security.KeyVault.Administration/src [JWK]: https://tools.ietf.org/html/rfc7517 [nuget]: https://www.nuget.org/ [DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/identity/Azure.Identity/README.md +[logging]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/core/Azure.Core/samples/Diagnostics.md [contributing]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Microsoft.Azure.KeyVault/CONTRIBUTING.md diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md index 908aa3abca27a..41d8796b8eab1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md @@ -38,7 +38,7 @@ await foreach (var assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScop } ``` -# Creating a Role Assignment +## Creating a Role Assignment Now let's assign a role to a service principal. To do this we'll need a role definition Id and a service principal object Id. @@ -58,7 +58,7 @@ KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperti RoleAssignment createdAssignment = await client.CreateRoleAssignmentAsync(RoleAssignmentScope.Global, properties); ``` -# Getting a Role Assignment +## Getting a Role Assignment To get an existing role assignment, we'll need the `Name` property from an existing assignment. Let's use the `createdAssignment` from the previous example. @@ -66,7 +66,7 @@ To get an existing role assignment, we'll need the `Name` property from an exist KeyVaultRoleAssignment fetchedAssignment = await client.GetRoleAssignmentAsync(KeyVaultRoleScope.Global, createdAssignment.Name); ``` -# Deleting a Role Assignment +## Deleting a Role Assignment To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. ```C# Snippet:DeleteRoleAssignmentAsync diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md index b83257179ac9d..3fa0f40fb6078 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md @@ -1,4 +1,4 @@ -# Creating, getting, and deleting role assignments +# Creating, getting, and deleting role assignments (Sync) This sample demonstrates how to create, get, and delete role assignments in Azure Key Vault. To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. @@ -14,7 +14,7 @@ In the sample below, you can set `keyVaultUrl` based on an environment variable, KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(new Uri(keyVaultUrl), new DefaultAzureCredential()); ``` -## Listing All Role Definitions (Sync) +## Listing All Role Definitions In order to assign a role to a service principal, we'll have to know which role definitions are available. Let's get all of them. @@ -30,7 +30,7 @@ Before assigning any new roles, let's get all the current role assignments. List roleAssignments = client.GetRoleAssignments(KeyVaultRoleScope.Global).ToList(); ``` -# Creating a Role Assignment +## Creating a Role Assignment Now let's assign a role to a service principal. To do this we'll need a role definition Id and a service principal object Id. @@ -50,7 +50,7 @@ KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperti RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); ``` -# Getting a Role Assignment +## Getting a Role Assignment To get an existing role assignment, we'll need the `Name` property from an existing assignment. Let's use the `createdAssignment` from the previous example. @@ -58,7 +58,7 @@ To get an existing role assignment, we'll need the `Name` property from an exist KeyVaultRoleAssignment fetchedAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, createdAssignment.Name); ``` -# Deleting a Role Assignment +## Deleting a Role Assignment To remove a role assignment from a service principal, the role assignment must be deleted. Let's delete the `createdAssignment` from the previous example. ```C# Snippet:DeleteRoleAssignment From 6ecbdb46269841d7b7d1d722d913c6e1219a28df Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 17:55:04 -0500 Subject: [PATCH 13/16] prc --- .../Azure.ResourceManager.KeyVault/README.md | 2 +- .../readme.md | 6 +++--- .../samples/Sample1_BackupHelloWorldAsync.md | 12 ++++++------ .../samples/Sample1_BackupHelloWorldSync.md | 10 +++++----- .../samples/Sample1_RbacHelloWorldAsync.md | 8 ++++---- .../samples/Sample1_RbacHelloWorldSync.md | 4 ++-- .../samples/Sample2_RbacScopeAssignment.md | 2 +- .../RoleAssignmentNotFound.json | 14 +++++++------- .../tests/samples/AccessControlSampleSnippets.cs | 15 ++++++--------- .../tests/samples/Sample1_BackupHelloWorld.cs | 10 +++++----- .../tests/samples/Sample1_RbacHelloWorld.cs | 4 ++-- .../tests/samples/Sample2_RbacScopeAssignment.cs | 2 +- .../README.md | 4 ++-- .../samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_GetCertificates.md | 2 +- .../Azure.Security.KeyVault.Keys/README.md | 4 ++-- .../samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_BackupAndRestore.md | 2 +- .../samples/Sample3_GetKeys.md | 2 +- .../samples/Sample4_EncryptDecrypt.md | 2 +- .../samples/Sample5_SignVerify.md | 2 +- .../samples/Sample6_WrapUnwrap.md | 2 +- .../Azure.Security.KeyVault.Secrets/README.md | 4 ++-- .../samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_BackupAndRestore.md | 2 +- .../samples/Sample3_GetSecrets.md | 2 +- 26 files changed, 60 insertions(+), 63 deletions(-) diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/README.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/README.md index f102aba4cc04b..b5e2b29530b8a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/README.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/README.md @@ -9,7 +9,7 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Azure Key Vault management library for .NET with [NuGet](https://www.nuget.org/): ```PowerShell -Install-Package Azure.ResourceManager.KeyVault -Version 1.0.0-preview.1 +dotnet install Azure.ResourceManager.KeyVault -Version 1.0.0-preview.1 ``` ### Prerequisites diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index eda1c0a53d1c2..aefd7dea0b45b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -130,7 +130,7 @@ For example, if you try to retrieve a role assignment that doesn't exist in your ```C# Snippet:RoleAssignmentNotFound try { - KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "invalid-name"); + KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "example-name"); } catch (RequestFailedException ex) { @@ -161,11 +161,11 @@ To create an Azure SDK log listener that outputs messages to console use AzureEv using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger(); ``` -To learn more about other logging mechanisms see [here](logging). +To learn more about other logging mechanisms see [here][logging]. ## Next steps -Get started with our [samples](admin_client_samples). +Get started with our [samples][admin_client_samples]. ## Contributing diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md index cc183c53e123c..feaf0544f8cf9 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -1,7 +1,7 @@ # Performing a full key backup and restore (Async) -This sample demonstrates how to a full key backup and restore in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +This sample demonstrates how to a perform full key backup and restore in Azure Key Vault. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyVaultBackupClient @@ -16,7 +16,7 @@ KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new ## Performing a full key backup -Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. +Using the `KeyVaultBackupClient`, you can back up your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) @@ -36,7 +36,7 @@ UriBuilder builder = new UriBuilder(blobStorageUrl) BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); // Wait for completion of the BackupOperation. -var backupResult = await backupOperation.WaitForCompletionAsync(); +Response backupResult = await backupOperation.WaitForCompletionAsync(); // Get the Uri for the location of you backup blob. Uri backupBlobUri = backupResult.Value; @@ -50,14 +50,14 @@ Alternatively, it is possible to [generate a SAS token in Storage Explorer](http ```C# Snippet:HelloFullRestoreAsync // Get the folder name from the backupBlobUri returned from a previous BackupOperation -var uriSegments = backupBlobUri.Segments; +string[] uriSegments = backupBlobUri.Segments; string folderName = uriSegments[uriSegments.Length - 1]; // Start the restore. RestoreOperation restoreOperation = await Client.StartRestoreAsync(builder.Uri, sasToken, folderName); // Wait for completion of the RestoreOperation. -var restoreResult = await restoreOperation.WaitForCompletionAsync(); +Response restoreResult = await restoreOperation.WaitForCompletionAsync(); ``` diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md index 0cbfed607622b..26a3c3e25588c 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -1,7 +1,7 @@ # Performing a full key backup and restore (Sync) -This sample demonstrates how to a full key backup and restore in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +This sample demonstrates how to perform a full key backup and restore in Azure Key Vault. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyVaultBackupClient @@ -16,7 +16,7 @@ KeyVaultBackupClient client = new KeyVaultBackupClient(new Uri(keyVaultUrl), new ## Performing a full key backup -Using the `KeyVaultBackupClient`, you can backup your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. +Using the `KeyVaultBackupClient`, you can back up your entire collection of keys. The backing store for full key backups is a blob storage container using Shared Access Signature authentication. For more details on creating a SAS token using the `BlobServiceClient`, see the [Azure Storage Blobs client README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md) and the [authentication samples](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs). Alternatively, it is possible to [generate a SAS token in Storage Explorer](https://docs.microsoft.com/en-us/azure/vs-azure-tools-storage-manage-with-storage-explorer?tabs=windows#generate-a-shared-access-signature-in-storage-explorer) @@ -54,7 +54,7 @@ Alternatively, it is possible to [generate a SAS token in Storage Explorer](http ```C# Snippet:HelloFullRestoreSync // Get the folder name from the backupBlobUri returned from a previous BackupOperation -var uriSegments = backupBlobUri.Segments; +string[] uriSegments = backupBlobUri.Segments; string folderName = uriSegments[uriSegments.Length - 1]; // Start the restore. @@ -66,7 +66,7 @@ while (!restoreOperation.HasCompleted) restoreOperation.UpdateStatus(); Thread.Sleep(3000); } -var restoreResult = backupOperation.Value; +Uri restoreResult = backupOperation.Value; ``` diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md index 41d8796b8eab1..f6b4e8a4cbcec 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md @@ -1,7 +1,7 @@ # Creating, getting, and deleting role assignments (Async) This sample demonstrates how to create, get, and delete role assignments in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyVaultAccessControlClient @@ -20,7 +20,7 @@ In order to assign a role to a service principal, we'll have to know which role ```C# Snippet:GetRoleDefinitionsAsync List roleDefinitions = new List(); -await foreach (var definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) +await foreach (KeyVaultRoleDefinition definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) { roleDefinitions.Add(definition); } @@ -32,7 +32,7 @@ Before assigning any new roles, let's get all the current role assignments. ```C# Snippet:GetRoleAssignmentsAsync List roleAssignments = new List(); -await foreach (var assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) +await foreach (KeyVaultRoleAssignment assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) { roleAssignments.Add(assignment); } @@ -44,7 +44,7 @@ Now let's assign a role to a service principal. To do this we'll need a role def A role definition Id can be obtained from the `Id` property of one of the role definitions returned from `GetRoleAssignments`. -See the [README](../README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md index 3fa0f40fb6078..1125b1ecc2ab5 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md @@ -1,7 +1,7 @@ # Creating, getting, and deleting role assignments (Sync) This sample demonstrates how to create, get, and delete role assignments in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyVaultAccessControlClient @@ -36,7 +36,7 @@ Now let's assign a role to a service principal. To do this we'll need a role def A role definition Id can be obtained from the `Id` property of one of the role definitions returned from `GetRoleAssignments`. -See the [README](../README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md index b46fbf9dd6462..6c84ce8c8218a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md @@ -7,7 +7,7 @@ For information about interacting with a `KeyVaultKey` with a `KeyClient`, see t Let's assign a role to a service principal so that it applies to all keys. To do this we'll need a service principal object Id and a role definition Id. -See the [README](../README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json index d98fab54ff0b7..d81e71716aeb0 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/SessionRecords/AccessControlSampleSnippets/RoleAssignmentNotFound.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/example-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -24,13 +24,13 @@ "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", - "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", - "x-ms-server-latency": "0" + "x-ms-request-id": "47087520-ec74-11ea-be1e-0242ac120005", + "x-ms-server-latency": "1" }, "ResponseBody": "OK" }, { - "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/invalid-name?api-version=7.2-preview", + "RequestUri": "https://eastus2.chriss-eu2.managedhsm-int.azure-int.net/providers/Microsoft.Authorization/roleAssignments/example-name?api-version=7.2-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -53,13 +53,13 @@ "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", "x-ms-build-version": "1.0.20200901-1-40187cd0-develop", - "x-ms-request-id": "147983c8-ec70-11ea-84e4-0242ac120003", - "x-ms-server-latency": "1" + "x-ms-request-id": "47087520-ec74-11ea-be1e-0242ac120005", + "x-ms-server-latency": "2" }, "ResponseBody": { "error": { "code": "RoleAssignmentNotFound", - "message": "Requested role assignment not found (Activity ID: 147983c8-ec70-11ea-84e4-0242ac120003)" + "message": "Requested role assignment not found (Activity ID: 47087520-ec74-11ea-be1e-0242ac120005)" } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs index 4847c1bd818ad..ded35ec397b92 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs @@ -38,7 +38,8 @@ public void CreateClient() // Create a new access control client using the default credential from Azure.Identity using environment variables previously set, // including AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID. KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(vaultUri: new Uri(keyVaultUrl), credential: new DefaultAzureCredential()); - /*@@*/client = Client; + /*@@*/ + client = Client; // Retrieve all the role definitions. List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); @@ -71,12 +72,7 @@ public void GetRoleDefinitions() public void CreateRoleAssignment() { client = Client; - Pageable definitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); - List allDefinitions = new List(); - foreach (KeyVaultRoleDefinition roleDefinition in definitions) - { - allDefinitions.Add(roleDefinition); - } + Pageable allDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global); _roleDefinitionId = allDefinitions.FirstOrDefault(d => d.RoleName == RoleName).Id; // Replace roleDefinitionId with a role definition Id from the definitions returned from the List the role definitions section above @@ -94,7 +90,8 @@ public void CreateRoleAssignment() KeyVaultRoleAssignmentProperties properties = new KeyVaultRoleAssignmentProperties(definitionIdToAssign, servicePrincipalObjectId); //@@RoleAssignment createdAssignment = client.CreateRoleAssignment(RoleAssignmentScope.Global, properties); - /*@@*/KeyVaultRoleAssignment createdAssignment = client.CreateRoleAssignment(KeyVaultRoleScope.Global, properties, _roleAssignmentId); + /*@@*/ + KeyVaultRoleAssignment createdAssignment = client.CreateRoleAssignment(KeyVaultRoleScope.Global, properties, _roleAssignmentId); Console.WriteLine(createdAssignment.Name); Console.WriteLine(createdAssignment.Properties.PrincipalId); @@ -123,7 +120,7 @@ public void RoleAssignmentNotFound() #region Snippet:RoleAssignmentNotFound try { - KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "invalid-name"); + KeyVaultRoleAssignment roleAssignment = client.GetRoleAssignment(KeyVaultRoleScope.Global, "example-name"); } catch (RequestFailedException ex) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs index c01920c493007..73f64ce5bbf45 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_BackupHelloWorld.cs @@ -44,7 +44,7 @@ public async Task BackupAndRestoreSampleAsync() BackupOperation backupOperation = await Client.StartBackupAsync(builder.Uri, sasToken); // Wait for completion of the BackupOperation. - var backupResult = await backupOperation.WaitForCompletionAsync(); + Response backupResult = await backupOperation.WaitForCompletionAsync(); // Get the Uri for the location of you backup blob. Uri backupBlobUri = backupResult.Value; @@ -55,14 +55,14 @@ public async Task BackupAndRestoreSampleAsync() #region Snippet:HelloFullRestoreAsync // Get the folder name from the backupBlobUri returned from a previous BackupOperation - var uriSegments = backupBlobUri.Segments; + string[] uriSegments = backupBlobUri.Segments; string folderName = uriSegments[uriSegments.Length - 1]; // Start the restore. RestoreOperation restoreOperation = await Client.StartRestoreAsync(builder.Uri, sasToken, folderName); // Wait for completion of the RestoreOperation. - var restoreResult = await restoreOperation.WaitForCompletionAsync(); + Response restoreResult = await restoreOperation.WaitForCompletionAsync(); #endregion Assert.That(restoreResult, Is.Not.Null); Assert.That(restoreOperation.HasValue, Is.True); @@ -102,7 +102,7 @@ public void BackupAndRestoreSampleSync() #region Snippet:HelloFullRestoreSync // Get the folder name from the backupBlobUri returned from a previous BackupOperation - var uriSegments = backupBlobUri.Segments; + string[] uriSegments = backupBlobUri.Segments; string folderName = uriSegments[uriSegments.Length - 1]; // Start the restore. @@ -114,7 +114,7 @@ public void BackupAndRestoreSampleSync() restoreOperation.UpdateStatus(); Thread.Sleep(3000); } - var restoreResult = backupOperation.Value; + Uri restoreResult = backupOperation.Value; #endregion Assert.That(restoreResult, Is.Not.Null); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs index dad0a86dfc69c..2454f52b2ee8a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample1_RbacHelloWorld.cs @@ -69,7 +69,7 @@ public async Task GetDefinitionsAndAssignmentsAsync() // Retrieve all the role definitions. #region Snippet:GetRoleDefinitionsAsync List roleDefinitions = new List(); - await foreach (var definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) + await foreach (KeyVaultRoleDefinition definition in client.GetRoleDefinitionsAsync(KeyVaultRoleScope.Global)) { roleDefinitions.Add(definition); } @@ -78,7 +78,7 @@ public async Task GetDefinitionsAndAssignmentsAsync() // Retrieve all the role assignments. #region Snippet:GetRoleAssignmentsAsync List roleAssignments = new List(); - await foreach (var assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) + await foreach (KeyVaultRoleAssignment assignment in client.GetRoleAssignmentsAsync(KeyVaultRoleScope.Global)) { roleAssignments.Add(assignment); } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs index 1279f32546e52..909335d59d4e7 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/Sample2_RbacScopeAssignment.cs @@ -52,7 +52,7 @@ public async Task CreateRoleAssignmentAsync() RegisterForCleanup(keysScopedAssignment); - var keyClient = KeyClient; + KeyClient keyClient = KeyClient; List keyProperties = await keyClient.GetPropertiesOfKeysAsync().ToEnumerableAsync().ConfigureAwait(false); string keyName = keyProperties.First().Name; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/README.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/README.md index 6728e210601e6..ccc1b0dba90ea 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/README.md @@ -11,7 +11,7 @@ The Azure Key Vault certificates client library enables programmatically managin Install the Azure Key Vault certificates client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Certificates -IncludePrerelease +dotnet install Azure.Security.KeyVault.Certificates -IncludePrerelease ``` ### Prerequisites @@ -32,7 +32,7 @@ Client secret credential authentication is being used in this getting started se or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: ```PowerShell -Install-Package Azure.Identity +dotnet install Azure.Identity ``` #### Create/Get credentials diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md index 3188a10948a78..2a95c4f60fa02 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Setting, getting, updating, and deleting certificates This sample demonstrates how to set, get, update, and delete a certificate. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a CertificateClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md index 43a1537c29a0b..080f95ca803d6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md @@ -1,7 +1,7 @@ # Listing certificates, certificate versions, and deleted certificates This sample demonstrates how to list certificates, versions of given certificates, and list deleted certificates in a soft delete-enabled Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a CertificateClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/README.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/README.md index f2ebe22ca5435..065c28c637c2b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/README.md @@ -11,7 +11,7 @@ The Azure Key Vault keys library client supports RSA keys and Elliptic Curve (EC Install the Azure Key Vault keys client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Keys +dotnet install Azure.Security.KeyVault.Keys ``` ### Prerequisites @@ -32,7 +32,7 @@ Client secret credential authentication is being used in this getting started se or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: ```PowerShell -Install-Package Azure.Identity +dotnet install Azure.Identity ``` #### Create/Get credentials diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md index 40624427cc619..8b363e7d56131 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Creating, getting, updating, and deleting keys This sample demonstrates how to create, get, update, and delete a key in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md index 263d7c64686cd..d5f1db09c7bb2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md @@ -1,7 +1,7 @@ # Back up and restore a key This sample demonstrates how to back up and restore a Key from Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md index e9be005f2f7ff..0ce33d83441a1 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md @@ -1,7 +1,7 @@ # Listing keys, key versions, and deleted keys This sample demonstrates how to list keys and versions of a given key, and list deleted keys in a soft delete-enabled Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md index 4da51e6f722da..3b73a427f8e31 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md @@ -1,7 +1,7 @@ # Encrypting and decrypt keys This sample demonstrates how to encrypt and decrypt a single block of plain text with an RSA key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md index 4e1053540c340..414da3c13155f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md @@ -1,7 +1,7 @@ # Signing and verifying keys This sample demonstrates how to sign data with both a RSA key and an EC key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md index 4c5c4cf117e3f..e289ba7dc4a02 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md @@ -1,7 +1,7 @@ # Wrapping and unwrap a key This sample demonstrates how to wrap and unwrap a symmetric key with an RSA key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md index 59857dd642512..3bc2fecbd99f6 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/README.md @@ -11,7 +11,7 @@ The Azure Key Vault secrets client library allows you to securely store and cont Install the Azure Key Vault secrets client library for .NET with [NuGet][nuget]: ```PowerShell -Install-Package Azure.Security.KeyVault.Secrets +dotnet install Azure.Security.KeyVault.Secrets ``` ### Prerequisites @@ -32,7 +32,7 @@ Client secret credential authentication is being used in this getting started se or other credential providers provided with the Azure SDK, you should install the Azure.Identity package: ```PowerShell -Install-Package Azure.Identity +dotnet install Azure.Identity ``` #### Create/Get credentials diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md index 00b05682fa83d..2c44df5a148ce 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Creating, getting, updating, and deleting secrets This sample demonstrates how to create, get, update, and delete a secret in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a SecretClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md index d5812f96295aa..df6a0efb2410e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md @@ -1,7 +1,7 @@ # Back up and restore a secret This sample demonstrates how to back up and restore a secret from Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a SecretClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md index 238f434878b68..e2d5c2c1be376 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md @@ -1,7 +1,7 @@ # Listing secrets, secret versions, and deleted secrets This sample demonstrates how to list secrets, versions of a secret, and listing deleted secrets in a soft delete-enabled Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. ## Creating a SecretClient From 076c673d67213f4fac439890e0b4eb75797ba533 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 18:07:40 -0500 Subject: [PATCH 14/16] make errors internal --- .../Models/KeyVaultServiceError.Serialization.cs | 2 +- .../src/Generated/Models/KeyVaultServiceError.cs | 2 +- ...electiveKeyRestoreDetailsInternal.Serialization.cs} | 6 +++--- ...etails.cs => SelectiveKeyRestoreDetailsInternal.cs} | 10 +++++----- .../src/KeyVaultServiceError.cs | 3 +-- ...etails.cs => SelectiveKeyRestoreDetailsInternal.cs} | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{SelectiveKeyRestoreDetails.Serialization.cs => SelectiveKeyRestoreDetailsInternal.Serialization.cs} (85%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/{SelectiveKeyRestoreDetails.cs => SelectiveKeyRestoreDetailsInternal.cs} (83%) rename sdk/keyvault/Azure.Security.KeyVault.Administration/src/{SelectiveKeyRestoreDetails.cs => SelectiveKeyRestoreDetailsInternal.cs} (64%) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs index 4e235a44c4af4..1b68fd731a2ef 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class KeyVaultServiceError + internal partial class KeyVaultServiceError { internal static KeyVaultServiceError DeserializeKeyVaultServiceError(JsonElement element) { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.cs index 66a57006034b1..37d4fcf01cc9e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/KeyVaultServiceError.cs @@ -8,7 +8,7 @@ namespace Azure.Security.KeyVault.Administration.Models { /// The key vault server error. - public partial class KeyVaultServiceError + internal partial class KeyVaultServiceError { /// Initializes a new instance of KeyVaultServiceError. internal KeyVaultServiceError() diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.Serialization.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs similarity index 85% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.Serialization.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs index 4ec95ad036614..066f8c2d491ba 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.Serialization.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.Security.KeyVault.Administration.Models { - public partial class SelectiveKeyRestoreDetails + internal partial class SelectiveKeyRestoreDetailsInternal { - internal static SelectiveKeyRestoreDetails DeserializeSelectiveKeyRestoreDetails(JsonElement element) + internal static SelectiveKeyRestoreDetailsInternal DeserializeSelectiveKeyRestoreDetailsInternal(JsonElement element) { Optional status = default; Optional statusDetails = default; @@ -64,7 +64,7 @@ internal static SelectiveKeyRestoreDetails DeserializeSelectiveKeyRestoreDetails continue; } } - return new SelectiveKeyRestoreDetails(status.Value, statusDetails.Value, error.Value, jobId.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + return new SelectiveKeyRestoreDetailsInternal(status.Value, statusDetails.Value, error.Value, jobId.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); } } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.cs similarity index 83% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.cs index 04f62dc349119..2bbf819e9b176 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetails.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Models/SelectiveKeyRestoreDetailsInternal.cs @@ -10,21 +10,21 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Selective Key Restore operation. - public partial class SelectiveKeyRestoreDetails + internal partial class SelectiveKeyRestoreDetailsInternal { - /// Initializes a new instance of SelectiveKeyRestoreDetails. - internal SelectiveKeyRestoreDetails() + /// Initializes a new instance of SelectiveKeyRestoreDetailsInternal. + internal SelectiveKeyRestoreDetailsInternal() { } - /// Initializes a new instance of SelectiveKeyRestoreDetails. + /// Initializes a new instance of SelectiveKeyRestoreDetailsInternal. /// Status of the restore operation. /// The status details of restore operation. /// Error encountered, if any, during the selective key restore operation. /// Identifier for the selective key restore operation. /// The start time of the restore operation. /// The end time of the restore operation. - internal SelectiveKeyRestoreDetails(string status, string statusDetails, KeyVaultServiceError error, string jobId, DateTimeOffset? startTime, DateTimeOffset? endTime) + internal SelectiveKeyRestoreDetailsInternal(string status, string statusDetails, KeyVaultServiceError error, string jobId, DateTimeOffset? startTime, DateTimeOffset? endTime) { Status = status; StatusDetails = statusDetails; diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultServiceError.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultServiceError.cs index 834a31d998802..5c7ab82c5cbc2 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultServiceError.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultServiceError.cs @@ -9,9 +9,8 @@ namespace Azure.Security.KeyVault.Administration.Models { - // TODO: Remove after https://github.com/Azure/azure-rest-api-specs/issues/9812 is fixed /// [CodeGenModel("Error")] - public partial class KeyVaultServiceError + internal partial class KeyVaultServiceError {} } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetails.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetailsInternal.cs similarity index 64% rename from sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetails.cs rename to sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetailsInternal.cs index 48a8b1ac5ad95..101b8cb63c031 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetails.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/SelectiveKeyRestoreDetailsInternal.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Azure.Core; @@ -7,6 +7,6 @@ namespace Azure.Security.KeyVault.Administration.Models { /// Full restore operation. [CodeGenModel("SelectiveKeyRestoreOperation")] - public partial class SelectiveKeyRestoreDetails + internal partial class SelectiveKeyRestoreDetailsInternal { } } From 16d9dd19d44948f6356fbf869e826dd4381754cf Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 1 Sep 2020 19:59:03 -0500 Subject: [PATCH 15/16] keep lowercase readme.md until this merges --- ...ty.KeyVault.Administration.netstandard2.0.cs | 17 ----------------- .../samples/Sample1_BackupHelloWorldAsync.md | 2 +- .../samples/Sample1_BackupHelloWorldSync.md | 2 +- .../samples/Sample1_RbacHelloWorldAsync.md | 4 ++-- .../samples/Sample1_RbacHelloWorldSync.md | 4 ++-- .../samples/Sample2_RbacScopeAssignment.md | 2 +- 6 files changed, 7 insertions(+), 24 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs index afead38632ee9..86bd6046a02dc 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/api/Azure.Security.KeyVault.Administration.netstandard2.0.cs @@ -148,21 +148,4 @@ public KeyVaultRoleDefinition() { } public string RoleType { get { throw null; } set { } } public string Type { get { throw null; } } } - public partial class KeyVaultServiceError - { - internal KeyVaultServiceError() { } - public string Code { get { throw null; } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultServiceError InnerError { get { throw null; } } - public string Message { get { throw null; } } - } - public partial class SelectiveKeyRestoreDetails - { - internal SelectiveKeyRestoreDetails() { } - public System.DateTimeOffset? EndTime { get { throw null; } } - public Azure.Security.KeyVault.Administration.Models.KeyVaultServiceError Error { get { throw null; } } - public string JobId { get { throw null; } } - public System.DateTimeOffset? StartTime { get { throw null; } } - public string Status { get { throw null; } } - public string StatusDetails { get { throw null; } } - } } diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md index feaf0544f8cf9..4bcd78dd5c98e 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldAsync.md @@ -1,7 +1,7 @@ # Performing a full key backup and restore (Async) This sample demonstrates how to a perform full key backup and restore in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions. ## Creating a KeyVaultBackupClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md index 26a3c3e25588c..32e6a767c5850 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_BackupHelloWorldSync.md @@ -1,7 +1,7 @@ # Performing a full key backup and restore (Sync) This sample demonstrates how to perform a full key backup and restore in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions. ## Creating a KeyVaultBackupClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md index f6b4e8a4cbcec..e4c2ce85e0b15 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldAsync.md @@ -1,7 +1,7 @@ # Creating, getting, and deleting role assignments (Async) This sample demonstrates how to create, get, and delete role assignments in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions. ## Creating a KeyVaultAccessControlClient @@ -44,7 +44,7 @@ Now let's assign a role to a service principal. To do this we'll need a role def A role definition Id can be obtained from the `Id` property of one of the role definitions returned from `GetRoleAssignments`. -See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md index 1125b1ecc2ab5..55b2d856de2ac 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample1_RbacHelloWorldSync.md @@ -1,7 +1,7 @@ # Creating, getting, and deleting role assignments (Sync) This sample demonstrates how to create, get, and delete role assignments in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions. ## Creating a KeyVaultAccessControlClient @@ -36,7 +36,7 @@ Now let's assign a role to a service principal. To do this we'll need a role def A role definition Id can be obtained from the `Id` property of one of the role definitions returned from `GetRoleAssignments`. -See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md index 6c84ce8c8218a..28e32d45be546 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/samples/Sample2_RbacScopeAssignment.md @@ -7,7 +7,7 @@ For information about interacting with a `KeyVaultKey` with a `KeyClient`, see t Let's assign a role to a service principal so that it applies to all keys. To do this we'll need a service principal object Id and a role definition Id. -See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions on how to generate a new service principal and obtain it's object Id. +See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md) for links and instructions on how to generate a new service principal and obtain it's object Id. You can also get the object Id for your currently signed in account by running the following [Azure CLI][azure_cli] command. ``` az ad signed-in-user show --query objectId From 3b0b15c00ae8ca1ba677b7fdd0c742331a53393a Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Wed, 2 Sep 2020 08:35:46 -0500 Subject: [PATCH 16/16] regen --- sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md | 2 +- .../tests/samples/AccessControlSampleSnippets.cs | 3 +-- .../samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_GetCertificates.md | 2 +- .../Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_BackupAndRestore.md | 2 +- .../Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md | 2 +- .../samples/Sample4_EncryptDecrypt.md | 2 +- .../Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md | 2 +- .../Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md | 2 +- .../samples/Sample1_HelloWorld.md | 2 +- .../samples/Sample2_BackupAndRestore.md | 2 +- .../samples/Sample3_GetSecrets.md | 2 +- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md index aefd7dea0b45b..9d5d6e56778d8 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/readme.md @@ -187,7 +187,7 @@ additional questions or comments. [rbac_client]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/src/KeyVaultAccessControlClient.cs [keyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [keyvault_rest]: https://docs.microsoft.com/rest/api/keyvault/ -[admin_client_nuget_package]: https://www.nuget.org/packages/Azure.Security.KeyVault.Administration/ +[admin_client_nuget_package]: https://www.nuget.org/packages?q=Azure.Security.KeyVault.Administration [admin_client_samples]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/keyvault/Azure.Security.KeyVault.Administration/samples [admin_client_src]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/keyvault/Azure.Security.KeyVault.Administration/src [JWK]: https://tools.ietf.org/html/rfc7517 diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs index ded35ec397b92..2483bc31fa842 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/tests/samples/AccessControlSampleSnippets.cs @@ -38,8 +38,7 @@ public void CreateClient() // Create a new access control client using the default credential from Azure.Identity using environment variables previously set, // including AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID. KeyVaultAccessControlClient client = new KeyVaultAccessControlClient(vaultUri: new Uri(keyVaultUrl), credential: new DefaultAzureCredential()); - /*@@*/ - client = Client; + /*@@*/ client = Client; // Retrieve all the role definitions. List roleDefinitions = client.GetRoleDefinitions(KeyVaultRoleScope.Global).ToList(); diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md index 2a95c4f60fa02..3188a10948a78 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Setting, getting, updating, and deleting certificates This sample demonstrates how to set, get, update, and delete a certificate. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a CertificateClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md index 080f95ca803d6..43a1537c29a0b 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples/Sample2_GetCertificates.md @@ -1,7 +1,7 @@ # Listing certificates, certificate versions, and deleted certificates This sample demonstrates how to list certificates, versions of given certificates, and list deleted certificates in a soft delete-enabled Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a CertificateClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md index 8b363e7d56131..40624427cc619 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Creating, getting, updating, and deleting keys This sample demonstrates how to create, get, update, and delete a key in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md index d5f1db09c7bb2..263d7c64686cd 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample2_BackupAndRestore.md @@ -1,7 +1,7 @@ # Back up and restore a key This sample demonstrates how to back up and restore a Key from Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md index 0ce33d83441a1..e9be005f2f7ff 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample3_GetKeys.md @@ -1,7 +1,7 @@ # Listing keys, key versions, and deleted keys This sample demonstrates how to list keys and versions of a given key, and list deleted keys in a soft delete-enabled Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md index 3b73a427f8e31..4da51e6f722da 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample4_EncryptDecrypt.md @@ -1,7 +1,7 @@ # Encrypting and decrypt keys This sample demonstrates how to encrypt and decrypt a single block of plain text with an RSA key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md index 414da3c13155f..4e1053540c340 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample5_SignVerify.md @@ -1,7 +1,7 @@ # Signing and verifying keys This sample demonstrates how to sign data with both a RSA key and an EC key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md index e289ba7dc4a02..4c5c4cf117e3f 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Keys/samples/Sample6_WrapUnwrap.md @@ -1,7 +1,7 @@ # Wrapping and unwrap a key This sample demonstrates how to wrap and unwrap a symmetric key with an RSA key. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a KeyClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md index 2c44df5a148ce..00b05682fa83d 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample1_HelloWorld.md @@ -1,7 +1,7 @@ # Creating, getting, updating, and deleting secrets This sample demonstrates how to create, get, update, and delete a secret in Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a SecretClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md index df6a0efb2410e..d5812f96295aa 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample2_BackupAndRestore.md @@ -1,7 +1,7 @@ # Back up and restore a secret This sample demonstrates how to back up and restore a secret from Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a SecretClient diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md index e2d5c2c1be376..238f434878b68 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md +++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/samples/Sample3_GetSecrets.md @@ -1,7 +1,7 @@ # Listing secrets, secret versions, and deleted secrets This sample demonstrates how to list secrets, versions of a secret, and listing deleted secrets in a soft delete-enabled Azure Key Vault. -To get started, you'll need a URI to an Azure Key Vault. See the [README](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/keyvault/Azure.Security.KeyVault.Administration/README.md) for links and instructions. +To get started, you'll need a URI to an Azure Key Vault. See the [README](../README.md) for links and instructions. ## Creating a SecretClient