From ede4b1272dd82cb349738b516bbb887e29a56550 Mon Sep 17 00:00:00 2001 From: Andrew Peacock Date: Wed, 19 May 2021 10:22:58 -0700 Subject: [PATCH] Adding the Azure.Communication.NetworkTraversal SDK - update --- .../CHANGELOG.md | 11 +- .../README.md | 19 ++-- ...ication.NetworkTraversal.netstandard2.0.cs | 4 +- .../src/autorest.md | 1 - .../tests.yml | 21 ++++ .../CommunicationRelayClientLiveTestBase.cs | 23 ++-- ...icationRelayClientRecordedTestSanitizer.cs | 2 +- ...CommunicationRelayClientTestEnvironment.cs | 3 - ...ngTurnCredentialsWithConnectionString.json | 40 +++---- ...nCredentialsWithConnectionStringAsync.json | 40 +++---- ...ttingTurnCredentialsWithKeyCredential.json | 40 +++---- ...TurnCredentialsWithKeyCredentialAsync.json | 40 +++---- ...ingTurnCredentialsWithTokenCredential.json | 38 +++---- ...rnCredentialsWithTokenCredentialAsync.json | 38 +++---- ...CreateCommunicationRelayWithAccessKey.json | 91 ++++++++++++++++ ...eCommunicationRelayWithAccessKeyAsync.json | 91 ++++++++++++++++ .../CreateCommunicationRelayWithToken.json | 89 +++++++++++++++ ...reateCommunicationRelayWithTokenAsync.json | 89 +++++++++++++++ .../GetRelayConfiguration.json | 87 ++++++++++++++- .../GetRelayConfigurationAsyncAsync.json | 89 ++++++++++++++- .../Sample1_CommunicationRelayClient.cs | 101 ++++++++++++------ 21 files changed, 769 insertions(+), 188 deletions(-) create mode 100644 sdk/communication/Azure.Communication.NetworkTraversal/tests.yml create mode 100644 sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKey.json create mode 100644 sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKeyAsync.json create mode 100644 sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithToken.json create mode 100644 sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithTokenAsync.json diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/CHANGELOG.md b/sdk/communication/Azure.Communication.NetworkTraversal/CHANGELOG.md index e9ab6ca171516..aab3f9a8b3821 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.NetworkTraversal/CHANGELOG.md @@ -1,13 +1,10 @@ # Release History -## 1.0.0-beta.1 (2021-02-22-preview1) +## 1.0.0-beta.1 (2021-05-25) -### Added -- Added CommunicationRelayClient in preview. -- Added CommunicationRelayClient.GetRelayConfiguration in preview. -- Added CommunicationRelayClient.GetRelayConfigurationAsync in preview. +This is the first release of Azure Communication Services for Network Traversal. For more information, please see the [README][read_me]. -### Breaking +This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -[read_me]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/communication/Azure.Communication.NetworkTraversal/README.md + diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/README.md b/sdk/communication/Azure.Communication.NetworkTraversal/README.md index 1813d44aab263..f3b7e11a46cc9 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/README.md +++ b/sdk/communication/Azure.Communication.NetworkTraversal/README.md @@ -32,7 +32,7 @@ var client = new CommunicationRelayClient(connectionString); Or alternatively using the endpoint and access key acquired from an Azure Communication Resources in the [Azure Portal][azure_portal]. -```C# Snippet:CreateCommunicationNetworkingFromAccessKey +```C# Snippet:CreateCommunicationRelayFromAccessKey var endpoint = new Uri("https://my-resource.communication.azure.com"); var accessKey = ""; var client = new CommunicationRelayClient(endpoint, new AzureKeyCredential(accessKey)); @@ -40,7 +40,7 @@ var client = new CommunicationRelayClient(endpoint, new AzureKeyCredential(acces Clients also have the option to authenticate using a valid Active Directory token. -```C# Snippet:CreateCommunicationNetworkingFromToken +```C# Snippet:CreateCommunicationRelayFromToken var endpoint = new Uri("https://my-resource.communication.azure.com"); TokenCredential tokenCredential = new DefaultAzureCredential(); var client = new CommunicationRelayClient(endpoint, tokenCredential); @@ -68,7 +68,7 @@ We guarantee that all client instance methods are thread-safe and independent of ## Generating TURN credentials for a user -```C# Snippet:CreateTURNTokenAsync +```C# Snippet:GetRelayConfigurationAsync Response turnTokenResponse = await client.GetRelayConfigurationAsync(user); DateTimeOffset turnTokenExpiresOn = turnTokenResponse.Value.ExpiresOn; IReadOnlyList turnServers = turnTokenResponse.Value.TurnServers; @@ -84,6 +84,14 @@ foreach (CommunicationTurnServer turnServer in turnServers) } ``` +## Troubleshooting + +> TODO + +## Next steps + +> TODO + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. @@ -94,8 +102,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [azure_sub]: https://azure.microsoft.com/free/ [azure_portal]: https://portal.azure.com -[source]: https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/communication/Azure.Communication.NetworkTraversal/src -[source_samples]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/communication/Azure.Communication.NetworkTraversal/samples + + [cla]: https://cla.microsoft.com [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ @@ -103,7 +111,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [product_docs]: https://docs.microsoft.com/azure/communication-services/overview [nuget]: https://www.nuget.org/ -[user_access_token]: https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-csharp [communication_resource_docs]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp [communication_resource_create_portal]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp [communication_resource_create_power_shell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/api/Azure.Communication.NetworkTraversal.netstandard2.0.cs b/sdk/communication/Azure.Communication.NetworkTraversal/api/Azure.Communication.NetworkTraversal.netstandard2.0.cs index bc54fc0667f66..939658c253823 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/api/Azure.Communication.NetworkTraversal.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.NetworkTraversal/api/Azure.Communication.NetworkTraversal.netstandard2.0.cs @@ -12,10 +12,10 @@ public CommunicationRelayClient(System.Uri endpoint, Azure.Core.TokenCredential } public partial class CommunicationRelayClientOptions : Azure.Core.ClientOptions { - public CommunicationRelayClientOptions(Azure.Communication.NetworkTraversal.CommunicationRelayClientOptions.ServiceVersion version = Azure.Communication.Networking.CommunicationRelayClientOptions.ServiceVersion.V2021_02_22_preview1) { } + public CommunicationRelayClientOptions(Azure.Communication.NetworkTraversal.CommunicationRelayClientOptions.ServiceVersion version = Azure.Communication.NetworkTraversal.CommunicationRelayClientOptions.ServiceVersion.V2021_02_22_preview1) { } public enum ServiceVersion { - V2021_02_22_preview1 = 0, + V2021_02_22_preview1 = 1, } } public partial class CommunicationRelayConfiguration diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/src/autorest.md b/sdk/communication/Azure.Communication.NetworkTraversal/src/autorest.md index 966eb33031494..63cb9482c0403 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/src/autorest.md +++ b/sdk/communication/Azure.Communication.NetworkTraversal/src/autorest.md @@ -12,7 +12,6 @@ require: payload-flattening-threshold: 3 ``` - ### Rename OperationId to for RestClient rename ```yaml diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests.yml b/sdk/communication/Azure.Communication.NetworkTraversal/tests.yml new file mode 100644 index 0000000000000..d278fe1f4ed59 --- /dev/null +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests.yml @@ -0,0 +1,21 @@ +trigger: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: communication + Project: Azure.Communication.NetworkTraversal + CloudConfig: + Public: + SubscriptionConfigurations: + - $(sub-config-azure-cloud-test-resources) + - $(sub-config-communication-services-cloud-test-resources-common) + - $(sub-config-communication-services-cloud-test-resources-net) + Int: + SubscriptionConfigurations: + - $(sub-config-communication-int-test-resources-common) + - $(sub-config-communication-int-test-resources-net) + Clouds: Public,Int + EnvVars: + # SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release + SKIP_PHONENUMBER_LIVE_TESTS: TRUE diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientLiveTestBase.cs b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientLiveTestBase.cs index 22f1eb2db1c73..a58ffc43b2105 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientLiveTestBase.cs +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientLiveTestBase.cs @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using Azure.Communication.Identity; using Azure.Communication.Pipeline; +using Azure.Core; using Azure.Core.TestFramework; using Azure.Identity; -using NUnit.Framework; namespace Azure.Communication.NetworkTraversal.Tests { @@ -14,16 +15,6 @@ public class CommunicationRelayClientLiveTestBase : RecordedTestBase Sanitizer = new CommunicationRelayClientRecordedTestSanitizer(); - [OneTimeSetUp] - public void Setup() - { - if (TestEnvironment.ShouldIgnoreTests) - { - Assert.Ignore("Networking tests are skipped " + - "because networking package is not included in the TEST_PACKAGES_ENABLED variable"); - } - } - /// /// Creates a with the connectionstring via environment /// variables and instruments it to make use of the Azure Core Test Framework functionalities. @@ -32,20 +23,20 @@ public void Setup() protected CommunicationRelayClient CreateClientWithConnectionString() => InstrumentClient( new CommunicationRelayClient( - TestEnvironment.ConnectionString, + TestEnvironment.LiveTestDynamicConnectionString, CreateNetworkingClientOptionsWithCorrelationVectorLogs())); protected CommunicationRelayClient CreateClientWithAzureKeyCredential() => InstrumentClient( new CommunicationRelayClient( - TestEnvironment.Endpoint, - new AzureKeyCredential(TestEnvironment.AccessKey), + TestEnvironment.LiveTestDynamicEndpoint, + new AzureKeyCredential(TestEnvironment.LiveTestDynamicAccessKey), CreateNetworkingClientOptionsWithCorrelationVectorLogs())); protected CommunicationRelayClient CreateClientWithTokenCredential() => InstrumentClient( new CommunicationRelayClient( - TestEnvironment.Endpoint, + TestEnvironment.LiveTestDynamicEndpoint, (Mode == RecordedTestMode.Playback) ? new MockCredential() : new DefaultAzureCredential(), CreateNetworkingClientOptionsWithCorrelationVectorLogs())); @@ -57,7 +48,7 @@ protected CommunicationRelayClient CreateClientWithTokenCredential() protected CommunicationIdentityClient CreateInstrumentedCommunicationIdentityClient() => InstrumentClient( new CommunicationIdentityClient( - TestEnvironment.ConnectionString, + TestEnvironment.LiveTestDynamicConnectionString, InstrumentClientOptions(new CommunicationIdentityClientOptions()))); private CommunicationRelayClientOptions CreateNetworkingClientOptionsWithCorrelationVectorLogs() diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientRecordedTestSanitizer.cs b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientRecordedTestSanitizer.cs index 9ad72ddde39e8..8dc80aa6acd5c 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientRecordedTestSanitizer.cs +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientRecordedTestSanitizer.cs @@ -6,6 +6,6 @@ namespace Azure.Communication.Pipeline public class CommunicationRelayClientRecordedTestSanitizer : CommunicationRecordedTestSanitizer { public CommunicationRelayClientRecordedTestSanitizer() - => AddJsonPathSanitizer("$..token"); + => AddJsonPathSanitizer("$..credential"); } } diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientTestEnvironment.cs b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientTestEnvironment.cs index 27466203f6255..fff6e18b1103b 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientTestEnvironment.cs +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/Infrastructure/CommunicationRelayClientTestEnvironment.cs @@ -7,8 +7,5 @@ namespace Azure.Communication.NetworkTraversal.Tests { public class CommunicationRelayClientTestEnvironment : CommunicationTestEnvironment { - // please find the allowed package value in tests.yml - private const string NetworkTraversalPackagesEnabled = "networktraversal"; - public override string ExpectedTestPackagesEnabled { get { return NetworkTraversalPackagesEnabled; } } } } diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionString.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionString.json index 51f9134c7343f..7cafd17ce2561 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionString.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionString.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "traceparent": "00-d508d3920c8a43418bd3c67cceb34e70-41f1eb8edc6fb046-00", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-be19995bd96b5445a50642cbf303a20f-abc638b751ce7a41-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "6871f17a0b73943f24d7bf1130628130", @@ -23,32 +23,32 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "MS-CV": "i6al0T\u002BSxk2p/O8nvseXyA.0", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "9SXFadkR9kimX4BHmhpurw.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03gCfYAAAAACJAd1OjCQeSqx\u002BPBx3ohkBV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aNuhYAAAAACVU98zg241T7neY65WSoIAV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "6871f17a0b73943f24d7bf1130628130", - "X-Processing-Time": "71ms" + "X-Processing-Time": "23ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-082a-47b4-a43a0d006da0" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b56e-6a0b-343a0d002f3f" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-082a-47b4-a43a0d006da0/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b56e-6a0b-343a0d002f3f/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "traceparent": "00-dbc6cc38269ab94a90342490b072e7a1-9cabb521ff382c40-00", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-999f97f37584c540ae1908c1987c14c7-c465a567c6d7fd49-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "770284ac2cd08e315f4ded0eb88f5dcd", @@ -60,24 +60,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "MS-CV": "Sf6Gj1GvpECw0Lv2\u002BH4tNA.0", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "RYhAlQlpV0\u002BR9HptbxQZ2Q.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03gCfYAAAAAD0Od6USTdcTYIziEkw3iCuV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aNuhYAAAAABVtEQ26kCuS5MiIUSpxiFyV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "770284ac2cd08e315f4ded0eb88f5dcd", - "X-Processing-Time": "160ms" + "X-Processing-Time": "60ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:42.5331101\u002B00:00", + "expiresOn": "2021-05-17T02:56:40.9067923\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANig1RVAB10qnuoFcuVOn4A1cQ3BnpyguwLS54FoAAAAMARDhtQreHmhCb7YC/dpf2n6xaCdyQrwVlJo\u002BdUQQ6s9ZfXrpYVg=", + "username": "BQAANpfYYkgB10xaXUCyFBhZ/MN\u002BKFhXh2FJD7IJbiUAAAAMARDhtQreHmhCb7YC/dpf2n6xm5UZ/lYEi2xFd5BBnosQx6j8sNU=", "credential": "Sanitized" } ] @@ -85,7 +85,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "660110768" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionStringAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionStringAsync.json index dee6f27300885..6f37abb3b31a6 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionStringAsync.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithConnectionStringAsync.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "traceparent": "00-ee03d6ce6df3cb4bb4a4e25d6c7970a4-6993d12f68ebdc4c-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-85ba39a34a4caf45b190cf3a4864645e-810619c5fbb8b841-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "05a7b0cec23b04e849833833fd4ea375", @@ -23,32 +23,32 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "jQ07upZD30iApX5xUeWxrA.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "wO3BoNYHb0CUQIW6B0zbfg.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAABVFV4NZQ1OTJoWprXQXN3aV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAAA0QAm/U4MhRaTkUFv4ip0RV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "05a7b0cec23b04e849833833fd4ea375", - "X-Processing-Time": "58ms" + "X-Processing-Time": "25ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-0fc7-47b4-a43a0d006da4" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b870-6a0b-343a0d002f42" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-0fc7-47b4-a43a0d006da4/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b870-6a0b-343a0d002f42/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "traceparent": "00-1858e2a38f2285409293c9edf5d3fa54-62b6e636cb34254d-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-ba16259ffc1cc341b6563e02f23e3432-120cb630e9a77847-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "d9736c859a78e237edaa417bcb69bcc7", @@ -60,24 +60,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "GybidwkVqkGrqcPXNHNVCQ.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "DNafOnZg20eovANlpuOxlQ.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAAAq/CX3ocCzTb5i/oaJxf44V1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAADHrVeE3hw1TpHRcGa3FM9QV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "d9736c859a78e237edaa417bcb69bcc7", - "X-Processing-Time": "180ms" + "X-Processing-Time": "60ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:44.4782884\u002B00:00", + "expiresOn": "2021-05-17T02:56:41.7285029\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANildRwUB10qnAopvurKQWzzZD0KIOQOI\u002BqkcruMAAAAMARDhtQreHmhCb7YC/dpf2n6x2d8sH61X4FOc3Z2pWZR74iAG2qA=", + "username": "BQAANphUX3gB10xaTSwwxMZ6QYeznrDMLMMHcELIDxYAAAAMARDhtQreHmhCb7YC/dpf2n6xariU4VF2xD5L63kdlDVdzTm1M7w=", "credential": "Sanitized" } ] @@ -85,7 +85,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "107621483" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredential.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredential.json index 527c77c1d56a1..7e34b394e55b0 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredential.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredential.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "traceparent": "00-4289ae00ecd3dd4ab10c8f9e3752b167-fd8696e51cc7cf4f-00", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-46b9aba8d14efe489c0f32f263a64f71-eda5a6ae5ad27340-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "6fe595f9798c2c2d7f3038dab4ee44fa", @@ -23,32 +23,32 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "MS-CV": "aT54hqeqzUqFh4khvRX8NA.0", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "FV0jy7xbs02kwE7mej7YdA.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03gCfYAAAAABxJKkFecKZRpEDeWEpcVp/V1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aNuhYAAAAACKp5U7KqyUR62vz2ol17nsV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "6fe595f9798c2c2d7f3038dab4ee44fa", - "X-Processing-Time": "59ms" + "X-Processing-Time": "26ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-09a1-47b4-a43a0d006da1" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b5f7-6a0b-343a0d002f40" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-09a1-47b4-a43a0d006da1/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b5f7-6a0b-343a0d002f40/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "traceparent": "00-b89491288c7a3e4daeceea6fc92bf383-868ae1ff7af58e44-00", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-f716632b6baa704db9f8cd330e8608bd-53493864f873e04c-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "97b36126b895b22427811ed1a0236708", @@ -60,24 +60,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "MS-CV": "LmJTQYRycUCYa3mLTUnLWA.0", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "RqXlmHiihEeiZqg2KMvHfQ.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03gCfYAAAAAAUK/qrc5YqQJ9bZ\u002BVKHlx4V1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aNuhYAAAAADJqKWIr4HbTq5WkJgG5z5cV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "97b36126b895b22427811ed1a0236708", - "X-Processing-Time": "171ms" + "X-Processing-Time": "59ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:42.9131316\u002B00:00", + "expiresOn": "2021-05-17T02:56:41.0490941\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANihtqekB10qncDEecy9rsBY3oRj\u002BIQLg9DsTSuUAAAAMARDhtQreHmhCb7YC/dpf2n6xHaI1qFZS8RnYjhiYNCNH7P\u002BtzJs=", + "username": "BQAANpfschAB10xaSPK\u002BZOI51W\u002BwvnXBoinTNIPAfJoAAAAMARDhtQreHmhCb7YC/dpf2n6xM8y9WnRETfb8pbR82QN/6CRfKE4=", "credential": "Sanitized" } ] @@ -85,7 +85,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "1266706672" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredentialAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredentialAsync.json index 0ee2032f01025..53323369c289f 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredentialAsync.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithKeyCredentialAsync.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "traceparent": "00-e46e321e41552943922508ce0aa4554e-5f136e696e33cc42-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-96624688a9cd784c9fa739b00beb0ec8-537c26c8c86fbe4c-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "904233410bb9e287278628d15e995d09", @@ -23,32 +23,32 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "j8ngQQjP9ECvXKM4ltu/ow.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "KTPnVAyZSUm7YbFHCx6P0Q.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAAAVwzd02weIS5G1k0sSAlnHV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAAAdsNxsbPKGTYMEB5pqYF4xV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "904233410bb9e287278628d15e995d09", - "X-Processing-Time": "58ms" + "X-Processing-Time": "24ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-1123-47b4-a43a0d006da7" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b942-6a0b-343a0d002f43" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-1123-47b4-a43a0d006da7/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b942-6a0b-343a0d002f43/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "traceparent": "00-9eed74d8653af6439ee65e12638f8bee-fc8d5958ac147548-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-85e042127d96bb49b09ed3b314700b06-62fc564f80213f4a-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "117faa9682ab681e5fc160daf529d60c", @@ -60,24 +60,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "hkkZlqfkSk6FChLdlXE90w.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "irufzaWEA0qvSu4k0B/7eA.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAAAGvRKe7/40QJXl/k8m/vmZV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAACKuxfIvNfMRLY\u002B70/r82\u002BbV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "117faa9682ab681e5fc160daf529d60c", - "X-Processing-Time": "183ms" + "X-Processing-Time": "59ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:44.8261839\u002B00:00", + "expiresOn": "2021-05-17T02:56:41.902097\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANimQ6z0B10qnhAxMoT3pn5NdoHaiL/kuSXbgavcAAAAMARDhtQreHmhCb7YC/dpf2n6xqiocCLYvJtJ1VXEp7yjvgVuNETQ=", + "username": "BQAANphvVAAB10xaz7KYbGCf\u002BF3NRA7YaNRd9/fqzAUAAAAMARDhtQreHmhCb7YC/dpf2n6xsCHrQ1bi5jYBSyhV7937fAUfB3Q=", "credential": "Sanitized" } ] @@ -85,7 +85,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "983455153" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredential.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredential.json index d0a520ee962a7..aa674e2dbfa7b 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredential.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredential.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "traceparent": "00-f685ff25bfa4f94683d1044984e275b1-6d7fbb5c80c2bc48-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-cb2de7fa55f2314fa0356130a25a6de3-ab1283a5c30ae344-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "c8da0877372dda7b1d54c338aa032636", @@ -23,31 +23,31 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:42 GMT", - "MS-CV": "MUAqcjh5mkCqKnff9swL7w.0", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "EPcRCtaCqk2J7bLHkPML4w.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03wCfYAAAAADBx2TbaF7OTq5eGPktvd3MV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAACaCU2JWlNlSZM3gPMJD/fCV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "c8da0877372dda7b1d54c338aa032636", - "X-Processing-Time": "61ms" + "X-Processing-Time": "24ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-0b5a-47b4-a43a0d006da3" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b6c6-6a0b-343a0d002f41" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-0b5a-47b4-a43a0d006da3/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b6c6-6a0b-343a0d002f41/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-bb0dd4e04999224a9155e98d2a04d479-3d6cf75b441c284b-00", + "traceparent": "00-0abad6005cbba24285967e98a2859d5c-10441a05b0d58d4d-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "2887dea8f70a6f0830ec722b533da1e2", @@ -58,24 +58,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:43 GMT", - "MS-CV": "EaGTQ1B8mUG77B6jUtjSqA.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "f6jgmlQV6k2roMmF1MgpmA.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "03wCfYAAAAADctUkrZOthQY7nN6YQRyR1V1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAACAOcQ/V97ySJLs1Kz44Es7V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "2887dea8f70a6f0830ec722b533da1e2", - "X-Processing-Time": "182ms" + "X-Processing-Time": "75ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:44.116941\u002B00:00", + "expiresOn": "2021-05-17T02:56:41.3394974\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANiklQBAB10qnTNYgSAEGqnisOToG297tC0i/vNoAAAAMARDhtQreHmhCb7YC/dpf2n6xCDhCpY7Mx3jS5zAeIFExxz6SmjU=", + "username": "BQAANpgY5goB10xafX6nFhwgfoh3GyYmsw1daPUO06EAAAAMARDhtQreHmhCb7YC/dpf2n6xezrQYL/lIFR6ilZlPD9cCkWz9\u002Bc=", "credential": "Sanitized" } ] @@ -83,7 +83,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "1842871913" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredentialAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredentialAsync.json index dc4a85b93866f..5f72b78f2ea2d 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredentialAsync.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/CommunicationRelayClientLiveTests/GettingTurnCredentialsWithTokenCredentialAsync.json @@ -8,10 +8,10 @@ "Authorization": "Sanitized", "Content-Length": "2", "Content-Type": "application/json", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "traceparent": "00-9c9d852307064e4fa13649f81e683418-d3e8c5a458ec7344-00", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "traceparent": "00-923f873fea27b4468651ff303e69c418-7d11147f23446b4f-00", "User-Agent": [ - "azsdk-net-Communication.Identity/1.1.0-alpha.20210514.1", + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "4d3587be19c7ff4831850f0d2948f0c5", @@ -23,31 +23,31 @@ "ResponseHeaders": { "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "3Vyg3yaaoEWdPZunJWw4HQ.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "FXdD1F67T06Yzg7iQOgrYQ.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAACq/NvEKfaOT6adUbTBSQEBV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAABmIMyBbAm1Sbf5tISnDAc5V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "4d3587be19c7ff4831850f0d2948f0c5", - "X-Processing-Time": "68ms" + "X-Processing-Time": "22ms" }, "ResponseBody": { "identity": { - "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-127f-47b4-a43a0d006da9" + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b9de-6a0b-343a0d002f44" } } }, { - "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-0cfd-127f-47b4-a43a0d006da9/:issueCredentials?api-version=2021-02-22-preview1", + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b9de-6a0b-343a0d002f44/:issueCredentials?api-version=2021-02-22-preview1", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-f9fd6455c3b850448a7f439545f3e8a8-f394ff97563ff344-00", + "traceparent": "00-4a9316cdbef1d84caec3a612a8795625-201592a613267440-00", "User-Agent": [ - "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210514.1", + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", "(.NET 5.0.6; Microsoft Windows 10.0.19042)" ], "x-ms-client-request-id": "a08a5477d84c4a87ffb15003af5743d3", @@ -58,24 +58,24 @@ "ResponseHeaders": { "api-supported-versions": "2021-02-22-preview1", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 14 May 2021 22:59:44 GMT", - "MS-CV": "DiIBIY9uwUW2tx5KLKrhJw.0", + "Date": "Mon, 17 May 2021 02:56:41 GMT", + "MS-CV": "jrCRnwU4bkWIvo9XeuJhgw.0", "Request-Context": "appId=", "Strict-Transport-Security": "max-age=2592000", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "04ACfYAAAAADO52mnQpz/T6mr5olClymnV1NURURHRTA4MTAAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Azure-Ref": "0aduhYAAAAACCwJ/uSV0sTImZlNC6oiubV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", "X-Cache": "CONFIG_NOCACHE", "x-ms-client-request-id": "a08a5477d84c4a87ffb15003af5743d3", - "X-Processing-Time": "157ms" + "X-Processing-Time": "57ms" }, "ResponseBody": { - "expiresOn": "2021-05-14T22:59:45.1652963\u002B00:00", + "expiresOn": "2021-05-17T02:56:42.0398464\u002B00:00", "turnServers": [ { "urls": [ "turn:worldaz.turn.skype.com:3478" ], - "username": "BQAANinGLn4B10qn1BQq6Mbt8S9abKp\u002Bmx9xA\u002B7QLlcAAAAMARDhtQreHmhCb7YC/dpf2n6xZmwPiXSw1h08DnZrdHvdul5W6i4=", + "username": "BQAANpiE760B10xa2998GWIB1LnjC38YFwD6WO/GZ4AAAAAMARDhtQreHmhCb7YC/dpf2n6xxwi47zF0pM/kllYjgxsq11dsicQ=", "credential": "Sanitized" } ] @@ -83,7 +83,7 @@ } ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", "RandomSeed": "1627404540" } -} +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKey.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKey.json new file mode 100644 index 0000000000000..f71295396efe7 --- /dev/null +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKey.json @@ -0,0 +1,91 @@ +{ + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:38 GMT", + "traceparent": "00-d2e690063c9d63499ad381e6d95670a3-f9eeb6ca80059b4b-00", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "b78684e2362ac2be1a8817a78913a33e", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:38 GMT", + "MS-CV": "s0Z\u002Bj4n0fk6k6apA/i\u002BD0w.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0ZtuhYAAAAADT2doCqf1WR5gcUiBOeGPjV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "b78684e2362ac2be1a8817a78913a33e", + "X-Processing-Time": "25ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-aed3-6a0b-343a0d002f39" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-aed3-6a0b-343a0d002f39/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "traceparent": "00-78ecd07b42050d4e943daa11485465c6-5b10c9f2f231124f-00", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "99a33fed6ce8b6895e9a5133a3941a79", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "MS-CV": "p1H3PhL57UW5e2oivPH1tQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Z9uhYAAAAABJE1e6789sTrmQPRRwob\u002BsV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "99a33fed6ce8b6895e9a5133a3941a79", + "X-Processing-Time": "189ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:39.3888301\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANpbu3XEB10xaTKJjJjmtzmqo8MJQp7er0aN9FksAAAAMARDhtQreHmhCb7YC/dpf2n6xmTpp31RzeD9dsLYodatITez3HKs=", + "credential": "Sanitized" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1569425966" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKeyAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKeyAsync.json new file mode 100644 index 0000000000000..a3acb1116da7d --- /dev/null +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithAccessKeyAsync.json @@ -0,0 +1,91 @@ +{ + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-241ab33827f6e445a67059eb669f960d-349678cde2f0574c-00", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "ab067b8b6963501987e5ce17c406c333", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "54WlwIEwvESyu5hq6\u002B/pvQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAACgguLDQjAUS7UFEuJm3PTPV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "ab067b8b6963501987e5ce17c406c333", + "X-Processing-Time": "21ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b3b0-6a0b-343a0d002f3c" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b3b0-6a0b-343a0d002f3c/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-2f7e4fb0994b1245a89b48f43b600145-82b97727183aed43-00", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "1b92af685c065fb919f7ce2406482bd0", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "9PtE04O/7kmvGe4s/rx4Cw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAAANvvZ8LhGvQqwEdkz7y8EIV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "1b92af685c065fb919f7ce2406482bd0", + "X-Processing-Time": "58ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:40.4741019\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANpeVoCAB10xaeOnTmkzOFMhmpPOz5NSFSOCFUZYAAAAMARDhtQreHmhCb7YC/dpf2n6xREV/3Ux1ncHLxSgSQFbqmagFjXI=", + "credential": "Sanitized" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1534307527" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithToken.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithToken.json new file mode 100644 index 0000000000000..e125b69118d55 --- /dev/null +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithToken.json @@ -0,0 +1,89 @@ +{ + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "traceparent": "00-6e29bc8a61765843be7f9c9c7b623071-8d5a377c6e15da42-00", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "d8435f118da56949d5b2753f2493bb7e", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "MS-CV": "K\u002BP6PYmqpk2IFa1TF\u002BVhFg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Z9uhYAAAAADKx5KtprI\u002BSLyQuZbT57mPV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "d8435f118da56949d5b2753f2493bb7e", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b051-6a0b-343a0d002f3a" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b051-6a0b-343a0d002f3a/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1f471f937430c54aba761bc3bf3ae537-f65ef3c9537dde46-00", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "2fa9dcf9714dc303d0ab6577e0d41768", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "MS-CV": "MaQIfRPBdEGpIOX3VL9zuA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Z9uhYAAAAABoxkPPFDl2SIKYPD2scay3V1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "2fa9dcf9714dc303d0ab6577e0d41768", + "X-Processing-Time": "191ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:40.0459698\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANpdS4OcB10xaYGDHJ434ioTosQiwsHtDscyKiIcAAAAMARDhtQreHmhCb7YC/dpf2n6x/sEXDFurgkKeD3Z1Sm76cXGI3sY=", + "credential": "Sanitized" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1817727159" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithTokenAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithTokenAsync.json new file mode 100644 index 0000000000000..8ecfe28e2f3c3 --- /dev/null +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/CreateCommunicationRelayWithTokenAsync.json @@ -0,0 +1,89 @@ +{ + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-060a62a56f64d1408d765be4bbb03aa4-211eeab92326cc47-00", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "7cc1dc4bf8386556ffa9dd0ca2ffcc59", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "Wxj8sI9Y/0y4sEjp2\u002BUrQw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAACu1fwOwINQR4ILVG0xmU4RV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "7cc1dc4bf8386556ffa9dd0ca2ffcc59", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b448-6a0b-343a0d002f3d" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b448-6a0b-343a0d002f3d/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-9736537e5c37d1439ceab8609ab8e7e1-c24c9d3de569234d-00", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "b6cf86fc97d2dff0b1cf9c1e77079677", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "gqlQ60nd5ECZ1ay2fZGoBQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAAAqDibLsaJRTa2F4Z1\u002BwW8rV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "b6cf86fc97d2dff0b1cf9c1e77079677", + "X-Processing-Time": "56ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:40.618736\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANper1G8B10xaUH/W8vx6kNf9G3G93TxiwQcuylEAAAAMARDhtQreHmhCb7YC/dpf2n6xGmyPv\u002BaYviuCeZzPKxd01KJ4kms=", + "credential": "Sanitized" + } + ] + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "1803713406" + } +} \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfiguration.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfiguration.json index 98f9085433930..d4ebec5c685d4 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfiguration.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfiguration.json @@ -1,6 +1,89 @@ { - "Entries": [], + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "4d8ad7d38d592335c6edbb7c8e8cd256", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:39 GMT", + "MS-CV": "w2eQsesGakmPM5er3ZoIqA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAABBT4vFf\u002B2STJRP\u002B6G\u002B32yqV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "4d8ad7d38d592335c6edbb7c8e8cd256", + "X-Processing-Time": "24ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b298-6a0b-343a0d002f3b" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b298-6a0b-343a0d002f3b/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "1a58467b0d70dffbe6f5530c1e0be037", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "hbqnEjC3A0aPGZFY6va6PQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAACpS\u002B8ExKpWRKL7DE7p5SmyV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "1a58467b0d70dffbe6f5530c1e0be037", + "X-Processing-Time": "157ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:40.2819593\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANpd2wssB10xaRIDs1\u002BVQjCGw0bUfzvcpI85ZGywAAAAMARDhtQreHmhCb7YC/dpf2n6x4eJ/ilGEBnoLIKPU0AMIj3OBp5k=", + "credential": "Sanitized" + } + ] + } + } + ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==" + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "108439514" } } \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfigurationAsyncAsync.json b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfigurationAsyncAsync.json index 98f9085433930..6d1b538f04487 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfigurationAsyncAsync.json +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/SessionRecords/Sample1_CommunicationRelayClient/GetRelayConfigurationAsyncAsync.json @@ -1,6 +1,91 @@ { - "Entries": [], + "Entries": [ + { + "RequestUri": "https://anpearesource1.communication.azure.com/identities?api-version=2021-03-07", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "2", + "Content-Type": "application/json", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-85577a887d9cba45b3bafb221de4c354-f777fec2db6f314b-00", + "User-Agent": [ + "azsdk-net-Communication.Identity/1.1.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "92a60f1659354ebcb116648477fdf744", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": {}, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "UwGWQl/sUUCIk2yAkBdczA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAACnQH7DyJ4oRbhjeOfu/fdBV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "92a60f1659354ebcb116648477fdf744", + "X-Processing-Time": "23ms" + }, + "ResponseBody": { + "identity": { + "id": "8:acs:e1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b4de-6a0b-343a0d002f3e" + } + } + }, + { + "RequestUri": "https://anpearesource1.communication.azure.com/turn/8%3Aacs%3Ae1b50ade-1e68-426f-b602-fdda5fda7eb1_0000000a-1822-b4de-6a0b-343a0d002f3e/:issueCredentials?api-version=2021-02-22-preview1", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "traceparent": "00-0b4e7b379d5c7143ab1e0f589f2e8051-9f1acc4897ceec42-00", + "User-Agent": [ + "azsdk-net-Communication.NetworkTraversal/1.0.0-alpha.20210516.1", + "(.NET 5.0.6; Microsoft Windows 10.0.19042)" + ], + "x-ms-client-request-id": "54c213e38d2579236c2395f9868f456e", + "x-ms-content-sha256": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-02-22-preview1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 17 May 2021 02:56:40 GMT", + "MS-CV": "oLrmCGdCu0uRvDYU\u002BgcnEw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0aNuhYAAAAACZZZz0ct8vT4CvQh3PfBkVV1NURURHRTA4MDcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "54c213e38d2579236c2395f9868f456e", + "X-Processing-Time": "56ms" + }, + "ResponseBody": { + "expiresOn": "2021-05-17T02:56:40.7628541\u002B00:00", + "turnServers": [ + { + "urls": [ + "turn:worldaz.turn.skype.com:3478" + ], + "username": "BQAANpfArD0B10xaqd5XkUV6GOt9dO3uHbHGjiqi6t4AAAAMARDhtQreHmhCb7YC/dpf2n6xJtg8NDHHQIEGOmFP8BhVLej\u002Byz8=", + "credential": "Sanitized" + } + ] + } + } + ], "Variables": { - "COMMUNICATION_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==" + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://anpearesource1.communication.azure.com/;accesskey=Kg==", + "RandomSeed": "922226276" } } \ No newline at end of file diff --git a/sdk/communication/Azure.Communication.NetworkTraversal/tests/samples/Sample1_CommunicationRelayClient.cs b/sdk/communication/Azure.Communication.NetworkTraversal/tests/samples/Sample1_CommunicationRelayClient.cs index 63c276a36337b..07b0fdbc33e32 100644 --- a/sdk/communication/Azure.Communication.NetworkTraversal/tests/samples/Sample1_CommunicationRelayClient.cs +++ b/sdk/communication/Azure.Communication.NetworkTraversal/tests/samples/Sample1_CommunicationRelayClient.cs @@ -6,7 +6,9 @@ using System.Threading.Tasks; using Azure.Communication.Identity; using Azure.Communication.NetworkTraversal.Tests; +using Azure.Core; using Azure.Core.TestFramework; +using Azure.Identity; using NUnit.Framework; #pragma warning disable IDE0059 // Unnecessary assignment of a value @@ -26,26 +28,20 @@ public Sample1_CommunicationRelayClient(bool isAsync) : base(isAsync) [AsyncOnly] public async Task GetRelayConfigurationAsync() { - var connectionString = TestEnvironment.ConnectionString; - #region Snippet:CreateCommunicationIdentityClient - // Get a connection string to our Azure Communication resource. - //@@var connectionString = ""; - var communicationIdentityClient = new CommunicationIdentityClient(connectionString); - #endregion Snippet:CreateCommunicationIdentityClient + var connectionString = TestEnvironment.LiveTestDynamicConnectionString; + + var communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); + Response response = await communicationIdentityClient.CreateUserAsync(); + var user = response.Value; #region Snippet:CreateCommunicationRelayClientAsync // Get a connection string to our Azure Communication resource. //@@var connectionString = ""; var client = new CommunicationRelayClient(connectionString); #endregion Snippet:CreateCommunicationRelayClientAsync + client = CreateClientWithConnectionString(); - #region Snippet:CreateCommunicationUserAsync - Response userResponse = await communicationIdentityClient.CreateUserAsync(); - CommunicationUserIdentifier user = userResponse.Value; - Console.WriteLine($"User id: {user.Id}"); - #endregion Snippet:CreateCommunicationUserAsync - - #region Snippet:CreateTURNTokenAsync + #region Snippet:GetRelayConfigurationAsync Response turnTokenResponse = await client.GetRelayConfigurationAsync(user); DateTimeOffset turnTokenExpiresOn = turnTokenResponse.Value.ExpiresOn; IReadOnlyList turnServers = turnTokenResponse.Value.TurnServers; @@ -59,33 +55,27 @@ public async Task GetRelayConfigurationAsync() Console.WriteLine($"TURN Username: {turnServer.Username}"); Console.WriteLine($"TURN Credential: {turnServer.Credential}"); } - #endregion Snippet:CreateTURNTokenAsync 1~ + #endregion Snippet:GetRelayConfigurationAsync } [Test] [SyncOnly] public void GetRelayConfiguration() { - var connectionString = TestEnvironment.ConnectionString; - #region Snippet:CreateCommunicationIdentityClient - // Get a connection string to our Azure Communication resource. - //@@var connectionString = ""; - var communicationIdentityClient = new CommunicationIdentityClient(connectionString); - #endregion Snippet:CreateCommunicationIdentityClient + var connectionString = TestEnvironment.LiveTestDynamicConnectionString; - #region Snippet:CreateCommunicationRelayClientAsync + var communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); + Response response = communicationIdentityClient.CreateUser(); + var user = response.Value; + + #region Snippet:CreateCommunicationRelayClient // Get a connection string to our Azure Communication resource. //@@var connectionString = ""; var client = new CommunicationRelayClient(connectionString); - #endregion Snippet:CreateCommunicationRelayClientAsync - - #region Snippet:CreateCommunicationUser - Response userResponse = communicationIdentityClient.CreateUser(); - CommunicationUserIdentifier user = userResponse.Value; - Console.WriteLine($"User id: {user.Id}"); - #endregion Snippet:CreateCommunicationUser + #endregion Snippet:CreateCommunicationRelayClient + client = CreateClientWithConnectionString(); - #region Snippet:CreateTURNToken + #region Snippet:GetRelayConfiguration Response turnTokenResponse = client.GetRelayConfiguration(user); DateTimeOffset turnTokenExpiresOn = turnTokenResponse.Value.ExpiresOn; IReadOnlyList turnServers = turnTokenResponse.Value.TurnServers; @@ -99,7 +89,58 @@ public void GetRelayConfiguration() Console.WriteLine($"TURN Username: {turnServer.Username}"); Console.WriteLine($"TURN Credential: {turnServer.Credential}"); } - #endregion Snippet:CreateTURNToken + #endregion Snippet:GetRelayConfiguration + } + + [Test] + public async Task CreateCommunicationRelayWithToken() + { + #region Snippet:CreateCommunicationRelayFromToken + var endpoint = new Uri("https://my-resource.communication.azure.com"); + /*@@*/ endpoint = TestEnvironment.LiveTestDynamicEndpoint; + TokenCredential tokenCredential = new DefaultAzureCredential(); + var client = new CommunicationRelayClient(endpoint, tokenCredential); + #endregion Snippet:CreateCommunicationRelayFromToken + + var communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); + Response response = await communicationIdentityClient.CreateUserAsync(); + var user = response.Value; + + client = CreateClientWithTokenCredential(); + try + { + Response relayConfigurationResponse = await client.GetRelayConfigurationAsync(user); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } + } + + [Test] + public async Task CreateCommunicationRelayWithAccessKey() + { + #region Snippet:CreateCommunicationRelayFromAccessKey + var endpoint = new Uri("https://my-resource.communication.azure.com"); + var accessKey = ""; + /*@@*/ endpoint = TestEnvironment.LiveTestDynamicEndpoint; + /*@@*/ accessKey = TestEnvironment.LiveTestDynamicAccessKey; + var client = new CommunicationRelayClient(endpoint, new AzureKeyCredential(accessKey)); + #endregion Snippet:CreateCommunicationRelayFromAccessKey + + var communicationIdentityClient = CreateInstrumentedCommunicationIdentityClient(); + Response response = await communicationIdentityClient.CreateUserAsync(); + var user = response.Value; + + client = CreateClientWithAzureKeyCredential(); + try + { + Response relayConfigurationResponse = await client.GetRelayConfigurationAsync(user); + } + catch (Exception ex) + { + Assert.Fail($"Unexpected error: {ex}"); + } } } }