From b437088866b7e32290a8cdb77b88a9af083d9a0e Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 10 May 2022 09:42:40 -0500 Subject: [PATCH 1/5] support client certificate auth --- eng/common/TestResources/README.md | 43 -- .../X509Certificate2.psm1 | 0 ...urity.ConfidentialLedger.netstandard2.0.cs | 27 +- .../Azure.Security.ConfidentialLedger.csproj | 3 +- .../src/ConfidentialLedgerClient.cs | 137 +++-- .../src/Generated/ConfidentialLedgerClient.cs | 346 +++++++----- .../ConfidentialLedgerClientOptions.cs | 8 +- ...ConfidentialLedgerIdentityServiceClient.cs | 6 +- .../src/autorest.md | 6 +- .../ConfidentialLedgerClientLiveTests.cs | 60 +- .../tests/ConfidentialLedgerClientTests.cs | 4 +- .../tests/ConfidentialLedgerEnvironment.cs | 2 + .../CreateAndGetAndDeleteUser.json | 204 ------- .../CreateAndGetAndDeleteUserAsync.json | 204 ------- .../GetConsortiumMembers.json | 68 --- .../GetConsortiumMembersAsync.json | 68 --- .../GetConstitution.json | 64 --- .../GetConstitutionAsync.json | 64 --- .../GetCurrentLedgerEntry.json | 151 ----- .../GetCurrentLedgerEntryAsync.json | 151 ----- .../GetEnclaveQuotes.json | 83 --- .../GetEnclaveQuotesAsync.json | 83 --- .../GetLedgerEntries.json | 381 ------------- .../GetLedgerEntriesAsync.json | 419 -------------- .../GetLedgerEntry.json | 419 -------------- .../GetLedgerEntryAsync.json | 489 ----------------- .../GetLedgerIdentity.json | 183 ------- .../GetLedgerIdentityAsync.json | 183 ------- .../GetReceipt.json | 442 --------------- .../GetReceiptAsync.json | 517 ------------------ .../GetTransactionStatus.json | 443 --------------- .../GetTransactionStatusAsync.json | 508 ----------------- .../PostLedgerEntry.json | 207 ------- .../PostLedgerEntryAsync.json | 207 ------- sdk/confidentialledger/test-resources-pre.ps1 | 5 + sdk/confidentialledger/test-resources.json | 32 +- .../src/RecordedTestBase.cs | 7 +- .../src/TestServer.cs | 6 +- sdk/core/Azure.Core/api/Azure.Core.net461.cs | 1 + sdk/core/Azure.Core/api/Azure.Core.net5.0.cs | 1 + .../api/Azure.Core.netcoreapp2.1.cs | 1 + .../api/Azure.Core.netstandard2.0.cs | 1 + sdk/core/Azure.Core/src/ClientOptions.cs | 15 +- .../Azure.Core/src/DefaultClientOptions.cs | 1 - .../src/Pipeline/HttpClientTransport.cs | 27 +- .../Pipeline/HttpPipelineTransportOptions.cs | 16 + .../src/Pipeline/HttpWebRequestTransport.cs | 5 + sdk/core/Azure.Core/tests/PipelineTestBase.cs | 79 +++ .../tests/TransportFunctionalTests.cs | 40 ++ .../tests/Tests/CustomAnalyzerTests.cs | 2 +- 50 files changed, 552 insertions(+), 5867 deletions(-) rename eng/scripts/{ => X509Certificate2}/X509Certificate2.psm1 (100%) delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUser.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUserAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembers.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembersAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitution.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitutionAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntry.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntryAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotes.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotesAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntries.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntriesAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntry.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntryAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentity.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentityAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceipt.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceiptAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatus.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatusAsync.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntry.json delete mode 100644 sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntryAsync.json create mode 100644 sdk/confidentialledger/test-resources-pre.ps1 diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index 757c7c337ac5..0fbb4ea50374 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -77,49 +77,6 @@ setx KEYVAULT_SKU ${env:KEYVAULT_SKU} setx AZURE_KEYVAULT_URL ${env:AZURE_KEYVAULT_URL} ``` -### Pre- and Post- Scripts - -Sometimes creating test resources requires either some work to be done prior to or after the main test-resources.json script is executed. -For these scenarios a `test-resources-pre.ps1` or `test-resources-post.ps1`, respectively, can be created in the same folder as the `test-resources.json` file. - -For example, it may be necessary to create artifacts prior to provisioning the actual resource, such as a certificate. -Typically the created artifact will need to be passed to `test-resources.json` to be used in the ARM template or as output (or both). - -Below is an example of how `$templateFileParameters` can be used to pass data from the `pre-` script to `test-resources.json`. - -**Snippet from `test-resources-pre.ps1`** -```powershell -$cert = New-X509Certificate2 -SubjectName 'E=opensource@microsoft.com, CN=Azure SDK, OU=Azure SDK, O=Microsoft, L=Frisco, S=TX, C=US' -ValidDays 3652 -# Create new entries in $templateFileParameters -$templateFileParameters['ConfidentialLedgerPrincipalPEM'] = Format-X509Certificate2 -Certificate $cert -$templateFileParameters['ConfidentialLedgerPrincipalPEMPK'] = Format-X509Certificate2 -Type Pkcs8 -Certificate $cert -``` - -**Snippet from the corresponding `test-resources.json`.** - -Note that the values present in `$templateFileParameters` will map to parameters of the same name. -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "_comment": "Other required parameters would go here... (this is not part of the actual test-resources.json)", - "ConfidentialLedgerPrincipalPEM": { - "type": "string", - "metadata": { - "description": "The certificate to configure as a certBasedSecurityPrincipal." - } - }, - "ConfidentialLedgerPrincipalPEMPK": { - "type": "string", - "metadata": { - "description": "The certificate to configure as a certBasedSecurityPrincipal." - } - } - }, -} -``` - ### Cleaning up Resources By default, resource groups are tagged with a `DeleteAfter` value and date according to the default or specified diff --git a/eng/scripts/X509Certificate2.psm1 b/eng/scripts/X509Certificate2/X509Certificate2.psm1 similarity index 100% rename from eng/scripts/X509Certificate2.psm1 rename to eng/scripts/X509Certificate2/X509Certificate2.psm1 diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs index 236e817b99e4..2b7f0e2a129d 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs @@ -5,41 +5,44 @@ public partial class ConfidentialLedgerClient protected ConfidentialLedgerClient() { } public ConfidentialLedgerClient(System.Uri ledgerUri, Azure.Core.TokenCredential credential) { } public ConfidentialLedgerClient(System.Uri ledgerUri, Azure.Core.TokenCredential credential, Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions options) { } + public ConfidentialLedgerClient(System.Uri ledgerUri, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions options = null) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response CreateOrUpdateUser(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateOrUpdateUserAsync(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteUser(string userId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteUserAsync(string userId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetCollections(Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task GetCollectionsAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetConsortiumMembers(Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetConsortiumMembersAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetConstitution(Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetConstitutionAsync(Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetCurrentLedgerEntry(string subLedgerId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetCurrentLedgerEntryAsync(string subLedgerId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetCurrentLedgerEntry(string collectionId = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task GetCurrentLedgerEntryAsync(string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetEnclaveQuotes(Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetEnclaveQuotesAsync(Azure.RequestContext context = null) { throw null; } - public virtual Azure.Pageable GetLedgerEntries(string subLedgerId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.AsyncPageable GetLedgerEntriesAsync(string subLedgerId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetLedgerEntry(string transactionId, string subLedgerId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetLedgerEntryAsync(string transactionId, string subLedgerId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Pageable GetLedgerEntries(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.AsyncPageable GetLedgerEntriesAsync(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetLedgerEntry(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task GetLedgerEntryAsync(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetReceipt(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetReceiptAsync(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetTransactionStatus(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetTransactionStatusAsync(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetUser(string userId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response PostLedgerEntry(Azure.Core.RequestContent content, string subLedgerId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Security.ConfidentialLedger.PostLedgerEntryOperation PostLedgerEntry(Azure.Core.RequestContent content, string subLedgerId = null, bool waitForCompletion = true, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task PostLedgerEntryAsync(Azure.Core.RequestContent content, string subLedgerId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task PostLedgerEntryAsync(Azure.Core.RequestContent content, string subLedgerId = null, bool waitForCompletion = true, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response PostLedgerEntry(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Security.ConfidentialLedger.PostLedgerEntryOperation PostLedgerEntry(Azure.Core.RequestContent content, string collectionId = null, bool waitForCompletion = true, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task PostLedgerEntryAsync(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task PostLedgerEntryAsync(Azure.Core.RequestContent content, string collectionId = null, bool waitForCompletion = true, Azure.RequestContext context = null) { throw null; } } public partial class ConfidentialLedgerClientOptions : Azure.Core.ClientOptions { - public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V0_1_preview) { } + public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V2022_05_13) { } public System.TimeSpan OperationPollingInterval { get { throw null; } set { } } public enum ServiceVersion { - V0_1_preview = 1, + V2022_05_13 = 1, } } public static partial class ConfidentialLedgerConstants diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj index bf90909526c7..aa8b14358e39 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj @@ -14,7 +14,8 @@ - + + diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs index 15f305c6781f..907cee77e47d 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs @@ -6,7 +6,6 @@ using System.Security.Cryptography.X509Certificates; using System.Text.Json; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -19,75 +18,76 @@ public partial class ConfidentialLedgerClient /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. public ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential, ConfidentialLedgerClientOptions options) + : this(ledgerUri, credential: credential, options: options, identityServiceClient: default) + { } + + /// Initializes a new instance of ConfidentialLedgerClient. + /// The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. + /// A used to authenticate to an Azure Service. + /// The options for configuring the client. + public ConfidentialLedgerClient(Uri ledgerUri, X509Certificate2 clientCertificate, ConfidentialLedgerClientOptions options = null) + : this(ledgerUri, clientCertificate: clientCertificate, options: options, identityServiceClient: null) + { } + + internal ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential = null, X509Certificate2 clientCertificate = null, ConfidentialLedgerClientOptions options = null, ConfidentialLedgerIdentityServiceClient identityServiceClient = null) { if (ledgerUri == null) { throw new ArgumentNullException(nameof(ledgerUri)); } - if (credential == null) + if (clientCertificate == null && credential == null) { - throw new ArgumentNullException(nameof(credential)); + if (clientCertificate == null) + throw new ArgumentNullException(nameof(clientCertificate)); + if (credential == null) + throw new ArgumentNullException(nameof(credential)); } - var actualOptions = options ?? new ConfidentialLedgerClientOptions(); - var transportOptions = GetIdentityServerTlsCertAndTrust(ledgerUri, actualOptions); - ClientDiagnostics = new ClientDiagnostics(actualOptions, true); + var transportOptions = GetIdentityServerTlsCertAndTrust(ledgerUri, actualOptions, identityServiceClient); + if (clientCertificate != null) + { + transportOptions.ClientCertificates.Add(clientCertificate); + } + ClientDiagnostics = new ClientDiagnostics(actualOptions); _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); _pipeline = HttpPipelineBuilder.Build( actualOptions, Array.Empty(), - new HttpPipelinePolicy[] { authPolicy }, + _tokenCredential == null ? + Array.Empty() : + new HttpPipelinePolicy[] {new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes)}, transportOptions, new ResponseClassifier()); _ledgerUri = ledgerUri; _apiVersion = actualOptions.Version; } - /// Posts a new entry to the ledger. A sub-ledger id may optionally be specified. - /// + /// Posts a new entry to the ledger. A collection id may optionally be specified. + /// /// Schema for Request Body: - /// - /// - /// Name - /// Type - /// Required - /// Description - /// - /// - /// contents - /// string - /// Yes - /// Contents of the ledger entry. - /// - /// - /// subLedgerId - /// string - /// - /// Identifier for sub-ledgers. - /// - /// - /// transactionId - /// string - /// - /// A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. - /// - /// + /// { + /// contents: string (required), + /// collectionId: { + /// collectionId: string (required) + /// }, + /// transactionId: string + /// } + /// /// /// The content to send as the body of the request. - /// The sub-ledger id. + /// The collection id. /// If true, the will not be returned until the ledger entry is committed. /// If false, must be called to ensure the operation has completed. /// The request context. #pragma warning disable AZC0002 public virtual PostLedgerEntryOperation PostLedgerEntry( RequestContent content, - string subLedgerId = null, + string collectionId = null, bool waitForCompletion = true, RequestContext context = null) #pragma warning restore AZC0002 { - var response = PostLedgerEntry(content, subLedgerId, context); + var response = PostLedgerEntry(content, collectionId, context); response.Headers.TryGetValue(ConfidentialLedgerConstants.TransactionIdHeaderName, out string transactionId); var operation = new PostLedgerEntryOperation(this, transactionId); @@ -98,38 +98,20 @@ public virtual PostLedgerEntryOperation PostLedgerEntry( return operation; } - /// Posts a new entry to the ledger. A sub-ledger id may optionally be specified. + /// Posts a new entry to the ledger. A collection id may optionally be specified. /// /// Schema for Request Body: - /// - /// - /// Name - /// Type - /// Required - /// Description - /// - /// - /// contents - /// string - /// Yes - /// Contents of the ledger entry. - /// - /// - /// subLedgerId - /// string - /// - /// Identifier for sub-ledgers. - /// - /// - /// transactionId - /// string - /// - /// A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. - /// - /// + /// { + /// contents: string (required), + /// collectionId: { + /// collectionId: string (required) + /// }, + /// transactionId: string + /// } + /// /// /// The content to send as the body of the request. - /// The sub-ledger id. + /// The collection id. /// If true, the /// will automatically poll for status until the ledger entry is committed before it is returned. /// If false, @@ -138,12 +120,12 @@ public virtual PostLedgerEntryOperation PostLedgerEntry( #pragma warning disable AZC0002 public virtual async Task PostLedgerEntryAsync( RequestContent content, - string subLedgerId = null, + string collectionId = null, bool waitForCompletion = true, RequestContext context = null) #pragma warning restore AZC0002 { - var response = await PostLedgerEntryAsync(content, subLedgerId, context).ConfigureAwait(false); + var response = await PostLedgerEntryAsync(content, collectionId, context).ConfigureAwait(false); response.Headers.TryGetValue(ConfidentialLedgerConstants.TransactionIdHeaderName, out string transactionId); var operation = new PostLedgerEntryOperation(this, transactionId); @@ -154,9 +136,10 @@ public virtual async Task PostLedgerEntryAsync( return operation; } - internal static HttpPipelineTransportOptions GetIdentityServerTlsCertAndTrust(Uri ledgerUri, ConfidentialLedgerClientOptions options) + internal static HttpPipelineTransportOptions GetIdentityServerTlsCertAndTrust(Uri ledgerUri, ConfidentialLedgerClientOptions options, ConfidentialLedgerIdentityServiceClient identityServiceClient = null) { - var identityClient = new ConfidentialLedgerIdentityServiceClient(new Uri("https://identity.accledger.azure.com"), options); + var identityClient = identityServiceClient ?? + new ConfidentialLedgerIdentityServiceClient(new Uri("https://identity.confidential-ledger.core.azure.com"), options); // Get the ledger's TLS certificate for our ledger. var ledgerId = ledgerUri.Host.Substring(0, ledgerUri.Host.IndexOf('.')); @@ -169,8 +152,7 @@ internal static HttpPipelineTransportOptions GetIdentityServerTlsCertAndTrust(Ur .GetString(); // construct an X509Certificate2 with the ECC PEM value. - var span = new ReadOnlySpan(eccPem.ToCharArray()); - var ledgerTlsCert = PemReader.LoadCertificate(span, null, PemReader.KeyType.Auto, true); + var ledgerTlsCert = GetCertFromPEM(eccPem); X509Chain certificateChain = new(); certificateChain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck; @@ -184,7 +166,8 @@ internal static HttpPipelineTransportOptions GetIdentityServerTlsCertAndTrust(Ur bool CertValidationCheck(X509Certificate2 cert) { bool isChainValid = certificateChain.Build(cert); - if (!isChainValid) return false; + if (!isChainValid) + return false; var isCertSignedByTheTlsCert = certificateChain.ChainElements.Cast() .Any(x => x.Certificate.Thumbprint == ledgerTlsCert.Thumbprint); @@ -193,5 +176,11 @@ bool CertValidationCheck(X509Certificate2 cert) return new HttpPipelineTransportOptions { ServerCertificateCustomValidationCallback = args => CertValidationCheck(args.Certificate) }; } + + private static X509Certificate2 GetCertFromPEM(string eccPem) + { + var span = new ReadOnlySpan(eccPem.ToCharArray()); + return PemReader.LoadCertificate(span, null, PemReader.KeyType.Auto, true); + } } } diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs index b53af43a3c94..c234f65eee2b 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs @@ -57,8 +57,7 @@ protected ConfidentialLedgerClient() /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -93,8 +92,7 @@ public virtual async Task GetConstitutionAsync(RequestContext context /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -133,8 +131,7 @@ public virtual Response GetConstitution(RequestContext context = null) /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -173,8 +170,7 @@ public virtual async Task GetConsortiumMembersAsync(RequestContext con /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -209,8 +205,7 @@ public virtual Response GetConsortiumMembers(RequestContext context = null) /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -245,8 +240,7 @@ public virtual async Task GetEnclaveQuotesAsync(RequestContext context /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -268,41 +262,115 @@ public virtual Response GetEnclaveQuotes(RequestContext context = null) } } - /// A sub-ledger id may optionally be specified. + /// Collection ids are user-created collections of ledger entries. + /// The request context, which can override default behaviors on the request on a per-call basis. + /// + /// Schema for Response Body: + /// { + /// collectionId: string + /// } + /// + /// Schema for Response Error: + /// { + /// error: { + /// code: string, + /// message: string + /// } + /// } + /// + /// + /// + public virtual async Task GetCollectionsAsync(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetCollections"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCollectionsRequest(context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Collection ids are user-created collections of ledger entries. + /// The request context, which can override default behaviors on the request on a per-call basis. + /// + /// Schema for Response Body: + /// { + /// collectionId: string + /// } + /// + /// Schema for Response Error: + /// { + /// error: { + /// code: string, + /// message: string + /// } + /// } + /// + /// + /// + public virtual Response GetCollections(RequestContext context = null) + { + using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetCollections"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCollectionsRequest(context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// A collection id may optionally be specified. /// The content to send as the body of the request. - /// The sub-ledger id. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. + /// is null. /// /// Schema for Request Body: /// { /// contents: string (required), - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string (required) + /// }, /// transactionId: string /// } /// /// Schema for Response Body: /// { - /// subLedgerId: string + /// collectionId: { + /// collectionId: string + /// } /// } /// /// Schema for Response Error: /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual async Task PostLedgerEntryAsync(RequestContent content, string subLedgerId = null, RequestContext context = null) + public virtual async Task PostLedgerEntryAsync(RequestContent content, string collectionId = null, RequestContext context = null) { + Argument.AssertNotNull(content, nameof(content)); + using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.PostLedgerEntry"); scope.Start(); try { - using HttpMessage message = CreatePostLedgerEntryRequest(content, subLedgerId, context); + using HttpMessage message = CreatePostLedgerEntryRequest(content, collectionId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -312,41 +380,47 @@ public virtual async Task PostLedgerEntryAsync(RequestContent content, } } - /// A sub-ledger id may optionally be specified. + /// A collection id may optionally be specified. /// The content to send as the body of the request. - /// The sub-ledger id. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. + /// is null. /// /// Schema for Request Body: /// { /// contents: string (required), - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string (required) + /// }, /// transactionId: string /// } /// /// Schema for Response Body: /// { - /// subLedgerId: string + /// collectionId: { + /// collectionId: string + /// } /// } /// /// Schema for Response Error: /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual Response PostLedgerEntry(RequestContent content, string subLedgerId = null, RequestContext context = null) + public virtual Response PostLedgerEntry(RequestContent content, string collectionId = null, RequestContext context = null) { + Argument.AssertNotNull(content, nameof(content)); + using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.PostLedgerEntry"); scope.Start(); try { - using HttpMessage message = CreatePostLedgerEntryRequest(content, subLedgerId, context); + using HttpMessage message = CreatePostLedgerEntryRequest(content, collectionId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -358,7 +432,7 @@ public virtual Response PostLedgerEntry(RequestContent content, string subLedger /// To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. /// Identifies a write transaction. - /// The sub-ledger id. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. @@ -368,7 +442,9 @@ public virtual Response PostLedgerEntry(RequestContent content, string subLedger /// state: "Loading" | "Ready", /// entry: { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// } @@ -377,14 +453,13 @@ public virtual Response PostLedgerEntry(RequestContent content, string subLedger /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual async Task GetLedgerEntryAsync(string transactionId, string subLedgerId = null, RequestContext context = null) + public virtual async Task GetLedgerEntryAsync(string transactionId, string collectionId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(transactionId, nameof(transactionId)); @@ -392,7 +467,7 @@ public virtual async Task GetLedgerEntryAsync(string transactionId, st scope.Start(); try { - using HttpMessage message = CreateGetLedgerEntryRequest(transactionId, subLedgerId, context); + using HttpMessage message = CreateGetLedgerEntryRequest(transactionId, collectionId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -404,7 +479,7 @@ public virtual async Task GetLedgerEntryAsync(string transactionId, st /// To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. /// Identifies a write transaction. - /// The sub-ledger id. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. /// is an empty string, and was expected to be non-empty. @@ -414,7 +489,9 @@ public virtual async Task GetLedgerEntryAsync(string transactionId, st /// state: "Loading" | "Ready", /// entry: { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// } @@ -423,14 +500,13 @@ public virtual async Task GetLedgerEntryAsync(string transactionId, st /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual Response GetLedgerEntry(string transactionId, string subLedgerId = null, RequestContext context = null) + public virtual Response GetLedgerEntry(string transactionId, string collectionId = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(transactionId, nameof(transactionId)); @@ -438,7 +514,7 @@ public virtual Response GetLedgerEntry(string transactionId, string subLedgerId scope.Start(); try { - using HttpMessage message = CreateGetLedgerEntryRequest(transactionId, subLedgerId, context); + using HttpMessage message = CreateGetLedgerEntryRequest(transactionId, collectionId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -457,7 +533,13 @@ public virtual Response GetLedgerEntry(string transactionId, string subLedgerId /// Schema for Response Body: /// { /// receipt: { + /// cert: string, /// leaf: string, + /// leafComponents: { + /// claimsDigest: string, + /// commitEvidence: string, + /// writeSetDigest: string + /// }, /// nodeId: string, /// proof: [ /// { @@ -466,6 +548,7 @@ public virtual Response GetLedgerEntry(string transactionId, string subLedgerId /// } /// ], /// root: string, + /// serviceEndorsements: [string], /// signature: string /// }, /// state: "Loading" | "Ready", @@ -476,8 +559,7 @@ public virtual Response GetLedgerEntry(string transactionId, string subLedgerId /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -510,7 +592,13 @@ public virtual async Task GetReceiptAsync(string transactionId, Reques /// Schema for Response Body: /// { /// receipt: { + /// cert: string, /// leaf: string, + /// leafComponents: { + /// claimsDigest: string, + /// commitEvidence: string, + /// writeSetDigest: string + /// }, /// nodeId: string, /// proof: [ /// { @@ -519,6 +607,7 @@ public virtual async Task GetReceiptAsync(string transactionId, Reques /// } /// ], /// root: string, + /// serviceEndorsements: [string], /// signature: string /// }, /// state: "Loading" | "Ready", @@ -529,8 +618,7 @@ public virtual async Task GetReceiptAsync(string transactionId, Reques /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -570,8 +658,7 @@ public virtual Response GetReceipt(string transactionId, RequestContext context /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -611,8 +698,7 @@ public virtual async Task GetTransactionStatusAsync(string transaction /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -636,14 +722,16 @@ public virtual Response GetTransactionStatus(string transactionId, RequestContex } } - /// A sub-ledger id may optionally be specified. - /// The sub-ledger id. + /// A collection id may optionally be specified. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. /// /// Schema for Response Body: /// { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// @@ -651,20 +739,19 @@ public virtual Response GetTransactionStatus(string transactionId, RequestContex /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual async Task GetCurrentLedgerEntryAsync(string subLedgerId = null, RequestContext context = null) + public virtual async Task GetCurrentLedgerEntryAsync(string collectionId = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetCurrentLedgerEntry"); scope.Start(); try { - using HttpMessage message = CreateGetCurrentLedgerEntryRequest(subLedgerId, context); + using HttpMessage message = CreateGetCurrentLedgerEntryRequest(collectionId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -674,14 +761,16 @@ public virtual async Task GetCurrentLedgerEntryAsync(string subLedgerI } } - /// A sub-ledger id may optionally be specified. - /// The sub-ledger id. + /// A collection id may optionally be specified. + /// The collection id. /// The request context, which can override default behaviors on the request on a per-call basis. /// /// Schema for Response Body: /// { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// @@ -689,20 +778,19 @@ public virtual async Task GetCurrentLedgerEntryAsync(string subLedgerI /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual Response GetCurrentLedgerEntry(string subLedgerId = null, RequestContext context = null) + public virtual Response GetCurrentLedgerEntry(string collectionId = null, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetCurrentLedgerEntry"); scope.Start(); try { - using HttpMessage message = CreateGetCurrentLedgerEntryRequest(subLedgerId, context); + using HttpMessage message = CreateGetCurrentLedgerEntryRequest(collectionId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -716,14 +804,12 @@ public virtual Response GetCurrentLedgerEntry(string subLedgerId = null, Request /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Response Error: /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -731,7 +817,7 @@ public virtual Response GetCurrentLedgerEntry(string subLedgerId = null, Request /// public virtual async Task DeleteUserAsync(string userId, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteUser"); scope.Start(); @@ -751,14 +837,12 @@ public virtual async Task DeleteUserAsync(string userId, RequestContex /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Response Error: /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -766,7 +850,7 @@ public virtual async Task DeleteUserAsync(string userId, RequestContex /// public virtual Response DeleteUser(string userId, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteUser"); scope.Start(); @@ -786,7 +870,6 @@ public virtual Response DeleteUser(string userId, RequestContext context = null) /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Response Body: /// { @@ -798,8 +881,7 @@ public virtual Response DeleteUser(string userId, RequestContext context = null) /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -807,7 +889,7 @@ public virtual Response DeleteUser(string userId, RequestContext context = null) /// public virtual async Task GetUserAsync(string userId, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUser"); scope.Start(); @@ -827,7 +909,6 @@ public virtual async Task GetUserAsync(string userId, RequestContext c /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Response Body: /// { @@ -839,8 +920,7 @@ public virtual async Task GetUserAsync(string userId, RequestContext c /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -848,7 +928,7 @@ public virtual async Task GetUserAsync(string userId, RequestContext c /// public virtual Response GetUser(string userId, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUser"); scope.Start(); @@ -869,7 +949,6 @@ public virtual Response GetUser(string userId, RequestContext context = null) /// The content to send as the body of the request. /// The request context, which can override default behaviors on the request on a per-call basis. /// or is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Request Body: /// { @@ -887,8 +966,7 @@ public virtual Response GetUser(string userId, RequestContext context = null) /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -896,7 +974,7 @@ public virtual Response GetUser(string userId, RequestContext context = null) /// public virtual async Task CreateOrUpdateUserAsync(string userId, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); Argument.AssertNotNull(content, nameof(content)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateOrUpdateUser"); @@ -918,7 +996,6 @@ public virtual async Task CreateOrUpdateUserAsync(string userId, Reque /// The content to send as the body of the request. /// The request context, which can override default behaviors on the request on a per-call basis. /// or is null. - /// is an empty string, and was expected to be non-empty. /// /// Schema for Request Body: /// { @@ -936,8 +1013,7 @@ public virtual async Task CreateOrUpdateUserAsync(string userId, Reque /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -945,7 +1021,7 @@ public virtual async Task CreateOrUpdateUserAsync(string userId, Reque /// public virtual Response CreateOrUpdateUser(string userId, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(userId, nameof(userId)); + Argument.AssertNotNull(userId, nameof(userId)); Argument.AssertNotNull(content, nameof(content)); using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateOrUpdateUser"); @@ -962,8 +1038,8 @@ public virtual Response CreateOrUpdateUser(string userId, RequestContent content } } - /// A sub-ledger id may optionally be specified. Only entries in the specified (or default) sub-ledger will be returned. - /// The sub-ledger id. + /// A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. + /// The collection id. /// Specify the first transaction ID in a range. /// Specify the last transaction ID in a range. /// The request context, which can override default behaviors on the request on a per-call basis. @@ -971,11 +1047,13 @@ public virtual Response CreateOrUpdateUser(string userId, RequestContent content /// Schema for Response Body: /// { /// state: "Loading" | "Ready", - /// @nextLink: string, + /// nextLink: string, /// entries: [ /// { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// ] @@ -985,19 +1063,18 @@ public virtual Response CreateOrUpdateUser(string userId, RequestContent content /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual AsyncPageable GetLedgerEntriesAsync(string subLedgerId = null, string fromTransactionId = null, string toTransactionId = null, RequestContext context = null) + public virtual AsyncPageable GetLedgerEntriesAsync(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, RequestContext context = null) { - return GetLedgerEntriesImplementationAsync("ConfidentialLedgerClient.GetLedgerEntries", subLedgerId, fromTransactionId, toTransactionId, context); + return GetLedgerEntriesImplementationAsync("ConfidentialLedgerClient.GetLedgerEntries", collectionId, fromTransactionId, toTransactionId, context); } - private AsyncPageable GetLedgerEntriesImplementationAsync(string diagnosticsScopeName, string subLedgerId, string fromTransactionId, string toTransactionId, RequestContext context) + private AsyncPageable GetLedgerEntriesImplementationAsync(string diagnosticsScopeName, string collectionId, string fromTransactionId, string toTransactionId, RequestContext context) { return PageableHelpers.CreateAsyncPageable(CreateEnumerableAsync, ClientDiagnostics, diagnosticsScopeName); async IAsyncEnumerable> CreateEnumerableAsync(string nextLink, int? pageSizeHint, [EnumeratorCancellation] CancellationToken cancellationToken = default) @@ -1005,17 +1082,17 @@ async IAsyncEnumerable> CreateEnumerableAsync(string nextLink, do { var message = string.IsNullOrEmpty(nextLink) - ? CreateGetLedgerEntriesRequest(subLedgerId, fromTransactionId, toTransactionId, context) - : CreateGetLedgerEntriesNextPageRequest(nextLink, subLedgerId, fromTransactionId, toTransactionId, context); - var page = await LowLevelPageableHelpers.ProcessMessageAsync(_pipeline, message, context, "entries", "@nextLink", cancellationToken).ConfigureAwait(false); + ? CreateGetLedgerEntriesRequest(collectionId, fromTransactionId, toTransactionId, context) + : CreateGetLedgerEntriesNextPageRequest(nextLink, collectionId, fromTransactionId, toTransactionId, context); + var page = await LowLevelPageableHelpers.ProcessMessageAsync(_pipeline, message, context, "entries", "nextLink", cancellationToken).ConfigureAwait(false); nextLink = page.ContinuationToken; yield return page; } while (!string.IsNullOrEmpty(nextLink)); } } - /// A sub-ledger id may optionally be specified. Only entries in the specified (or default) sub-ledger will be returned. - /// The sub-ledger id. + /// A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. + /// The collection id. /// Specify the first transaction ID in a range. /// Specify the last transaction ID in a range. /// The request context, which can override default behaviors on the request on a per-call basis. @@ -1023,11 +1100,13 @@ async IAsyncEnumerable> CreateEnumerableAsync(string nextLink, /// Schema for Response Body: /// { /// state: "Loading" | "Ready", - /// @nextLink: string, + /// nextLink: string, /// entries: [ /// { /// contents: string, - /// subLedgerId: string, + /// collectionId: { + /// collectionId: string + /// }, /// transactionId: string /// } /// ] @@ -1037,19 +1116,18 @@ async IAsyncEnumerable> CreateEnumerableAsync(string nextLink, /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// /// /// - public virtual Pageable GetLedgerEntries(string subLedgerId = null, string fromTransactionId = null, string toTransactionId = null, RequestContext context = null) + public virtual Pageable GetLedgerEntries(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, RequestContext context = null) { - return GetLedgerEntriesImplementation("ConfidentialLedgerClient.GetLedgerEntries", subLedgerId, fromTransactionId, toTransactionId, context); + return GetLedgerEntriesImplementation("ConfidentialLedgerClient.GetLedgerEntries", collectionId, fromTransactionId, toTransactionId, context); } - private Pageable GetLedgerEntriesImplementation(string diagnosticsScopeName, string subLedgerId, string fromTransactionId, string toTransactionId, RequestContext context) + private Pageable GetLedgerEntriesImplementation(string diagnosticsScopeName, string collectionId, string fromTransactionId, string toTransactionId, RequestContext context) { return PageableHelpers.CreatePageable(CreateEnumerable, ClientDiagnostics, diagnosticsScopeName); IEnumerable> CreateEnumerable(string nextLink, int? pageSizeHint) @@ -1057,9 +1135,9 @@ IEnumerable> CreateEnumerable(string nextLink, int? pageSizeHin do { var message = string.IsNullOrEmpty(nextLink) - ? CreateGetLedgerEntriesRequest(subLedgerId, fromTransactionId, toTransactionId, context) - : CreateGetLedgerEntriesNextPageRequest(nextLink, subLedgerId, fromTransactionId, toTransactionId, context); - var page = LowLevelPageableHelpers.ProcessMessage(_pipeline, message, context, "entries", "@nextLink"); + ? CreateGetLedgerEntriesRequest(collectionId, fromTransactionId, toTransactionId, context) + : CreateGetLedgerEntriesNextPageRequest(nextLink, collectionId, fromTransactionId, toTransactionId, context); + var page = LowLevelPageableHelpers.ProcessMessage(_pipeline, message, context, "entries", "nextLink"); nextLink = page.ContinuationToken; yield return page; } while (!string.IsNullOrEmpty(nextLink)); @@ -1108,7 +1186,21 @@ internal HttpMessage CreateGetEnclaveQuotesRequest(RequestContext context) return message; } - internal HttpMessage CreateGetLedgerEntriesRequest(string subLedgerId, string fromTransactionId, string toTransactionId, RequestContext context) + internal HttpMessage CreateGetCollectionsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_ledgerUri); + uri.AppendPath("/app/collections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetLedgerEntriesRequest(string collectionId, string fromTransactionId, string toTransactionId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -1117,9 +1209,9 @@ internal HttpMessage CreateGetLedgerEntriesRequest(string subLedgerId, string fr uri.Reset(_ledgerUri); uri.AppendPath("/app/transactions", false); uri.AppendQuery("api-version", _apiVersion, true); - if (subLedgerId != null) + if (collectionId != null) { - uri.AppendQuery("subLedgerId", subLedgerId, true); + uri.AppendQuery("collectionId", collectionId, true); } if (fromTransactionId != null) { @@ -1134,7 +1226,7 @@ internal HttpMessage CreateGetLedgerEntriesRequest(string subLedgerId, string fr return message; } - internal HttpMessage CreatePostLedgerEntryRequest(RequestContent content, string subLedgerId, RequestContext context) + internal HttpMessage CreatePostLedgerEntryRequest(RequestContent content, string collectionId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -1143,9 +1235,9 @@ internal HttpMessage CreatePostLedgerEntryRequest(RequestContent content, string uri.Reset(_ledgerUri); uri.AppendPath("/app/transactions", false); uri.AppendQuery("api-version", _apiVersion, true); - if (subLedgerId != null) + if (collectionId != null) { - uri.AppendQuery("subLedgerId", subLedgerId, true); + uri.AppendQuery("collectionId", collectionId, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1154,7 +1246,7 @@ internal HttpMessage CreatePostLedgerEntryRequest(RequestContent content, string return message; } - internal HttpMessage CreateGetLedgerEntryRequest(string transactionId, string subLedgerId, RequestContext context) + internal HttpMessage CreateGetLedgerEntryRequest(string transactionId, string collectionId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -1164,9 +1256,9 @@ internal HttpMessage CreateGetLedgerEntryRequest(string transactionId, string su uri.AppendPath("/app/transactions/", false); uri.AppendPath(transactionId, true); uri.AppendQuery("api-version", _apiVersion, true); - if (subLedgerId != null) + if (collectionId != null) { - uri.AppendQuery("subLedgerId", subLedgerId, true); + uri.AppendQuery("collectionId", collectionId, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1205,7 +1297,7 @@ internal HttpMessage CreateGetTransactionStatusRequest(string transactionId, Req return message; } - internal HttpMessage CreateGetCurrentLedgerEntryRequest(string subLedgerId, RequestContext context) + internal HttpMessage CreateGetCurrentLedgerEntryRequest(string collectionId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -1214,9 +1306,9 @@ internal HttpMessage CreateGetCurrentLedgerEntryRequest(string subLedgerId, Requ uri.Reset(_ledgerUri); uri.AppendPath("/app/transactions/current", false); uri.AppendQuery("api-version", _apiVersion, true); - if (subLedgerId != null) + if (collectionId != null) { - uri.AppendQuery("subLedgerId", subLedgerId, true); + uri.AppendQuery("collectionId", collectionId, true); } request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1231,7 +1323,7 @@ internal HttpMessage CreateDeleteUserRequest(string userId, RequestContext conte var uri = new RawRequestUriBuilder(); uri.Reset(_ledgerUri); uri.AppendPath("/app/users/", false); - uri.AppendPath(userId, true); + uri.AppendPath(userId, false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1246,7 +1338,7 @@ internal HttpMessage CreateGetUserRequest(string userId, RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_ledgerUri); uri.AppendPath("/app/users/", false); - uri.AppendPath(userId, true); + uri.AppendPath(userId, false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1261,16 +1353,16 @@ internal HttpMessage CreateCreateOrUpdateUserRequest(string userId, RequestConte var uri = new RawRequestUriBuilder(); uri.Reset(_ledgerUri); uri.AppendPath("/app/users/", false); - uri.AppendPath(userId, true); + uri.AppendPath(userId, false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); request.Content = content; return message; } - internal HttpMessage CreateGetLedgerEntriesNextPageRequest(string nextLink, string subLedgerId, string fromTransactionId, string toTransactionId, RequestContext context) + internal HttpMessage CreateGetLedgerEntriesNextPageRequest(string nextLink, string collectionId, string fromTransactionId, string toTransactionId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClientOptions.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClientOptions.cs index 8b8256f43f18..f4eacc8e7344 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClientOptions.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClientOptions.cs @@ -13,13 +13,13 @@ namespace Azure.Security.ConfidentialLedger /// Client options for ConfidentialLedger library clients. public partial class ConfidentialLedgerClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V0_1_preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2022_05_13; /// The version of the service to use. public enum ServiceVersion { - /// Service version "0.1-preview". - V0_1_preview = 1, + /// Service version "2022-05-13". + V2022_05_13 = 1, } internal string Version { get; } @@ -29,7 +29,7 @@ public ConfidentialLedgerClientOptions(ServiceVersion version = LatestVersion) { Version = version switch { - ServiceVersion.V0_1_preview => "0.1-preview", + ServiceVersion.V2022_05_13 => "2022-05-13", _ => throw new NotSupportedException() }; } diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs index ed4f5620d63e..43ce3efab7c1 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs @@ -49,8 +49,7 @@ protected ConfidentialLedgerIdentityServiceClient() /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// @@ -90,8 +89,7 @@ public virtual async Task GetLedgerIdentityAsync(string ledgerId, Requ /// { /// error: { /// code: string, - /// message: string, - /// innererror: ConfidentialLedgerErrorBody + /// message: string /// } /// } /// diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md index fce6d5715c96..5adf637681d2 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md @@ -8,7 +8,7 @@ namespace: Azure.Security.ConfidentialLedger security: AADToken security-scopes: "https://confidential-ledger.azure.com/.default" input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/0.1-preview/common.json - - https://github.com/Azure/azure-rest-api-specs/blob/e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/0.1-preview/confidentialledger.json - - https://github.com/Azure/azure-rest-api-specs/blob/e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/0.1-preview/identityservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/f68e478437a9065651c982788769337fc4d8fb37/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/common.json + - https://github.com/Azure/azure-rest-api-specs/blob/f68e478437a9065651c982788769337fc4d8fb37/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/confidentialledger.json + - https://github.com/Azure/azure-rest-api-specs/blob/f68e478437a9065651c982788769337fc4d8fb37/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/identityservice.json ``` diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientLiveTests.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientLiveTests.cs index c2121f01f19e..8407f791af51 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientLiveTests.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientLiveTests.cs @@ -5,23 +5,22 @@ using System.Collections.Generic; using System.IO; using System.Net; -using System.Net.Http; +using System.Security.Cryptography.X509Certificates; using System.Text.Json; using System.Threading.Tasks; using Azure.Core; -using Azure.Core.Pipeline; using Azure.Core.TestFramework; using NUnit.Framework; namespace Azure.Security.ConfidentialLedger.Tests { + [LiveOnly] public class ConfidentialLedgerClientLiveTests : RecordedTestBase { private TokenCredential Credential; - private ConfidentialLedgerClientOptions Options; + private readonly ConfidentialLedgerClientOptions _options = new ConfidentialLedgerClientOptions(); private ConfidentialLedgerClient Client; private ConfidentialLedgerIdentityServiceClient IdentityClient; - private string transactionId; private HashSet TestsNotRequiringLedgerEntry = new() { "GetEnclaveQuotes", "GetConsortiumMembers", "GetConstitution" }; public ConfidentialLedgerClientLiveTests(bool isAsync) : base(isAsync) @@ -34,34 +33,17 @@ public ConfidentialLedgerClientLiveTests(bool isAsync) : base(isAsync) public void Setup() { Credential = TestEnvironment.Credential; - var httpHandler = new HttpClientHandler(); - httpHandler.ServerCertificateCustomValidationCallback = (_, _, _, _) => - { - return true; - }; - Options = new ConfidentialLedgerClientOptions { Transport = new HttpClientTransport(httpHandler) }; - if (TestEnvironment.Mode == RecordedTestMode.Playback) - { - Options.OperationPollingInterval = TimeSpan.Zero; - } - Client = InstrumentClient( - new ConfidentialLedgerClient( - TestEnvironment.ConfidentialLedgerUrl, - Credential, - InstrumentClientOptions(Options))); - IdentityClient = InstrumentClient( new ConfidentialLedgerIdentityServiceClient( TestEnvironment.ConfidentialLedgerIdentityUrl, - InstrumentClientOptions(Options))); + InstrumentClientOptions(_options))); - if (!TestsNotRequiringLedgerEntry.Contains(TestContext.CurrentContext.Test.MethodName)) - { - var operation = Client.PostLedgerEntryAsync(RequestContent.Create(new { contents = Recording.GenerateAssetName("test") }), waitForCompletion: true) - .GetAwaiter() - .GetResult(); - transactionId = operation.Id; - } + Client = InstrumentClient( + new ConfidentialLedgerClient( + TestEnvironment.ConfidentialLedgerUrl, + Credential, + clientCertificate: null, + options: InstrumentClientOptions(_options))); } public async Task GetUser(string objId) @@ -73,6 +55,24 @@ public async Task GetUser(string objId) Assert.That(stringResult, Does.Contain(objId)); } +#if NET6_0_OR_GREATER + [RecordedTest] + public async Task AuthWithClientCert() + { + var _cert = X509Certificate2.CreateFromPem(TestEnvironment.ClientPEM, TestEnvironment.ClientPEMPk); + _cert = new X509Certificate2(_cert.Export(X509ContentType.Pfx)); + var certClient = InstrumentClient(new ConfidentialLedgerClient( + TestEnvironment.ConfidentialLedgerUrl, + credential: null, + clientCertificate: _cert, + options: InstrumentClientOptions(_options))); + var result = await certClient.GetConstitutionAsync(new()); + var stringResult = new StreamReader(result.ContentStream).ReadToEnd(); + + Assert.AreEqual((int)HttpStatusCode.OK, result.Status); + Assert.That(stringResult, Does.Contain("digest")); + } +#endif [RecordedTest] public async Task GetLedgerEntries() { @@ -175,6 +175,10 @@ public async Task PostLedgerEntry() [RecordedTest] public async Task GetCurrentLedgerEntry() { + await Client.PostLedgerEntryAsync( + RequestContent.Create(new { contents = Recording.GenerateAssetName("test") }), + waitForCompletion: true); + var result = await Client.GetCurrentLedgerEntryAsync(); var stringResult = new StreamReader(result.ContentStream).ReadToEnd(); diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientTests.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientTests.cs index 526b05a1d39a..003c2fc24bce 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientTests.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerClientTests.cs @@ -2,8 +2,6 @@ // Licensed under the MIT License. using System; -using System.Net; -using System.Threading.Tasks; using Azure.Core; using Azure.Core.TestFramework; using NUnit.Framework; @@ -28,7 +26,7 @@ public void FailedTransaction() Transport = new MockTransport( req => { - if (req.Uri.Host == "identity.accledger.azure.com") + if (req.Uri.Host == "identity.confidential-ledger.core.azure.com") { var cert = new MockResponse(200); cert.SetContent( diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerEnvironment.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerEnvironment.cs index 08d9689f4b5d..7ae227176209 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerEnvironment.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/ConfidentialLedgerEnvironment.cs @@ -11,5 +11,7 @@ public class ConfidentialLedgerEnvironment : TestEnvironment public Uri ConfidentialLedgerUrl => new(GetRecordedVariable("CONFIDENTIALLEDGER_URL")); public Uri ConfidentialLedgerIdentityUrl => new(GetRecordedVariable("CONFIDENTIALLEDGER_IDENTITY_URL")); public string ConfidentialLedgerAdminOid => GetRecordedVariable("CONFIDENTIALLEDGER_CLIENT_OBJECTID"); + public string ClientPEM => GetRecordedOptionalVariable("CONFIDENTIALLEDGER_CLIENT_PEM"); + public string ClientPEMPk => GetRecordedOptionalVariable("CONFIDENTIALLEDGER_CLIENT_PEM_PK"); } } diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUser.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUser.json deleted file mode 100644 index fff604bb5725..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUser.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "21d7e887fc5f1342117b39e3636381cf", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:24:31 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "21d7e887fc5f1342117b39e3636381cf", - "x-ms-correlation-request-id": "31df03b1-f440-485a-9289-baccc000f5c1", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-lndfd" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "75599915a890ee461b0c521aa5974804", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test5051" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.63", - "x-ms-client-request-id": "75599915a890ee461b0c521aa5974804", - "x-ms-request-id": "2084942023" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.63/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "679712e2244e00a41451b44b73ab8728", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.63", - "x-ms-client-request-id": "679712e2244e00a41451b44b73ab8728", - "x-ms-request-id": "1973876456" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.63" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.63/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "140fdad2c27040f6913343f0f0f86ce4", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.64", - "x-ms-client-request-id": "140fdad2c27040f6913343f0f0f86ce4", - "x-ms-request-id": "2065205135" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.63" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/5180dff0-68e9-f0e2-f458-613ff4fa7a70?api-version=0.1-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "25", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "ca472984338720941b57d51be1b4101c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "assignedRole": "Reader" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "73", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.65", - "x-ms-client-request-id": "ca472984338720941b57d51be1b4101c", - "x-ms-request-id": "2118133485" - }, - "ResponseBody": { - "assignedRole": "Reader", - "userId": "5180dff0-68e9-f0e2-f458-613ff4fa7a70" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/5180dff0-68e9-f0e2-f458-613ff4fa7a70?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "945acfe5362a6a3ff81f201761b74b96", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "73", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.65", - "x-ms-client-request-id": "945acfe5362a6a3ff81f201761b74b96", - "x-ms-request-id": "820226137" - }, - "ResponseBody": { - "assignedRole": "Reader", - "userId": "5180dff0-68e9-f0e2-f458-613ff4fa7a70" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/5180dff0-68e9-f0e2-f458-613ff4fa7a70?api-version=0.1-preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET Framework 4.8.4420.0; Microsoft Windows 10.0.22000 )" - ], - "x-ms-client-request-id": "c76bd3b8a2b0bd5c4b60359192c70f40", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Content-Length": "0", - "x-ms-ccf-transaction-id": "2.66", - "x-ms-client-request-id": "c76bd3b8a2b0bd5c4b60359192c70f40", - "x-ms-request-id": "1767308469" - }, - "ResponseBody": [] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "2133785607" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUserAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUserAsync.json deleted file mode 100644 index 6dab656ae57f..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/CreateAndGetAndDeleteUserAsync.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0a736be69a87dc8691c1266562e3f93e", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:20 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "0a736be69a87dc8691c1266562e3f93e", - "x-ms-correlation-request-id": "e4f45b4f-7aea-49b9-9498-b4a9762f25c6", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "358d4c38a572215779b0eb886f629d52", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test8551" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.92", - "x-ms-client-request-id": "358d4c38a572215779b0eb886f629d52", - "x-ms-request-id": "712821175" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.92/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "31e6e7b600c0a667b07d2db1191247d3", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.92", - "x-ms-client-request-id": "31e6e7b600c0a667b07d2db1191247d3", - "x-ms-request-id": "446153420" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.92" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.92/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b6db49de0aa1c6731be90ee99b53215e", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.93", - "x-ms-client-request-id": "b6db49de0aa1c6731be90ee99b53215e", - "x-ms-request-id": "1379564448" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.92" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/fbac1389-0d13-381f-e5e6-84f577a60866?api-version=0.1-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "25", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "25aa1769e686abb1732015d7f27d0b5c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "assignedRole": "Reader" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "73", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.94", - "x-ms-client-request-id": "25aa1769e686abb1732015d7f27d0b5c", - "x-ms-request-id": "113348010" - }, - "ResponseBody": { - "assignedRole": "Reader", - "userId": "fbac1389-0d13-381f-e5e6-84f577a60866" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/fbac1389-0d13-381f-e5e6-84f577a60866?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0628cf5b4b66d0c029a3d1bb857e4f75", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "73", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.94", - "x-ms-client-request-id": "0628cf5b4b66d0c029a3d1bb857e4f75", - "x-ms-request-id": "1006193883" - }, - "ResponseBody": { - "assignedRole": "Reader", - "userId": "fbac1389-0d13-381f-e5e6-84f577a60866" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/users/fbac1389-0d13-381f-e5e6-84f577a60866?api-version=0.1-preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "8380a7e0fba8a2d7620088f3f7484667", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Content-Length": "0", - "x-ms-ccf-transaction-id": "2.96", - "x-ms-client-request-id": "8380a7e0fba8a2d7620088f3f7484667", - "x-ms-request-id": "624219895" - }, - "ResponseBody": [] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "824754101" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembers.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembers.json deleted file mode 100644 index 9327179775c0..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembers.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "793d3d4d4d21f98acad5a5a99a48776a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:17 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "793d3d4d4d21f98acad5a5a99a48776a", - "x-ms-correlation-request-id": "34e728f4-2ead-4e5d-a36e-1af328f9dfa1", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-pw9xc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "21be1463efb1cf9cbf2bdc33dd63bcbf", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "856", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.267" - }, - "ResponseBody": { - "members": [ - { - "certificate": "-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQEvwK1yl2SQqzTFSzibsgbzAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjEwNTE5MDM0NzU2WhcN\nMjIwNTE5MDM1NzU2WjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAARRInw/LcJ7JRWBVLQABye2dQQ6Tzi9tQrq\nwbaiTxVo3Qcj0WG/mTJVcneIgvhZrRiOha9luyX2VesJiinc5/4xsnMphEK49DMO\nmG44GCB0u2iGsisUBzLXBycdE1dTM6KjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBRcLcxofIdoSoe5GF\u002Bea/8xCnjCtzAdBgNVHQ4EFgQUXC3MaHyHaEqHuRhfnmv/\nMQp4wrcwCgYIKoZIzj0EAwMDaAAwZQIwBpufGEo0e6rISc7N8gPIRyx2uWcabYFw\nOFCcNqlWNH788JXsQy1VtiBYv7Evtt0vAjEA/tWiYFOZqy9FeQp2t/JodfLXq2gO\nnRdPES3oP\u002BzEoWTYBoTTl0hvY2bEj2yp4GqU\n-----END CERTIFICATE-----", - "id": "bb3f6ba6b0b2dfb83ff6f68d4e80d2a04050f5f6a825494ba155cfcdb1f8394f" - } - ] - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "760524424" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembersAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembersAsync.json deleted file mode 100644 index a73c3b247924..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConsortiumMembersAsync.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "054fa7c2bf87272fc9f0ee5361904d0c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:32 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "054fa7c2bf87272fc9f0ee5361904d0c", - "x-ms-correlation-request-id": "bc9aa3fb-efdd-46b0-bfb0-f0508bb67c33", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-pw9xc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "ac5e493bc7cb724ed809a6ab559fa562", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "856", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.282" - }, - "ResponseBody": { - "members": [ - { - "certificate": "-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQEvwK1yl2SQqzTFSzibsgbzAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjEwNTE5MDM0NzU2WhcN\nMjIwNTE5MDM1NzU2WjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAARRInw/LcJ7JRWBVLQABye2dQQ6Tzi9tQrq\nwbaiTxVo3Qcj0WG/mTJVcneIgvhZrRiOha9luyX2VesJiinc5/4xsnMphEK49DMO\nmG44GCB0u2iGsisUBzLXBycdE1dTM6KjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBRcLcxofIdoSoe5GF\u002Bea/8xCnjCtzAdBgNVHQ4EFgQUXC3MaHyHaEqHuRhfnmv/\nMQp4wrcwCgYIKoZIzj0EAwMDaAAwZQIwBpufGEo0e6rISc7N8gPIRyx2uWcabYFw\nOFCcNqlWNH788JXsQy1VtiBYv7Evtt0vAjEA/tWiYFOZqy9FeQp2t/JodfLXq2gO\nnRdPES3oP\u002BzEoWTYBoTTl0hvY2bEj2yp4GqU\n-----END CERTIFICATE-----", - "id": "bb3f6ba6b0b2dfb83ff6f68d4e80d2a04050f5f6a825494ba155cfcdb1f8394f" - } - ] - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "222369835" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitution.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitution.json deleted file mode 100644 index 49a5fc497d66..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitution.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "913db77379850554a627cccba979b3bd", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:18 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "913db77379850554a627cccba979b3bd", - "x-ms-correlation-request-id": "37c6a108-65d7-4270-8190-ae0edb73915f", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-sqlm5" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "68caa6ce392e04a618b16ee77862c19d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "31381", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.267" - }, - "ResponseBody": { - "digest": "5e3a52df2faa3c42d482f5367c0f2bcddd251f1aaabf07d233ec6f2f5e69b977", - "script": "class Action {\n constructor(validate, apply) {\n this.validate = validate;\n this.apply = apply;\n }\n}\n\nfunction parseUrl(url) {\n // From https://tools.ietf.org/html/rfc3986#appendix-B\n const re = new RegExp(\n \u0022^(([^:/?#]\u002B):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\u0022\n );\n const groups = url.match(re);\n if (!groups) {\n throw new TypeError(\u0060${url} is not a valid URL.\u0060);\n }\n return {\n scheme: groups[2],\n authority: groups[4],\n path: groups[5],\n query: groups[7],\n fragment: groups[9],\n };\n}\n\nfunction checkType(value, type, field) {\n const optional = type.endsWith(\u0022?\u0022);\n if (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type = type.slice(0, -1);\n }\n if (type === \u0022array\u0022) {\n if (!Array.isArray(value)) {\n throw new Error(\u0060${field} must be an array\u0060);\n }\n } else if (type === \u0022integer\u0022) {\n if (!Number.isInteger(value)) {\n throw new Error(\u0060${field} must be an integer\u0060);\n }\n } else if (typeof value !== type) {\n throw new Error(\u0060${field} must be of type ${type} but is ${typeof value}\u0060);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if (!members.includes(value)) {\n throw new Error(\u0060${field} must be one of ${members}\u0060);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if (low !== null \u0026\u0026 value \u003C low) {\n throw new Error(\u0060${field} must be greater than ${low}\u0060);\n }\n if (high !== null \u0026\u0026 value \u003E high) {\n throw new Error(\u0060${field} must be lower than ${high}\u0060);\n }\n}\n\nfunction checkLength(value, min, max, field) {\n if (min !== null \u0026\u0026 value.length \u003C min) {\n throw new Error(\u0060${field} must be an array of minimum ${min} elements\u0060);\n }\n if (max !== null \u0026\u0026 value.length \u003E max) {\n throw new Error(\u0060${field} must be an array of maximum ${max} elements\u0060);\n }\n}\n\nfunction checkNone(args) {\n if (args !== null \u0026\u0026 args !== undefined) {\n throw new Error(\u0060Proposal does not accept any argument, found \u0022${args}\u0022\u0060);\n }\n}\n\nfunction getSingletonKvKey() {\n // When a KV map only contains one value, this is the key at which\n // the value is recorded\n return new ArrayBuffer(8);\n}\n\nfunction getActiveRecoveryMembersCount() {\n let activeRecoveryMembersCount = 0;\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].forEach((_, k) =\u003E {\n let rawMemberInfo = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(k);\n if (rawMemberInfo === undefined) {\n throw new Error(\u0060Recovery member ${ccf.bufToStr(k)} has no information\u0060);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if (memberInfo.status === \u0022Active\u0022) {\n activeRecoveryMembersCount\u002B\u002B;\n }\n });\n return activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, \u0022object\u0022, field);\n checkType(value.keys, \u0022array\u0022, \u0060${field}.keys\u0060);\n for (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \u0022string\u0022, \u0060${field}.keys[${i}].kid\u0060);\n checkType(jwk.kty, \u0022string\u0022, \u0060${field}.keys[${i}].kty\u0060);\n checkType(jwk.x5c, \u0022array\u0022, \u0060${field}.keys[${i}].x5c\u0060);\n checkLength(jwk.x5c, 1, null, \u0060${field}.keys[${i}].x5c\u0060);\n for (const [j, b64der] of jwk.x5c.entries()) {\n checkType(b64der, \u0022string\u0022, \u0060${field}.keys[${i}].x5c[${j}]\u0060);\n const pem =\n \u0022-----BEGIN CERTIFICATE-----\\n\u0022 \u002B\n b64der \u002B\n \u0022\\n-----END CERTIFICATE-----\u0022;\n checkX509CertChain(pem, \u0060${field}.keys[${i}].x5c[${j}]\u0060);\n }\n }\n}\n\nfunction checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) {\n throw new Error(\n \u0060${field} must be a valid X509 certificate (chain) in PEM format\u0060\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) {\n let proposals = ccf.kv[\u0022public:ccf.gov.proposals_info.js\u0022];\n const proposalsMap = ccf.kv[\u0022public:ccf.gov.proposals_info.js\u0022];\n proposalsMap.forEach((v, k) =\u003E {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === \u0022Open\u0022) {\n info.state = \u0022Dropped\u0022;\n proposalsMap.set(k, ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions = new Map([\n [\n \u0022set_constitution\u0022,\n new Action(\n function (args) {\n checkType(args.constitution, \u0022string\u0022);\n },\n function (args, proposalId) {\n ccf.kv[\u0022public:ccf.gov.constitution\u0022].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(args.constitution)\n );\n\n // Changing the constitution changes the semantics of any other open proposals, so invalidate them to avoid confusion or malicious vote modification\n invalidateOtherOpenProposals(proposalId);\n }\n ),\n ],\n [\n \u0022set_member\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n checkType(args.member_data, \u0022object?\u0022, \u0022member_data\u0022);\n // Also check that public encryption key is well formed, if it exists\n },\n\n function (args) {\n const memberId = ccf.pemToId(args.cert);\n const rawMemberId = ccf.strToBuf(memberId);\n\n ccf.kv[\u0022public:ccf.gov.members.certs\u0022].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if (args.encryption_pub_key == null) {\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].delete(\n rawMemberId\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].set(\n rawMemberId,\n ccf.strToBuf(args.encryption_pub_key)\n );\n }\n\n let member_info = {};\n member_info.member_data = args.member_data;\n member_info.status = \u0022Accepted\u0022;\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const rawSignature = ccf.kv[\u0022public:ccf.internal.signatures\u0022].get(\n getSingletonKvKey()\n );\n if (rawSignature === undefined) {\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].set(rawMemberId);\n } else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \u0022remove_member\u0022,\n new Action(\n function (args) {\n checkType(args.member_id, \u0022string\u0022, \u0022member_id\u0022);\n },\n function (args) {\n const rawMemberId = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(\n rawMemberId\n );\n if (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember = memberInfo.status == \u0022Active\u0022;\n\n const isRecoveryMember = ccf.kv[\n \u0022public:ccf.gov.members.encryption_public_keys\u0022\n ].has(rawMemberId)\n ? true\n : false;\n\n // If the member is an active recovery member, check that there\n // would still be a sufficient number of recovery members left\n // to recover the service\n if (isActiveMember \u0026\u0026 isRecoveryMember) {\n const rawConfig = ccf.kv[\u0022public:ccf.gov.service.config\u0022].get(\n getSingletonKvKey()\n );\n if (rawConfig === undefined) {\n throw new Error(\u0022Service configuration could not be found\u0022);\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - 1;\n if (activeRecoveryMembersCountAfter \u003C config.recovery_threshold) {\n throw new Error(\n \u0060Number of active recovery members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold (${config.recovery_threshold})\u0060\n );\n }\n }\n\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].delete(\n rawMemberId\n );\n ccf.kv[\u0022public:ccf.gov.members.certs\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.history\u0022].delete(rawMemberId);\n\n if (isActiveMember \u0026\u0026 isRecoveryMember) {\n // A retired recovery member should not have access to the private\n // ledger going forward so rekey the ledger, issuing new shares to\n // remaining active recovery members\n ccf.node.triggerLedgerRekey();\n }\n }\n ),\n ],\n [\n \u0022set_member_data\u0022,\n new Action(\n function (args) {\n checkType(args.member_id, \u0022string\u0022, \u0022member_id\u0022);\n checkType(args.member_data, \u0022object\u0022, \u0022member_data\u0022);\n },\n\n function (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let members_info = ccf.kv[\u0022public:ccf.gov.members.info\u0022];\n let member_info = members_info.get(member_id);\n if (member_info === undefined) {\n throw new Error(\u0060Member ${args.member_id} does not exist\u0060);\n }\n let mi = ccf.bufToJsonCompatible(member_info);\n mi.member_data = args.member_data;\n members_info.set(member_id, ccf.jsonCompatibleToBuf(mi));\n }\n ),\n ],\n [\n \u0022set_user\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n checkType(args.user_data, \u0022object?\u0022, \u0022user_data\u0022);\n },\n function (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if (args.user_data !== null \u0026\u0026 args.user_data !== undefined) {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \u0022remove_user\u0022,\n new Action(\n function (args) {\n checkType(args.user_id, \u0022string\u0022, \u0022user_id\u0022);\n },\n function (args) {\n const user_id = ccf.strToBuf(args.user_id);\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].delete(user_id);\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(user_id);\n }\n ),\n ],\n [\n \u0022remove_user_by_cert\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n },\n function (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].delete(\n rawUserId\n );\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(rawUserId);\n }\n ),\n ],\n [\n \u0022set_user_data\u0022,\n new Action(\n function (args) {\n checkType(args.user_id, \u0022string\u0022, \u0022user_id\u0022);\n checkType(args.user_data, \u0022object?\u0022, \u0022user_data\u0022);\n },\n function (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if (args.user_data !== null \u0026\u0026 args.user_data !== undefined) {\n let userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(userId);\n }\n }\n ),\n ],\n [\n \u0022set_recovery_threshold\u0022,\n new Action(\n function (args) {\n checkType(args.recovery_threshold, \u0022integer\u0022, \u0022threshold\u0022);\n checkBounds(args.recovery_threshold, 1, 254, \u0022threshold\u0022);\n },\n function (args) {\n const rawConfig = ccf.kv[\u0022public:ccf.gov.service.config\u0022].get(\n getSingletonKvKey()\n );\n if (rawConfig === undefined) {\n throw new Error(\u0022Service configuration could not be found\u0022);\n }\n\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n if (args.recovery_threshold === config.recovery_threshold) {\n return; // No effect\n }\n\n const rawService = ccf.kv[\u0022public:ccf.gov.service.info\u0022].get(\n getSingletonKvKey()\n );\n if (rawService === undefined) {\n throw new Error(\u0022Service information could not be found\u0022);\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === \u0022WaitingForRecoveryShares\u0022) {\n throw new Error(\n \u0060Cannot set recovery threshold if service is ${service.status}\u0060\n );\n } else if (service.status === \u0022Open\u0022) {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if (args.recovery_threshold \u003E activeRecoveryMembersCount) {\n throw new Error(\n \u0060Cannot set recovery threshold to ${args.recovery_threshold}: recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}\u0060\n );\n }\n }\n\n config.recovery_threshold = args.recovery_threshold;\n ccf.kv[\u0022public:ccf.gov.service.config\u0022].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \u0022trigger_recovery_shares_refresh\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n function (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \u0022trigger_ledger_rekey\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n\n function (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \u0022transition_service_to_open\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n\n function (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \u0022set_js_app\u0022,\n new Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, \u0022object\u0022, \u0022bundle\u0022);\n\n let prefix = \u0022bundle.modules\u0022;\n checkType(bundle.modules, \u0022array\u0022, prefix);\n for (const [i, module] of bundle.modules.entries()) {\n checkType(module, \u0022object\u0022, \u0060${prefix}[${i}]\u0060);\n checkType(module.name, \u0022string\u0022, \u0060${prefix}[${i}].name\u0060);\n checkType(module.module, \u0022string\u0022, \u0060${prefix}[${i}].module\u0060);\n }\n\n prefix = \u0022bundle.metadata\u0022;\n checkType(bundle.metadata, \u0022object\u0022, prefix);\n checkType(bundle.metadata.endpoints, \u0022object\u0022, \u0060${prefix}.endpoints\u0060);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) {\n checkType(endpoint, \u0022object\u0022, \u0060${prefix}.endpoints[\u0022${url}\u0022]\u0060);\n for (const [method, info] of Object.entries(endpoint)) {\n const prefix2 = \u0060${prefix}.endpoints[\u0022${url}\u0022][\u0022${method}\u0022]\u0060;\n checkType(info, \u0022object\u0022, prefix2);\n checkType(info.js_module, \u0022string\u0022, \u0060${prefix2}.js_module\u0060);\n checkType(info.js_function, \u0022string\u0022, \u0060${prefix2}.js_function\u0060);\n checkEnum(\n info.mode,\n [\u0022readwrite\u0022, \u0022readonly\u0022, \u0022historical\u0022],\n \u0060${prefix2}.mode\u0060\n );\n checkEnum(\n info.forwarding_required,\n [\u0022sometimes\u0022, \u0022always\u0022, \u0022never\u0022],\n \u0060${prefix2}.forwarding_required\u0060\n );\n checkType(info.openapi, \u0022object?\u0022, \u0060${prefix2}.openapi\u0060);\n checkType(\n info.openapi_hidden,\n \u0022boolean?\u0022,\n \u0060${prefix2}.openapi_hidden\u0060\n );\n checkType(\n info.authn_policies,\n \u0022array\u0022,\n \u0060${prefix2}.authn_policies\u0060\n );\n for (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, \u0022string\u0022, \u0060${prefix2}.authn_policies[${i}]\u0060);\n }\n if (!bundle.modules.some((m) =\u003E m.name === info.js_module)) {\n throw new Error(\u0060module \u0027${info.js_module}\u0027 not found in bundle\u0060);\n }\n }\n }\n },\n function (args) {\n const modulesMap = ccf.kv[\u0022public:ccf.gov.modules\u0022];\n const endpointsMap = ccf.kv[\u0022public:ccf.gov.endpoints\u0022];\n // kv should expose .clear()\n modulesMap.forEach((_, k) =\u003E {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, k) =\u003E {\n endpointsMap.delete(k);\n });\n\n const bundle = args.bundle;\n for (const module of bundle.modules) {\n const path = \u0022/\u0022 \u002B module.name;\n const pathBuf = ccf.strToBuf(path);\n const moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, moduleBuf);\n }\n\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) {\n for (const [method, info] of Object.entries(endpoint)) {\n const key = \u0060${method.toUpperCase()} ${url}\u0060;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module = \u0022/\u0022 \u002B info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, infoBuf);\n }\n }\n }\n ),\n ],\n [\n \u0022remove_js_app\u0022,\n new Action(\n function (args) { },\n function (args) {\n const modulesMap = ccf.kv[\u0022public:ccf.gov.modules\u0022];\n const endpointsMap = ccf.kv[\u0022public:ccf.gov.endpoints\u0022];\n // kv should expose .clear()\n modulesMap.forEach((_, k) =\u003E {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, k) =\u003E {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \u0022set_ca_cert_bundle\u0022,\n new Action(\n function (args) {\n checkType(args.name, \u0022string\u0022, \u0022name\u0022);\n checkX509CertChain(args.cert_bundle, \u0022cert_bundle\u0022);\n },\n function (args) {\n const name = args.name;\n const bundle = args.cert_bundle;\n const nameBuf = ccf.strToBuf(name);\n const bundleBuf = ccf.jsonCompatibleToBuf(bundle);\n ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].set(nameBuf, bundleBuf);\n }\n ),\n ],\n [\n \u0022remove_ca_cert_bundle\u0022,\n new Action(\n function (args) {\n checkType(args.name, \u0022string\u0022, \u0022name\u0022);\n },\n function (args) {\n const name = args.name;\n const nameBuf = ccf.strToBuf(name);\n ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].delete(nameBuf);\n }\n ),\n ],\n [\n \u0022set_jwt_issuer\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n checkType(args.auto_refresh, \u0022boolean?\u0022, \u0022auto_refresh\u0022);\n checkType(args.ca_cert_bundle_name, \u0022string?\u0022, \u0022ca_cert_bundle_name\u0022);\n checkEnum(args.key_filter, [\u0022all\u0022, \u0022sgx\u0022], \u0022key_filter\u0022);\n checkType(args.key_policy, \u0022object?\u0022, \u0022key_policy\u0022);\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \u0022object?\u0022,\n \u0022key_policy.sgx_claims\u0022\n );\n if (args.key_policy.sgx_claims) {\n for (const [name, value] of Object.entries(\n args.key_policy.sgx_claims\n )) {\n checkType(value, \u0022string\u0022, \u0060key_policy.sgx_claims[\u0022${name}\u0022]\u0060);\n }\n }\n }\n checkType(args.jwks, \u0022object?\u0022, \u0022jwks\u0022);\n if (args.jwks) {\n checkJwks(args.jwks, \u0022jwks\u0022);\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) {\n throw new Error(\n \u0022ca_cert_bundle_name is missing but required if auto_refresh is true\u0022\n );\n }\n let url;\n try {\n url = parseUrl(args.issuer);\n } catch (e) {\n throw new Error(\u0022issuer must be a URL if auto_refresh is true\u0022);\n }\n if (url.scheme != \u0022https\u0022) {\n throw new Error(\n \u0022issuer must be a URL starting with https:// if auto_refresh is true\u0022\n );\n }\n if (url.query || url.fragment) {\n throw new Error(\n \u0022issuer must be a URL without query/fragment if auto_refresh is true\u0022\n );\n }\n }\n },\n function (args) {\n if (args.auto_refresh) {\n const caCertBundleName = args.ca_cert_bundle_name;\n const caCertBundleNameBuf = ccf.strToBuf(args.ca_cert_bundle_name);\n if (\n !ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].has(\n caCertBundleNameBuf\n )\n ) {\n throw new Error(\n \u0060No CA cert bundle found with name \u0027${caCertBundleName}\u0027\u0060\n );\n }\n }\n const issuer = args.issuer;\n const jwks = args.jwks;\n delete args.jwks;\n const metadata = args;\n if (jwks) {\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n const issuerBuf = ccf.strToBuf(issuer);\n const metadataBuf = ccf.jsonCompatibleToBuf(metadata);\n ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].set(issuerBuf, metadataBuf);\n }\n ),\n ],\n [\n \u0022set_jwt_public_signing_keys\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n checkJwks(args.jwks, \u0022jwks\u0022);\n },\n function (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const metadataBuf = ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].get(issuerBuf);\n if (metadataBuf === undefined) {\n throw new Error(\u0060issuer ${issuer} not found\u0060);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \u0022remove_jwt_issuer\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n },\n function (args) {\n const issuerBuf = ccf.strToBuf(args.issuer);\n if (!ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].delete(issuerBuf)) {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \u0022add_node_code\u0022,\n new Action(\n function (args) {\n checkType(args.new_code_id, \u0022string\u0022, \u0022new_code_id\u0022);\n checkType(args.existing_code_id, \u0022string\u0022, \u0022existing_code_id\u0022);\n },\n function (args, proposalId) {\n const existingCode = ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if (existingCode === undefined) {\n throw new Error(\u0060Code required to exist is not present: ${args.existing_code_id}\u0060);\n }\n\n const newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\u0022AllowedToJoin\u0022);\n ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].set(newCodeId, ALLOWED);\n\n // Adding a new allowed code ID changes the semantics of any other open proposals, so invalidate them to avoid confusion or malicious vote modification\n invalidateOtherOpenProposals(proposalId);\n }\n ),\n ],\n\n [\n \u0022transition_node_to_trusted\u0022,\n new Action(\n function (args) {\n checkType(args.node_id, \u0022string\u0022, \u0022node_id\u0022);\n },\n function (args) {\n const node = ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].get(\n ccf.strToBuf(args.node_id)\n );\n if (node === undefined) {\n throw new Error(\u0060No such node: ${args.node_id}\u0060);\n }\n const nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === \u0022Pending\u0022) {\n nodeInfo.status = \u0022Trusted\u0022;\n nodeInfo.ledger_secret_seqno = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \u0022remove_node_code\u0022,\n new Action(\n function (args) {\n checkType(args.code_id_to_remove, \u0022string\u0022, \u0022code_id_to_remove\u0022);\n checkType(args.remaining_code_id, \u0022string\u0022, \u0022remaining_code_id\u0022);\n },\n function (args) {\n const remainingCode = ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if (remainingCode === undefined) {\n throw new Error(\u0060Code required to remain is not present: ${args.remaining_code_id}\u0060);\n }\n\n const codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \u0022remove_node\u0022,\n new Action(\n function (args) {\n checkType(args.node_id, \u0022string\u0022, \u0022node_id\u0022);\n },\n function (args) {\n const node = ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].get(\n ccf.strToBuf(args.node_id)\n );\n if (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status = \u0022Retired\u0022;\n ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \u0022set_service_principal\u0022,\n new Action(\n function (args) {\n checkType(args.id, \u0022string\u0022, \u0022id\u0022);\n checkType(args.data, \u0022object\u0022, \u0022data\u0022);\n },\n function (args) {\n ccf.kv[\u0022public:ccf.gov.service_principals\u0022].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \u0022remove_service_principal\u0022,\n new Action(\n function (args) {\n checkType(args.id, \u0022string\u0022, \u0022id\u0022);\n },\n function (args) {\n ccf.kv[\u0022public:ccf.gov.service_principals\u0022].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\u0022actions\u0022];\n for (const proposed_action of proposed_actions) {\n const definition = actions.get(proposed_action.name);\n definition.apply(proposed_action.args, proposalId);\n }\n}\nfunction getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const value = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(key);\n const info = ccf.bufToJsonCompatible(value);\n return info;\n}\n\n// Returns true if the member is a recovery member.\nfunction isRecoveryMember(memberId) {\n const info = getMemberInfo(memberId);\n if (info.member_data.encryption_pub_key) {\n return true;\n }\n return false;\n}\n\n// Defines which of the members are operators.\nfunction isOperator(memberId) {\n // // Operators cannot be recovery members.\n // if (isRecoveryMember(memberId)) {\n // return false;\n // }\n const info = getMemberInfo(memberId);\n return info.member_data.is_operator;\n}\n\n// Defines actions that can be passed with sole operator input.\nfunction canOperatorPass(action) {\n // To enable code upgrades and disaster recovery for Public Preview, we\u0027ve given the\n // operator member some additional privileges.\n // 1. add/remove node code are required for code upgrades.\n // 2. set_constitution to replace this constitution with a \u0022correct\u0022 one easily later on.\n // 3. set_member to add a new member for privileged operations when we use MHSM keys.\n const allowedOperatorActions = [\n \u0022add_node_code\u0022, // Remove\n \u0022remove_ca_cert_bundle\u0022,\n \u0022remove_jwt_issuer\u0022,\n \u0022remove_node\u0022,\n \u0022remove_node_code\u0022, // Remove\n \u0022remove_service_principal\u0022,\n \u0022remove_user\u0022,\n \u0022remove_user_by_cert\u0022,\n \u0022set_ca_cert_bundle\u0022,\n \u0022set_constitution\u0022, // Remove\n \u0022set_js_app\u0022,\n \u0022set_jwt_issuer\u0022,\n \u0022set_jwt_public_signing_keys\u0022,\n \u0022set_member\u0022, // Remove\n \u0022set_service_principal\u0022,\n \u0022set_user\u0022,\n \u0022set_user_data\u0022,\n \u0022transition_node_to_trusted\u0022,\n \u0022transition_service_to_open\u0022\n ];\n\n if (allowedOperatorActions.includes(action.name)) {\n return true;\n }\n // Additionally, operators can add or retire other operators.\n if (action.name === \u0022set_member\u0022) {\n const memberData = action.args[\u0022member_data\u0022];\n if (memberData \u0026\u0026 memberData.is_operator) {\n return true;\n }\n } else if (action.name === \u0022remove_member\u0022) {\n if (isOperator(action.args.member_id)) {\n return true;\n }\n }\n return false;\n}\n\nexport function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\u0022actions\u0022];\n\n // Count member votes.\n const memberVoteCount = votes.filter(\n (v) =\u003E v.vote \u0026\u0026 !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding operators.\n let activeMemberCount = 0;\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].forEach((value, key) =\u003E {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if (info.status === \u0022Active\u0022 \u0026\u0026 !isOperator(memberId)) {\n activeMemberCount\u002B\u002B;\n }\n });\n\n // A proposal is an operator change if it\u0027s only applying operator actions.\n const isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members can always accept a proposal.\n if (memberVoteCount \u003E Math.floor(activeMemberCount / 2)) {\n return \u0022Accepted\u0022;\n }\n\n // Operators proposing operator changes can accept them without a vote.\n if (isOperatorChange \u0026\u0026 isOperator(proposerId)) {\n return \u0022Accepted\u0022;\n }\n\n return \u0022Open\u0022;\n}\nexport function validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let position = 0;\n for (const action of proposal[\u0022actions\u0022]) {\n const definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n \u0060${action.name} at position ${position} failed validation: ${e}\\n${e.stack}\u0060\n );\n }\n } else {\n errors.push(\u0060${action.name}: no such action\u0060);\n }\n position\u002B\u002B;\n }\n return { valid: errors.length === 0, description: errors.join(\u0022, \u0022) };\n}\n" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1047716920" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitutionAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitutionAsync.json deleted file mode 100644 index db19db0a8770..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetConstitutionAsync.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "c1d31abb0c0f08bb37488e01ed4a15a0", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:33 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "c1d31abb0c0f08bb37488e01ed4a15a0", - "x-ms-correlation-request-id": "ba67c0b4-dc41-4ab1-9116-03471e48df27", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-pw9xc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "473a6ca78477d6fa2f160798113ba08d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "31381", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.282" - }, - "ResponseBody": { - "digest": "5e3a52df2faa3c42d482f5367c0f2bcddd251f1aaabf07d233ec6f2f5e69b977", - "script": "class Action {\n constructor(validate, apply) {\n this.validate = validate;\n this.apply = apply;\n }\n}\n\nfunction parseUrl(url) {\n // From https://tools.ietf.org/html/rfc3986#appendix-B\n const re = new RegExp(\n \u0022^(([^:/?#]\u002B):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\u0022\n );\n const groups = url.match(re);\n if (!groups) {\n throw new TypeError(\u0060${url} is not a valid URL.\u0060);\n }\n return {\n scheme: groups[2],\n authority: groups[4],\n path: groups[5],\n query: groups[7],\n fragment: groups[9],\n };\n}\n\nfunction checkType(value, type, field) {\n const optional = type.endsWith(\u0022?\u0022);\n if (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type = type.slice(0, -1);\n }\n if (type === \u0022array\u0022) {\n if (!Array.isArray(value)) {\n throw new Error(\u0060${field} must be an array\u0060);\n }\n } else if (type === \u0022integer\u0022) {\n if (!Number.isInteger(value)) {\n throw new Error(\u0060${field} must be an integer\u0060);\n }\n } else if (typeof value !== type) {\n throw new Error(\u0060${field} must be of type ${type} but is ${typeof value}\u0060);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if (!members.includes(value)) {\n throw new Error(\u0060${field} must be one of ${members}\u0060);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if (low !== null \u0026\u0026 value \u003C low) {\n throw new Error(\u0060${field} must be greater than ${low}\u0060);\n }\n if (high !== null \u0026\u0026 value \u003E high) {\n throw new Error(\u0060${field} must be lower than ${high}\u0060);\n }\n}\n\nfunction checkLength(value, min, max, field) {\n if (min !== null \u0026\u0026 value.length \u003C min) {\n throw new Error(\u0060${field} must be an array of minimum ${min} elements\u0060);\n }\n if (max !== null \u0026\u0026 value.length \u003E max) {\n throw new Error(\u0060${field} must be an array of maximum ${max} elements\u0060);\n }\n}\n\nfunction checkNone(args) {\n if (args !== null \u0026\u0026 args !== undefined) {\n throw new Error(\u0060Proposal does not accept any argument, found \u0022${args}\u0022\u0060);\n }\n}\n\nfunction getSingletonKvKey() {\n // When a KV map only contains one value, this is the key at which\n // the value is recorded\n return new ArrayBuffer(8);\n}\n\nfunction getActiveRecoveryMembersCount() {\n let activeRecoveryMembersCount = 0;\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].forEach((_, k) =\u003E {\n let rawMemberInfo = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(k);\n if (rawMemberInfo === undefined) {\n throw new Error(\u0060Recovery member ${ccf.bufToStr(k)} has no information\u0060);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if (memberInfo.status === \u0022Active\u0022) {\n activeRecoveryMembersCount\u002B\u002B;\n }\n });\n return activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, \u0022object\u0022, field);\n checkType(value.keys, \u0022array\u0022, \u0060${field}.keys\u0060);\n for (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \u0022string\u0022, \u0060${field}.keys[${i}].kid\u0060);\n checkType(jwk.kty, \u0022string\u0022, \u0060${field}.keys[${i}].kty\u0060);\n checkType(jwk.x5c, \u0022array\u0022, \u0060${field}.keys[${i}].x5c\u0060);\n checkLength(jwk.x5c, 1, null, \u0060${field}.keys[${i}].x5c\u0060);\n for (const [j, b64der] of jwk.x5c.entries()) {\n checkType(b64der, \u0022string\u0022, \u0060${field}.keys[${i}].x5c[${j}]\u0060);\n const pem =\n \u0022-----BEGIN CERTIFICATE-----\\n\u0022 \u002B\n b64der \u002B\n \u0022\\n-----END CERTIFICATE-----\u0022;\n checkX509CertChain(pem, \u0060${field}.keys[${i}].x5c[${j}]\u0060);\n }\n }\n}\n\nfunction checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) {\n throw new Error(\n \u0060${field} must be a valid X509 certificate (chain) in PEM format\u0060\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) {\n let proposals = ccf.kv[\u0022public:ccf.gov.proposals_info.js\u0022];\n const proposalsMap = ccf.kv[\u0022public:ccf.gov.proposals_info.js\u0022];\n proposalsMap.forEach((v, k) =\u003E {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === \u0022Open\u0022) {\n info.state = \u0022Dropped\u0022;\n proposalsMap.set(k, ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions = new Map([\n [\n \u0022set_constitution\u0022,\n new Action(\n function (args) {\n checkType(args.constitution, \u0022string\u0022);\n },\n function (args, proposalId) {\n ccf.kv[\u0022public:ccf.gov.constitution\u0022].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(args.constitution)\n );\n\n // Changing the constitution changes the semantics of any other open proposals, so invalidate them to avoid confusion or malicious vote modification\n invalidateOtherOpenProposals(proposalId);\n }\n ),\n ],\n [\n \u0022set_member\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n checkType(args.member_data, \u0022object?\u0022, \u0022member_data\u0022);\n // Also check that public encryption key is well formed, if it exists\n },\n\n function (args) {\n const memberId = ccf.pemToId(args.cert);\n const rawMemberId = ccf.strToBuf(memberId);\n\n ccf.kv[\u0022public:ccf.gov.members.certs\u0022].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if (args.encryption_pub_key == null) {\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].delete(\n rawMemberId\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].set(\n rawMemberId,\n ccf.strToBuf(args.encryption_pub_key)\n );\n }\n\n let member_info = {};\n member_info.member_data = args.member_data;\n member_info.status = \u0022Accepted\u0022;\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const rawSignature = ccf.kv[\u0022public:ccf.internal.signatures\u0022].get(\n getSingletonKvKey()\n );\n if (rawSignature === undefined) {\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].set(rawMemberId);\n } else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \u0022remove_member\u0022,\n new Action(\n function (args) {\n checkType(args.member_id, \u0022string\u0022, \u0022member_id\u0022);\n },\n function (args) {\n const rawMemberId = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(\n rawMemberId\n );\n if (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember = memberInfo.status == \u0022Active\u0022;\n\n const isRecoveryMember = ccf.kv[\n \u0022public:ccf.gov.members.encryption_public_keys\u0022\n ].has(rawMemberId)\n ? true\n : false;\n\n // If the member is an active recovery member, check that there\n // would still be a sufficient number of recovery members left\n // to recover the service\n if (isActiveMember \u0026\u0026 isRecoveryMember) {\n const rawConfig = ccf.kv[\u0022public:ccf.gov.service.config\u0022].get(\n getSingletonKvKey()\n );\n if (rawConfig === undefined) {\n throw new Error(\u0022Service configuration could not be found\u0022);\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - 1;\n if (activeRecoveryMembersCountAfter \u003C config.recovery_threshold) {\n throw new Error(\n \u0060Number of active recovery members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold (${config.recovery_threshold})\u0060\n );\n }\n }\n\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.members.encryption_public_keys\u0022].delete(\n rawMemberId\n );\n ccf.kv[\u0022public:ccf.gov.members.certs\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.members.acks\u0022].delete(rawMemberId);\n ccf.kv[\u0022public:ccf.gov.history\u0022].delete(rawMemberId);\n\n if (isActiveMember \u0026\u0026 isRecoveryMember) {\n // A retired recovery member should not have access to the private\n // ledger going forward so rekey the ledger, issuing new shares to\n // remaining active recovery members\n ccf.node.triggerLedgerRekey();\n }\n }\n ),\n ],\n [\n \u0022set_member_data\u0022,\n new Action(\n function (args) {\n checkType(args.member_id, \u0022string\u0022, \u0022member_id\u0022);\n checkType(args.member_data, \u0022object\u0022, \u0022member_data\u0022);\n },\n\n function (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let members_info = ccf.kv[\u0022public:ccf.gov.members.info\u0022];\n let member_info = members_info.get(member_id);\n if (member_info === undefined) {\n throw new Error(\u0060Member ${args.member_id} does not exist\u0060);\n }\n let mi = ccf.bufToJsonCompatible(member_info);\n mi.member_data = args.member_data;\n members_info.set(member_id, ccf.jsonCompatibleToBuf(mi));\n }\n ),\n ],\n [\n \u0022set_user\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n checkType(args.user_data, \u0022object?\u0022, \u0022user_data\u0022);\n },\n function (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if (args.user_data !== null \u0026\u0026 args.user_data !== undefined) {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \u0022remove_user\u0022,\n new Action(\n function (args) {\n checkType(args.user_id, \u0022string\u0022, \u0022user_id\u0022);\n },\n function (args) {\n const user_id = ccf.strToBuf(args.user_id);\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].delete(user_id);\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(user_id);\n }\n ),\n ],\n [\n \u0022remove_user_by_cert\u0022,\n new Action(\n function (args) {\n checkX509CertChain(args.cert, \u0022cert\u0022);\n },\n function (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\u0022public:ccf.gov.users.certs\u0022].delete(\n rawUserId\n );\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(rawUserId);\n }\n ),\n ],\n [\n \u0022set_user_data\u0022,\n new Action(\n function (args) {\n checkType(args.user_id, \u0022string\u0022, \u0022user_id\u0022);\n checkType(args.user_data, \u0022object?\u0022, \u0022user_data\u0022);\n },\n function (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if (args.user_data !== null \u0026\u0026 args.user_data !== undefined) {\n let userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } else {\n ccf.kv[\u0022public:ccf.gov.users.info\u0022].delete(userId);\n }\n }\n ),\n ],\n [\n \u0022set_recovery_threshold\u0022,\n new Action(\n function (args) {\n checkType(args.recovery_threshold, \u0022integer\u0022, \u0022threshold\u0022);\n checkBounds(args.recovery_threshold, 1, 254, \u0022threshold\u0022);\n },\n function (args) {\n const rawConfig = ccf.kv[\u0022public:ccf.gov.service.config\u0022].get(\n getSingletonKvKey()\n );\n if (rawConfig === undefined) {\n throw new Error(\u0022Service configuration could not be found\u0022);\n }\n\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n if (args.recovery_threshold === config.recovery_threshold) {\n return; // No effect\n }\n\n const rawService = ccf.kv[\u0022public:ccf.gov.service.info\u0022].get(\n getSingletonKvKey()\n );\n if (rawService === undefined) {\n throw new Error(\u0022Service information could not be found\u0022);\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === \u0022WaitingForRecoveryShares\u0022) {\n throw new Error(\n \u0060Cannot set recovery threshold if service is ${service.status}\u0060\n );\n } else if (service.status === \u0022Open\u0022) {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if (args.recovery_threshold \u003E activeRecoveryMembersCount) {\n throw new Error(\n \u0060Cannot set recovery threshold to ${args.recovery_threshold}: recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}\u0060\n );\n }\n }\n\n config.recovery_threshold = args.recovery_threshold;\n ccf.kv[\u0022public:ccf.gov.service.config\u0022].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \u0022trigger_recovery_shares_refresh\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n function (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \u0022trigger_ledger_rekey\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n\n function (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \u0022transition_service_to_open\u0022,\n new Action(\n function (args) {\n checkNone(args);\n },\n\n function (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \u0022set_js_app\u0022,\n new Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, \u0022object\u0022, \u0022bundle\u0022);\n\n let prefix = \u0022bundle.modules\u0022;\n checkType(bundle.modules, \u0022array\u0022, prefix);\n for (const [i, module] of bundle.modules.entries()) {\n checkType(module, \u0022object\u0022, \u0060${prefix}[${i}]\u0060);\n checkType(module.name, \u0022string\u0022, \u0060${prefix}[${i}].name\u0060);\n checkType(module.module, \u0022string\u0022, \u0060${prefix}[${i}].module\u0060);\n }\n\n prefix = \u0022bundle.metadata\u0022;\n checkType(bundle.metadata, \u0022object\u0022, prefix);\n checkType(bundle.metadata.endpoints, \u0022object\u0022, \u0060${prefix}.endpoints\u0060);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) {\n checkType(endpoint, \u0022object\u0022, \u0060${prefix}.endpoints[\u0022${url}\u0022]\u0060);\n for (const [method, info] of Object.entries(endpoint)) {\n const prefix2 = \u0060${prefix}.endpoints[\u0022${url}\u0022][\u0022${method}\u0022]\u0060;\n checkType(info, \u0022object\u0022, prefix2);\n checkType(info.js_module, \u0022string\u0022, \u0060${prefix2}.js_module\u0060);\n checkType(info.js_function, \u0022string\u0022, \u0060${prefix2}.js_function\u0060);\n checkEnum(\n info.mode,\n [\u0022readwrite\u0022, \u0022readonly\u0022, \u0022historical\u0022],\n \u0060${prefix2}.mode\u0060\n );\n checkEnum(\n info.forwarding_required,\n [\u0022sometimes\u0022, \u0022always\u0022, \u0022never\u0022],\n \u0060${prefix2}.forwarding_required\u0060\n );\n checkType(info.openapi, \u0022object?\u0022, \u0060${prefix2}.openapi\u0060);\n checkType(\n info.openapi_hidden,\n \u0022boolean?\u0022,\n \u0060${prefix2}.openapi_hidden\u0060\n );\n checkType(\n info.authn_policies,\n \u0022array\u0022,\n \u0060${prefix2}.authn_policies\u0060\n );\n for (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, \u0022string\u0022, \u0060${prefix2}.authn_policies[${i}]\u0060);\n }\n if (!bundle.modules.some((m) =\u003E m.name === info.js_module)) {\n throw new Error(\u0060module \u0027${info.js_module}\u0027 not found in bundle\u0060);\n }\n }\n }\n },\n function (args) {\n const modulesMap = ccf.kv[\u0022public:ccf.gov.modules\u0022];\n const endpointsMap = ccf.kv[\u0022public:ccf.gov.endpoints\u0022];\n // kv should expose .clear()\n modulesMap.forEach((_, k) =\u003E {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, k) =\u003E {\n endpointsMap.delete(k);\n });\n\n const bundle = args.bundle;\n for (const module of bundle.modules) {\n const path = \u0022/\u0022 \u002B module.name;\n const pathBuf = ccf.strToBuf(path);\n const moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, moduleBuf);\n }\n\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) {\n for (const [method, info] of Object.entries(endpoint)) {\n const key = \u0060${method.toUpperCase()} ${url}\u0060;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module = \u0022/\u0022 \u002B info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, infoBuf);\n }\n }\n }\n ),\n ],\n [\n \u0022remove_js_app\u0022,\n new Action(\n function (args) { },\n function (args) {\n const modulesMap = ccf.kv[\u0022public:ccf.gov.modules\u0022];\n const endpointsMap = ccf.kv[\u0022public:ccf.gov.endpoints\u0022];\n // kv should expose .clear()\n modulesMap.forEach((_, k) =\u003E {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, k) =\u003E {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \u0022set_ca_cert_bundle\u0022,\n new Action(\n function (args) {\n checkType(args.name, \u0022string\u0022, \u0022name\u0022);\n checkX509CertChain(args.cert_bundle, \u0022cert_bundle\u0022);\n },\n function (args) {\n const name = args.name;\n const bundle = args.cert_bundle;\n const nameBuf = ccf.strToBuf(name);\n const bundleBuf = ccf.jsonCompatibleToBuf(bundle);\n ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].set(nameBuf, bundleBuf);\n }\n ),\n ],\n [\n \u0022remove_ca_cert_bundle\u0022,\n new Action(\n function (args) {\n checkType(args.name, \u0022string\u0022, \u0022name\u0022);\n },\n function (args) {\n const name = args.name;\n const nameBuf = ccf.strToBuf(name);\n ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].delete(nameBuf);\n }\n ),\n ],\n [\n \u0022set_jwt_issuer\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n checkType(args.auto_refresh, \u0022boolean?\u0022, \u0022auto_refresh\u0022);\n checkType(args.ca_cert_bundle_name, \u0022string?\u0022, \u0022ca_cert_bundle_name\u0022);\n checkEnum(args.key_filter, [\u0022all\u0022, \u0022sgx\u0022], \u0022key_filter\u0022);\n checkType(args.key_policy, \u0022object?\u0022, \u0022key_policy\u0022);\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \u0022object?\u0022,\n \u0022key_policy.sgx_claims\u0022\n );\n if (args.key_policy.sgx_claims) {\n for (const [name, value] of Object.entries(\n args.key_policy.sgx_claims\n )) {\n checkType(value, \u0022string\u0022, \u0060key_policy.sgx_claims[\u0022${name}\u0022]\u0060);\n }\n }\n }\n checkType(args.jwks, \u0022object?\u0022, \u0022jwks\u0022);\n if (args.jwks) {\n checkJwks(args.jwks, \u0022jwks\u0022);\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) {\n throw new Error(\n \u0022ca_cert_bundle_name is missing but required if auto_refresh is true\u0022\n );\n }\n let url;\n try {\n url = parseUrl(args.issuer);\n } catch (e) {\n throw new Error(\u0022issuer must be a URL if auto_refresh is true\u0022);\n }\n if (url.scheme != \u0022https\u0022) {\n throw new Error(\n \u0022issuer must be a URL starting with https:// if auto_refresh is true\u0022\n );\n }\n if (url.query || url.fragment) {\n throw new Error(\n \u0022issuer must be a URL without query/fragment if auto_refresh is true\u0022\n );\n }\n }\n },\n function (args) {\n if (args.auto_refresh) {\n const caCertBundleName = args.ca_cert_bundle_name;\n const caCertBundleNameBuf = ccf.strToBuf(args.ca_cert_bundle_name);\n if (\n !ccf.kv[\u0022public:ccf.gov.tls.ca_cert_bundles\u0022].has(\n caCertBundleNameBuf\n )\n ) {\n throw new Error(\n \u0060No CA cert bundle found with name \u0027${caCertBundleName}\u0027\u0060\n );\n }\n }\n const issuer = args.issuer;\n const jwks = args.jwks;\n delete args.jwks;\n const metadata = args;\n if (jwks) {\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n const issuerBuf = ccf.strToBuf(issuer);\n const metadataBuf = ccf.jsonCompatibleToBuf(metadata);\n ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].set(issuerBuf, metadataBuf);\n }\n ),\n ],\n [\n \u0022set_jwt_public_signing_keys\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n checkJwks(args.jwks, \u0022jwks\u0022);\n },\n function (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const metadataBuf = ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].get(issuerBuf);\n if (metadataBuf === undefined) {\n throw new Error(\u0060issuer ${issuer} not found\u0060);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \u0022remove_jwt_issuer\u0022,\n new Action(\n function (args) {\n checkType(args.issuer, \u0022string\u0022, \u0022issuer\u0022);\n },\n function (args) {\n const issuerBuf = ccf.strToBuf(args.issuer);\n if (!ccf.kv[\u0022public:ccf.gov.jwt.issuers\u0022].delete(issuerBuf)) {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \u0022add_node_code\u0022,\n new Action(\n function (args) {\n checkType(args.new_code_id, \u0022string\u0022, \u0022new_code_id\u0022);\n checkType(args.existing_code_id, \u0022string\u0022, \u0022existing_code_id\u0022);\n },\n function (args, proposalId) {\n const existingCode = ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if (existingCode === undefined) {\n throw new Error(\u0060Code required to exist is not present: ${args.existing_code_id}\u0060);\n }\n\n const newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\u0022AllowedToJoin\u0022);\n ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].set(newCodeId, ALLOWED);\n\n // Adding a new allowed code ID changes the semantics of any other open proposals, so invalidate them to avoid confusion or malicious vote modification\n invalidateOtherOpenProposals(proposalId);\n }\n ),\n ],\n\n [\n \u0022transition_node_to_trusted\u0022,\n new Action(\n function (args) {\n checkType(args.node_id, \u0022string\u0022, \u0022node_id\u0022);\n },\n function (args) {\n const node = ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].get(\n ccf.strToBuf(args.node_id)\n );\n if (node === undefined) {\n throw new Error(\u0060No such node: ${args.node_id}\u0060);\n }\n const nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === \u0022Pending\u0022) {\n nodeInfo.status = \u0022Trusted\u0022;\n nodeInfo.ledger_secret_seqno = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \u0022remove_node_code\u0022,\n new Action(\n function (args) {\n checkType(args.code_id_to_remove, \u0022string\u0022, \u0022code_id_to_remove\u0022);\n checkType(args.remaining_code_id, \u0022string\u0022, \u0022remaining_code_id\u0022);\n },\n function (args) {\n const remainingCode = ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if (remainingCode === undefined) {\n throw new Error(\u0060Code required to remain is not present: ${args.remaining_code_id}\u0060);\n }\n\n const codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\u0022public:ccf.gov.nodes.code_ids\u0022].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \u0022remove_node\u0022,\n new Action(\n function (args) {\n checkType(args.node_id, \u0022string\u0022, \u0022node_id\u0022);\n },\n function (args) {\n const node = ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].get(\n ccf.strToBuf(args.node_id)\n );\n if (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status = \u0022Retired\u0022;\n ccf.kv[\u0022public:ccf.gov.nodes.info\u0022].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \u0022set_service_principal\u0022,\n new Action(\n function (args) {\n checkType(args.id, \u0022string\u0022, \u0022id\u0022);\n checkType(args.data, \u0022object\u0022, \u0022data\u0022);\n },\n function (args) {\n ccf.kv[\u0022public:ccf.gov.service_principals\u0022].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \u0022remove_service_principal\u0022,\n new Action(\n function (args) {\n checkType(args.id, \u0022string\u0022, \u0022id\u0022);\n },\n function (args) {\n ccf.kv[\u0022public:ccf.gov.service_principals\u0022].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\u0022actions\u0022];\n for (const proposed_action of proposed_actions) {\n const definition = actions.get(proposed_action.name);\n definition.apply(proposed_action.args, proposalId);\n }\n}\nfunction getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const value = ccf.kv[\u0022public:ccf.gov.members.info\u0022].get(key);\n const info = ccf.bufToJsonCompatible(value);\n return info;\n}\n\n// Returns true if the member is a recovery member.\nfunction isRecoveryMember(memberId) {\n const info = getMemberInfo(memberId);\n if (info.member_data.encryption_pub_key) {\n return true;\n }\n return false;\n}\n\n// Defines which of the members are operators.\nfunction isOperator(memberId) {\n // // Operators cannot be recovery members.\n // if (isRecoveryMember(memberId)) {\n // return false;\n // }\n const info = getMemberInfo(memberId);\n return info.member_data.is_operator;\n}\n\n// Defines actions that can be passed with sole operator input.\nfunction canOperatorPass(action) {\n // To enable code upgrades and disaster recovery for Public Preview, we\u0027ve given the\n // operator member some additional privileges.\n // 1. add/remove node code are required for code upgrades.\n // 2. set_constitution to replace this constitution with a \u0022correct\u0022 one easily later on.\n // 3. set_member to add a new member for privileged operations when we use MHSM keys.\n const allowedOperatorActions = [\n \u0022add_node_code\u0022, // Remove\n \u0022remove_ca_cert_bundle\u0022,\n \u0022remove_jwt_issuer\u0022,\n \u0022remove_node\u0022,\n \u0022remove_node_code\u0022, // Remove\n \u0022remove_service_principal\u0022,\n \u0022remove_user\u0022,\n \u0022remove_user_by_cert\u0022,\n \u0022set_ca_cert_bundle\u0022,\n \u0022set_constitution\u0022, // Remove\n \u0022set_js_app\u0022,\n \u0022set_jwt_issuer\u0022,\n \u0022set_jwt_public_signing_keys\u0022,\n \u0022set_member\u0022, // Remove\n \u0022set_service_principal\u0022,\n \u0022set_user\u0022,\n \u0022set_user_data\u0022,\n \u0022transition_node_to_trusted\u0022,\n \u0022transition_service_to_open\u0022\n ];\n\n if (allowedOperatorActions.includes(action.name)) {\n return true;\n }\n // Additionally, operators can add or retire other operators.\n if (action.name === \u0022set_member\u0022) {\n const memberData = action.args[\u0022member_data\u0022];\n if (memberData \u0026\u0026 memberData.is_operator) {\n return true;\n }\n } else if (action.name === \u0022remove_member\u0022) {\n if (isOperator(action.args.member_id)) {\n return true;\n }\n }\n return false;\n}\n\nexport function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\u0022actions\u0022];\n\n // Count member votes.\n const memberVoteCount = votes.filter(\n (v) =\u003E v.vote \u0026\u0026 !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding operators.\n let activeMemberCount = 0;\n ccf.kv[\u0022public:ccf.gov.members.info\u0022].forEach((value, key) =\u003E {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if (info.status === \u0022Active\u0022 \u0026\u0026 !isOperator(memberId)) {\n activeMemberCount\u002B\u002B;\n }\n });\n\n // A proposal is an operator change if it\u0027s only applying operator actions.\n const isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members can always accept a proposal.\n if (memberVoteCount \u003E Math.floor(activeMemberCount / 2)) {\n return \u0022Accepted\u0022;\n }\n\n // Operators proposing operator changes can accept them without a vote.\n if (isOperatorChange \u0026\u0026 isOperator(proposerId)) {\n return \u0022Accepted\u0022;\n }\n\n return \u0022Open\u0022;\n}\nexport function validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let position = 0;\n for (const action of proposal[\u0022actions\u0022]) {\n const definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n \u0060${action.name} at position ${position} failed validation: ${e}\\n${e.stack}\u0060\n );\n }\n } else {\n errors.push(\u0060${action.name}: no such action\u0060);\n }\n position\u002B\u002B;\n }\n return { valid: errors.length === 0, description: errors.join(\u0022, \u0022) };\n}\n" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1697413609" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntry.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntry.json deleted file mode 100644 index c6cf8c51c7a1..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntry.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "72c18bd5838a5423523c8f4a895e83f1", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:24:54 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "72c18bd5838a5423523c8f4a895e83f1", - "x-ms-correlation-request-id": "a7a5b7c1-3baf-4dc7-8d8b-e32ea49f8023", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "7fc74124a4fe881c6d690c9025d8d881", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test7509" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.68", - "x-ms-client-request-id": "7fc74124a4fe881c6d690c9025d8d881", - "x-ms-request-id": "1292228960" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.68/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "39bece29de961b0b3ce55985a22656cc", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.68", - "x-ms-client-request-id": "39bece29de961b0b3ce55985a22656cc", - "x-ms-request-id": "418308697" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.68" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.68/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "40f755e6ec77e6d6a4e91c1a16c42d64", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.69", - "x-ms-client-request-id": "40f755e6ec77e6d6a4e91c1a16c42d64", - "x-ms-request-id": "1592986211" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.68" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "8f5fc8b6b8c5459236ac42194a96e647", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "74", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.69", - "x-ms-client-request-id": "8f5fc8b6b8c5459236ac42194a96e647", - "x-ms-request-id": "320030509" - }, - "ResponseBody": { - "contents": "test7509", - "subLedgerId": "subledger:0", - "transactionId": "2.69" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "3298544" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntryAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntryAsync.json deleted file mode 100644 index 0c755d4df5a4..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetCurrentLedgerEntryAsync.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "5976c995308f2555b0df7b3509349364", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:23 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "5976c995308f2555b0df7b3509349364", - "x-ms-correlation-request-id": "3910a663-c1ac-4450-a399-5717b4d66ced", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "8ae3312e35787c8dd3c06175ffa651fb", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test4186" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.97", - "x-ms-client-request-id": "8ae3312e35787c8dd3c06175ffa651fb", - "x-ms-request-id": "1659337933" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.97/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "4c1f02a779b7e68438adb24711679029", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.98", - "x-ms-client-request-id": "4c1f02a779b7e68438adb24711679029", - "x-ms-request-id": "538442695" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.97" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.97/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e982a0f035d4931de9ddbc70f4b0b138", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.98", - "x-ms-client-request-id": "e982a0f035d4931de9ddbc70f4b0b138", - "x-ms-request-id": "671385311" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.97" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "32623a2a1874b59facfd52cb83466b6b", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "74", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.98", - "x-ms-client-request-id": "32623a2a1874b59facfd52cb83466b6b", - "x-ms-request-id": "860261041" - }, - "ResponseBody": { - "contents": "test4186", - "subLedgerId": "subledger:0", - "transactionId": "2.98" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "343417794" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotes.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotes.json deleted file mode 100644 index 5fc918c7456b..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotes.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "4a9446e9e2a2fcea840ee52ba6d3ba9d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:20 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "4a9446e9e2a2fcea840ee52ba6d3ba9d", - "x-ms-correlation-request-id": "8b00ba0b-45db-424e-a70c-1d1a392cc04d", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-pw9xc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "8b4dcbf84891fd9187ca82f064678638", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "28970", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.269" - }, - "ResponseBody": { - "currentNodeId": "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c", - "enclaveQuotes": { - "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f06071b219d67769738f9eb0106d00efb56d30000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe5dc6ceb983605174ec5d3671a292e395c0164f287cd86a96ced5986cd058f00000000000000000000000000000000000000000000000000000000000000004410000046ba7a83bd1d9af8ec9c894cd5c5b00c4f09a9ff6a509c2f1abe47f64b197f58f8c01e1f662e2bbd000e556fd91ffabbf863fa29390a9fa6869fd98eddf8d829f5a1dd72cf71b01ba6a45be71afd8f09f519113ade960b475f610caabd9215190c24b7a515821a693d4ea1de5569e6c9dbb572734646dc19d9c970b16a4d5c9311110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de31590f636213c7469606dd78e4b4b8ceba1f749bbeba49ce1501be47dcc0d70000000000000000000000000000000000000000000000000000000000000000961ea726312b5c8d93e8f3a2dcbe72591ee31d3c4defe3b2d7dacb90c55d9501812e7ef681d37ddb9b2e7f58b87e336fa55316e858f4d9c16ad8372c2a0747232000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a6a4343424453674177494241674956414a2f744b624238794e3863355a5051706d42794d6a49794e6178644d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d5441324d5463774d44517a4e544261467730794f4441324d5463774d44517a0a4e5442614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4e6571743858384c4263787263345a6166584f3852686d654e6e6e3572356b794654314448626154585873306d4773594642424974445a64504e324e415741680a4a364a50663757754c71415447302b6169706e4a49714f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f42425945464436346b744335756779544e3942735137316f0a666e56682f526c724d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151454b68783257586b7948475468586c767973796454544343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e49414442464169427a0a506455346a5934523055454b4f42706b727330376e4d746f61714b6e30564b4d487a5a474977667452514968414c4d627a595249597347516148566937376f780a78786d6a6737583963597173544572396a57597641504f4a0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c" - }, - "6d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "6d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f06076b2d41c5a1eaa45c986e6943553bb5f80000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004916f47ea44d48cb2f02859b90614a20bf9df1f35481fceb739a42d54a03e25700000000000000000000000000000000000000000000000000000000000000004410000089441aa44c146fc26f9ecff8cf6a888cbd06e454076a191c365cf8cd7fd0e9489af4c489e26e2a011be1701d6ad1ba0789353ad55c81c58cd7e39138d7f0e81fffd24d62b47efebf3d1c7c224a7c361d1484297f7bb83e434e8c780941e843a162a6e2c09d44b0e2625f43c9afcc6d0edbf1a338c6365f556528e815c04de14b11110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000963f15f6f61635a4ae906f757d8f05cab15da24a1130bffc69d3483fb2dfd54a00000000000000000000000000000000000000000000000000000000000000005d6b60ac6b6d7ebd01ca3e13f54d49ce5a40b01f43c84b61ac378e3aed0b373a8b0e6db1fced492e1acd4b07fefd0fb2c304feaf30a4a9625b56862d6de5da4e2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a6a434342444f6741774942416749554763652f724e6b59526c476e5335654d764d66395643565243553477436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4459784e7a41784d5467784d466f58445449344d4459784e7a41784d5467780a4d466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414154590a4e70343553354231584f614e47624359447649436a7342597534734a73444951434456576b79756234375462656336556232747459327262725045506d5744410a554b676577557031655a596430654866444a4a6d6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751556a4e3763452b324830556d4a36745679444f2b530a536b49332b47497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b4530424451454242424463507943335739566761657777366870784858557a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d4341306b414d455943495143380a61335332436e4e6e2f3879392f4c776a496a3542566f4c4141544e3962464b77616e70366a7479655a674968414c6f4969456d7162485842676d2f4442676d310a6c43367261474152596a4e6277536563343534637a61796c0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c" - }, - "c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f060730079a55b5331eb4a5d975fadff4c69c0000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005e0e44e09b934c5810c53e0e3b2db6646a9278cede6ec6c368daa5b47da36f180000000000000000000000000000000000000000000000000000000000000000481000008287a8061d7612c3502eb1a743a4b1c7c699f75bae42388b731c36583fd49493ac01d232610b36b827dc1283bdad9d6f1860b80d01b8d81f019eba9edb231b9212ebdbb9804249231d0a4a88d285abb6734d6439bcec90d4e3dc4f35ae599b3f08e506cfaf93f67dfc6546c287e0de6c6cfc3413a1e630d5e4a327b585d44c5311110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e86b9d3fd65342b71edd1e20833c3277bac23cb68ed2e16f922c8a090c2f46400000000000000000000000000000000000000000000000000000000000000003d8e6baa320d87752dbc38c776ae81d5b089d1890e8f189b8bf66d55dc89eed5cf176a2329109cd4f93de0cfbf89b7672e47aa4d81867ff231ce80b669c4000a2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500e00d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a7a4343424453674177494241674956414f6c5770567a497a6c5957565a445268784a7049764267594758444d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d5441324d5463774d44517a4d445a61467730794f4441324d5463774d44517a0a4d445a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a6c346c4b556c64434b31647968694a717654434b6b6267717633676c6b4e786833674371656632687650464b6c767a6a78686c492f79576f53586e714b4e4a4f0a717038417258565431516f3848762f6e5a697a77754b4f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f424259454644676b6e7a5776727138704d714d70326257360a484a6f7079434f344d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151766c4247636674426a4f394d5a4944497734654643444343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e4a41444247416945410a346e4f4a526641774c55726d63567939444f383630434b3564634a426b33684554345336356b7530723551434951446c50594f6a38336c422b366344517a75640a7561377a792b41354156376343574b6a364f44444e30333674413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0" - } - } - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "94451894" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotesAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotesAsync.json deleted file mode 100644 index 7ebd1f896159..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetEnclaveQuotesAsync.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "df65954aff9b5903c465907a969cde8c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Aug 2021 22:09:35 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "df65954aff9b5903c465907a969cde8c", - "x-ms-correlation-request-id": "2f8afa9f-c389-427b-8a63-c3bd20f25424", - "x-ms-image-digest": "sha256:cfd1fe780509aad0087f6cacc65bff18dd7ac4f9eff38afba2b63a29d033c639", - "x-ms-image-tag": "latest-20210802174905559-04aa2284", - "x-ms-machineName": "identityservice-6dbf458c55-sqlm5" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBezCCASCgAwIBAgIQLyPJdcq/69suz\u002BxDKJiUizAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMTAzMTEwMDAwMDBaFw0yMzA2MTEyMzU5\nNTlaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEZQGlfAdHO0Oho9svJtDF\u002Bk1bHrr5ovZVaMriVKbh\u002BsXWipS4JtskCX4T\nW8/tvn8mGNJVfPM7nA62TZCxxm5Y56NQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUnWCB9yR6vxrJAYs0k67drBKAiqgwHwYDVR0jBBgwFoAUnWCB9yR6vxrJAYs0\nk67drBKAiqgwCgYIKoZIzj0EAwIDSQAwRgIhAMdUll14tgGweqASveLxl4HW2SBC\nllJvvz480pTy5uQ1AiEA0Spywkvu9t6qHYO\u002BJERRXCMWVTESPDJkMXGOMY/0xvs=\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20210824.1", - "(.NET 5.0.9; Microsoft Windows 10.0.19043)" - ], - "x-ms-client-request-id": "318447560d339ff42eeca9315f873b2b", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "28970", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.284" - }, - "ResponseBody": { - "currentNodeId": "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c", - "enclaveQuotes": { - "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f06071b219d67769738f9eb0106d00efb56d30000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe5dc6ceb983605174ec5d3671a292e395c0164f287cd86a96ced5986cd058f00000000000000000000000000000000000000000000000000000000000000004410000046ba7a83bd1d9af8ec9c894cd5c5b00c4f09a9ff6a509c2f1abe47f64b197f58f8c01e1f662e2bbd000e556fd91ffabbf863fa29390a9fa6869fd98eddf8d829f5a1dd72cf71b01ba6a45be71afd8f09f519113ade960b475f610caabd9215190c24b7a515821a693d4ea1de5569e6c9dbb572734646dc19d9c970b16a4d5c9311110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de31590f636213c7469606dd78e4b4b8ceba1f749bbeba49ce1501be47dcc0d70000000000000000000000000000000000000000000000000000000000000000961ea726312b5c8d93e8f3a2dcbe72591ee31d3c4defe3b2d7dacb90c55d9501812e7ef681d37ddb9b2e7f58b87e336fa55316e858f4d9c16ad8372c2a0747232000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a6a4343424453674177494241674956414a2f744b624238794e3863355a5051706d42794d6a49794e6178644d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d5441324d5463774d44517a4e544261467730794f4441324d5463774d44517a0a4e5442614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4e6571743858384c4263787263345a6166584f3852686d654e6e6e3572356b794654314448626154585873306d4773594642424974445a64504e324e415741680a4a364a50663757754c71415447302b6169706e4a49714f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f42425945464436346b744335756779544e3942735137316f0a666e56682f526c724d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151454b68783257586b7948475468586c767973796454544343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e49414442464169427a0a506455346a5934523055454b4f42706b727330376e4d746f61714b6e30564b4d487a5a474977667452514968414c4d627a595249597347516148566937376f780a78786d6a6737583963597173544572396a57597641504f4a0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100616644c41bfa3adc07af197f1e6586edab1709e224f40981b4645cd17d46dd0c" - }, - "6d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "6d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f06076b2d41c5a1eaa45c986e6943553bb5f80000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004916f47ea44d48cb2f02859b90614a20bf9df1f35481fceb739a42d54a03e25700000000000000000000000000000000000000000000000000000000000000004410000089441aa44c146fc26f9ecff8cf6a888cbd06e454076a191c365cf8cd7fd0e9489af4c489e26e2a011be1701d6ad1ba0789353ad55c81c58cd7e39138d7f0e81fffd24d62b47efebf3d1c7c224a7c361d1484297f7bb83e434e8c780941e843a162a6e2c09d44b0e2625f43c9afcc6d0edbf1a338c6365f556528e815c04de14b11110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000963f15f6f61635a4ae906f757d8f05cab15da24a1130bffc69d3483fb2dfd54a00000000000000000000000000000000000000000000000000000000000000005d6b60ac6b6d7ebd01ca3e13f54d49ce5a40b01f43c84b61ac378e3aed0b373a8b0e6db1fced492e1acd4b07fefd0fb2c304feaf30a4a9625b56862d6de5da4e2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a6a434342444f6741774942416749554763652f724e6b59526c476e5335654d764d66395643565243553477436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4459784e7a41784d5467784d466f58445449344d4459784e7a41784d5467780a4d466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414154590a4e70343553354231584f614e47624359447649436a7342597534734a73444951434456576b79756234375462656336556232747459327262725045506d5744410a554b676577557031655a596430654866444a4a6d6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751556a4e3763452b324830556d4a36745679444f2b530a536b49332b47497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b4530424451454242424463507943335739566761657777366870784858557a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d4341306b414d455943495143380a61335332436e4e6e2f3879392f4c776a496a3542566f4c4141544e3962464b77616e70366a7479655a674968414c6f4969456d7162485842676d2f4442676d310a6c43367261474152596a4e6277536563343534637a61796c0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006d0cbe591f71d44d294e3c4b3498a050526de925a72b17ba4e6d28ced285f98c" - }, - "c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0": { - "mrenclave": "8a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe", - "nodeId": "c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0", - "quoteVersion": "OE_SGX_v1", - "raw": "030002000000000006000b00939a7233f79c4ca9940a0db3957f060730079a55b5331eb4a5d975fadff4c69c0000000011110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000007000000000000008a047f788c73e1637f12349dd7d3d7561b58c7d1ce35ec06ca84cae4be47eefe000000000000000000000000000000000000000000000000000000000000000057f40d1e14b92ed443bd97a39f4ece44df37b833a8bb4ad9d44dacd82b36dacf000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005e0e44e09b934c5810c53e0e3b2db6646a9278cede6ec6c368daa5b47da36f180000000000000000000000000000000000000000000000000000000000000000481000008287a8061d7612c3502eb1a743a4b1c7c699f75bae42388b731c36583fd49493ac01d232610b36b827dc1283bdad9d6f1860b80d01b8d81f019eba9edb231b9212ebdbb9804249231d0a4a88d285abb6734d6439bcec90d4e3dc4f35ae599b3f08e506cfaf93f67dfc6546c287e0de6c6cfc3413a1e630d5e4a327b585d44c5311110305ff80060000000000000000000000000000000000000000000000000000000000000000000000000000000000150000000000000007000000000000005c60693b938252036d63cf809dad05d2aa1dcd1a4e0ddff9115130bada24263e00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004e86b9d3fd65342b71edd1e20833c3277bac23cb68ed2e16f922c8a090c2f46400000000000000000000000000000000000000000000000000000000000000003d8e6baa320d87752dbc38c776ae81d5b089d1890e8f189b8bf66d55dc89eed5cf176a2329109cd4f93de0cfbf89b7672e47aa4d81867ff231ce80b669c4000a2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500e00d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a7a4343424453674177494241674956414f6c5770567a497a6c5957565a445268784a7049764267594758444d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d5441324d5463774d44517a4d445a61467730794f4441324d5463774d44517a0a4d445a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a6c346c4b556c64434b31647968694a717654434b6b6267717633676c6b4e786833674371656632687650464b6c767a6a78686c492f79576f53586e714b4e4a4f0a717038417258565431516f3848762f6e5a697a77754b4f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f424259454644676b6e7a5776727138704d714d70326257360a484a6f7079434f344d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151766c4247636674426a4f394d5a4944497734654643444343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e4a41444247416945410a346e4f4a526641774c55726d63567939444f383630434b3564634a426b33684554345336356b7530723551434951446c50594f6a38336c422b366344517a75640a7561377a792b41354156376343574b6a364f44444e30333674413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100c31efcb924ff2100a2888c959c0375c7508b48b667e34dc587b0e250a3f40da0" - } - } - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1593635631" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntries.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntries.json deleted file mode 100644 index 74a0632c6153..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntries.json +++ /dev/null @@ -1,381 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e9e856d71f824521cbc9808a7adf1deb", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:24:57 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "e9e856d71f824521cbc9808a7adf1deb", - "x-ms-correlation-request-id": "de52fead-6770-4f27-a01e-7f902c86d969", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-lndfd" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "22", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0c255815c2f49f1f6a1ee1d34874dcce", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test638" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.70", - "x-ms-client-request-id": "0c255815c2f49f1f6a1ee1d34874dcce", - "x-ms-request-id": "1545374622" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.70/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "7fc788607308def415c3caf759b7a911", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.70", - "x-ms-client-request-id": "7fc788607308def415c3caf759b7a911", - "x-ms-request-id": "1316190851" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.70" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.70/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "631e1bea548f93e3c94a17013f718355", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.71", - "x-ms-client-request-id": "631e1bea548f93e3c94a17013f718355", - "x-ms-request-id": "1182940697" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.70" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "565619bcc06c63a146f731f82745b375", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test1645" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.72", - "x-ms-client-request-id": "565619bcc06c63a146f731f82745b375", - "x-ms-request-id": "1297238396" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.72/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "552de9cf3e79a50c33b6be5cf39ea33f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.72", - "x-ms-client-request-id": "552de9cf3e79a50c33b6be5cf39ea33f", - "x-ms-request-id": "1326600806" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.72" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.72/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9d9d5375bb525a7d7cff495db19aa104", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.73", - "x-ms-client-request-id": "9d9d5375bb525a7d7cff495db19aa104", - "x-ms-request-id": "551395436" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.72" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "87708b64ff567d2a0db022b5014570a7", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.73", - "x-ms-client-request-id": "87708b64ff567d2a0db022b5014570a7", - "x-ms-request-id": "1142073619" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "d383f15315a714226bd2d879f5aff398", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "2543", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.73", - "x-ms-client-request-id": "d383f15315a714226bd2d879f5aff398", - "x-ms-request-id": "801860700" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1145258857" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntriesAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntriesAsync.json deleted file mode 100644 index ea3ad14a8239..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntriesAsync.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "839c0a7a529424a648b6b4fda854f6d2", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:25 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "839c0a7a529424a648b6b4fda854f6d2", - "x-ms-correlation-request-id": "06cb86a4-4347-422d-8a4b-27168886e266", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "dd44321041e38d639e5ae0f7c752e066", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test1839" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.99", - "x-ms-client-request-id": "dd44321041e38d639e5ae0f7c752e066", - "x-ms-request-id": "1300624957" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.99/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "25bf73ec0d1e045d73eb23c1605b52a1", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.100", - "x-ms-client-request-id": "25bf73ec0d1e045d73eb23c1605b52a1", - "x-ms-request-id": "910945102" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.99" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "d30ad932962639c8f6f5f7c62c8164d4", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test5238" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.101", - "x-ms-client-request-id": "d30ad932962639c8f6f5f7c62c8164d4", - "x-ms-request-id": "1945854211" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.101/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "36e0bb96fcacd5033f69f81ea12d4308", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.101", - "x-ms-client-request-id": "36e0bb96fcacd5033f69f81ea12d4308", - "x-ms-request-id": "1504478483" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.101" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.101/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "78958a3f92d6ddc5f6ec2717653e466a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.102", - "x-ms-client-request-id": "78958a3f92d6ddc5f6ec2717653e466a", - "x-ms-request-id": "1195448130" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.101" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9fc9edbf6a7135c1d63493bd9eaa98c8", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.102", - "x-ms-client-request-id": "9fc9edbf6a7135c1d63493bd9eaa98c8", - "x-ms-request-id": "1027258527" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "a287efb2ebeb04fdf50340c0d4eb6f01", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "3959", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.102", - "x-ms-client-request-id": "a287efb2ebeb04fdf50340c0d4eb6f01", - "x-ms-request-id": "1988688657" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.84\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4068\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.86\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.88\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test2689\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.90\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.92\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.97\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.99\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5238\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.101\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "206729752" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntry.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntry.json deleted file mode 100644 index 487eafcb585c..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntry.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0b5b23218a54140668cd8db4ca2f0c74", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:02 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "0b5b23218a54140668cd8db4ca2f0c74", - "x-ms-correlation-request-id": "9347e6d3-61b0-47e4-9ed0-4a57218e5954", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "80dbbb2a22e7708f775d52c5e439756f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test1704" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.74", - "x-ms-client-request-id": "80dbbb2a22e7708f775d52c5e439756f", - "x-ms-request-id": "1160700813" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.74/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b25bbcee033f0c324ed537ce3dc8879b", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.74", - "x-ms-client-request-id": "b25bbcee033f0c324ed537ce3dc8879b", - "x-ms-request-id": "698597774" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.74" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.74/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "d52c58c43e5d013acc9adc2cb34e8493", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.75", - "x-ms-client-request-id": "d52c58c43e5d013acc9adc2cb34e8493", - "x-ms-request-id": "1088509573" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.74" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b073db44b0c18926ce3211eac033aed6", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test6719" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.76", - "x-ms-client-request-id": "b073db44b0c18926ce3211eac033aed6", - "x-ms-request-id": "463743380" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.76/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0d8c01b7129f81b05ae6a4270558ff51", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.76", - "x-ms-client-request-id": "0d8c01b7129f81b05ae6a4270558ff51", - "x-ms-request-id": "229440133" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.76" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.76/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "edf8b6a3eb14a702064c8e0c28160b67", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.77", - "x-ms-client-request-id": "edf8b6a3eb14a702064c8e0c28160b67", - "x-ms-request-id": "1367004270" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.76" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "4cfc562d86f732792bf155da0bff8375", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.77", - "x-ms-client-request-id": "4cfc562d86f732792bf155da0bff8375", - "x-ms-request-id": "1205598842" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0a47c032c13bcbc1ffe4075283a45844", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "2761", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.77", - "x-ms-client-request-id": "0a47c032c13bcbc1ffe4075283a45844", - "x-ms-request-id": "622879027" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "aef93ddab35c1d593cc5c22395289b07", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "24", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.77", - "x-ms-client-request-id": "aef93ddab35c1d593cc5c22395289b07", - "x-ms-request-id": "472405600" - }, - "ResponseBody": [ - "{\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "2034015700" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntryAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntryAsync.json deleted file mode 100644 index 1d580cc036e2..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerEntryAsync.json +++ /dev/null @@ -1,489 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "5b80877be4a24c31a6bad0535482a892", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:28 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "5b80877be4a24c31a6bad0535482a892", - "x-ms-correlation-request-id": "9bced157-1345-4970-994f-10695d790056", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "22", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "f8d34e0a092ae0f52c73ceb2cea37f1f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test409" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.103", - "x-ms-client-request-id": "f8d34e0a092ae0f52c73ceb2cea37f1f", - "x-ms-request-id": "1143620696" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.103/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "05885a73c4059e1ba0ff3bacfe5202d3", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.103", - "x-ms-client-request-id": "05885a73c4059e1ba0ff3bacfe5202d3", - "x-ms-request-id": "807698081" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.103" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.103/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "52cf73ce1aae7e518b7b7570629ad717", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.104", - "x-ms-client-request-id": "52cf73ce1aae7e518b7b7570629ad717", - "x-ms-request-id": "630845910" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.103" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "2028e0336c8d324534572bce48e1da71", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test1151" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.105", - "x-ms-client-request-id": "2028e0336c8d324534572bce48e1da71", - "x-ms-request-id": "252497521" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.105/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "d35be4fa712c09580a79894eab3c0627", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.105", - "x-ms-client-request-id": "d35be4fa712c09580a79894eab3c0627", - "x-ms-request-id": "501080495" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.105" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.105/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "71cb5b24b3da06408a2079c225b04299", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.106", - "x-ms-client-request-id": "71cb5b24b3da06408a2079c225b04299", - "x-ms-request-id": "35854733" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.105" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b568fe9b447cc224871e1513e2f786f8", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.106", - "x-ms-client-request-id": "b568fe9b447cc224871e1513e2f786f8", - "x-ms-request-id": "1600669601" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "eda9035168164697a355490cf796e35a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "4178", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.106", - "x-ms-client-request-id": "eda9035168164697a355490cf796e35a", - "x-ms-request-id": "124237915" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.84\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4068\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.86\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.88\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test2689\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.90\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.92\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.97\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.99\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5238\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.101\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.103\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1151\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.105\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "acb3ef3650d4e0ab3609e9bb9e2d2392", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "130", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.106", - "x-ms-client-request-id": "acb3ef3650d4e0ab3609e9bb9e2d2392", - "x-ms-request-id": "870608118" - }, - "ResponseBody": [ - "{\n", - " \u0022entry\u0022: {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "802722544" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentity.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentity.json deleted file mode 100644 index f02052a008b7..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentity.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9a50ae5723bfa8a84f7c93d0a3d353da", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:06 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "9a50ae5723bfa8a84f7c93d0a3d353da", - "x-ms-correlation-request-id": "93b6e694-831c-42c7-8b5b-8e18966f7ca0", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "51e013fc17b69cfdc8e9891da632c7be", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test4251" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.78", - "x-ms-client-request-id": "51e013fc17b69cfdc8e9891da632c7be", - "x-ms-request-id": "493201337" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.78/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "c51976f9abc6d81abff0dd02c61bae7d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.78", - "x-ms-client-request-id": "c51976f9abc6d81abff0dd02c61bae7d", - "x-ms-request-id": "1048730517" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.78" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.78/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "d49bba023ee197a053fdf6391f8aa849", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.79", - "x-ms-client-request-id": "d49bba023ee197a053fdf6391f8aa849", - "x-ms-request-id": "2076026830" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.78" - } - }, - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "ec1b0b3bf396baddd58272c8b5e1b834", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:08 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "ec1b0b3bf396baddd58272c8b5e1b834", - "x-ms-correlation-request-id": "df6d5be8-0862-4cbc-8128-8db450fbf47b", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "ec1b0b3bf396baddd58272c8b5e1b834", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:08 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "ec1b0b3bf396baddd58272c8b5e1b834", - "x-ms-correlation-request-id": "df6d5be8-0862-4cbc-8128-8db450fbf47b", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "263225291" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentityAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentityAsync.json deleted file mode 100644 index eddd1960af96..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetLedgerIdentityAsync.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "96061f9e0b595c73e6882065d32ac715", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:32 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "96061f9e0b595c73e6882065d32ac715", - "x-ms-correlation-request-id": "dcc74451-1308-4c64-a6ca-100fe4783285", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "035f74b8391a1ef55b33fa62a48ed50f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test9033" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.107", - "x-ms-client-request-id": "035f74b8391a1ef55b33fa62a48ed50f", - "x-ms-request-id": "668839518" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.107/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9efe585ea7cb81997639dbc996847c71", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.107", - "x-ms-client-request-id": "9efe585ea7cb81997639dbc996847c71", - "x-ms-request-id": "731852146" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.107" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.107/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e24b857aa9cce5841178fed778fa41fa", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.108", - "x-ms-client-request-id": "e24b857aa9cce5841178fed778fa41fa", - "x-ms-request-id": "1276561390" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.107" - } - }, - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "1ee789b6f243b442d3188d52a8c1097c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:34 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "1ee789b6f243b442d3188d52a8c1097c", - "x-ms-correlation-request-id": "551366d2-1dc5-412a-bf00-ecf2201d0744", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "1ee789b6f243b442d3188d52a8c1097c", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:34 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "1ee789b6f243b442d3188d52a8c1097c", - "x-ms-correlation-request-id": "551366d2-1dc5-412a-bf00-ecf2201d0744", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "956464824" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceipt.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceipt.json deleted file mode 100644 index 48eff1e86227..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceipt.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "34e29e5c2fb0b9be6db99136f8ce1d22", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:08 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "34e29e5c2fb0b9be6db99136f8ce1d22", - "x-ms-correlation-request-id": "3080f027-08ed-4147-a7a8-abb423dc3e9a", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "22", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "a5b0107e314d4b92c5107cc7b2c47e16", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test658" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.80", - "x-ms-client-request-id": "a5b0107e314d4b92c5107cc7b2c47e16", - "x-ms-request-id": "1531355422" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.80/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "a5f43a93f831087d037edcd7cc607218", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.80", - "x-ms-client-request-id": "a5f43a93f831087d037edcd7cc607218", - "x-ms-request-id": "1369344195" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.80" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.80/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "bb637ffa43ba6d0e50e8eb1f41f2bbf4", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.81", - "x-ms-client-request-id": "bb637ffa43ba6d0e50e8eb1f41f2bbf4", - "x-ms-request-id": "994076812" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.80" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "29936520c97c9286a8a1cf55ba7f649e", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test5328" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.82", - "x-ms-client-request-id": "29936520c97c9286a8a1cf55ba7f649e", - "x-ms-request-id": "1928824942" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.82/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "6132cd635cc32c4f8755480d5ec710c2", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.82", - "x-ms-client-request-id": "6132cd635cc32c4f8755480d5ec710c2", - "x-ms-request-id": "1869397080" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.82" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.82/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "fbacc5e8efdeb67ddd2812a13f189568", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.83", - "x-ms-client-request-id": "fbacc5e8efdeb67ddd2812a13f189568", - "x-ms-request-id": "397967797" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.82" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "25de80869389c34e1567a127807934e0", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.83", - "x-ms-client-request-id": "25de80869389c34e1567a127807934e0", - "x-ms-request-id": "1688186628" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "f56d0c9069d374bf4f7c849b49adec6e", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "3087", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.83", - "x-ms-client-request-id": "f56d0c9069d374bf4f7c849b49adec6e", - "x-ms-request-id": "347603200" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25/receipt?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "dd86e0bfebe9543976e8e5764d563563", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "155", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.83", - "x-ms-client-request-id": "dd86e0bfebe9543976e8e5764d563563", - "x-ms-request-id": "2075375028" - }, - "ResponseBody": [ - "{\n", - " \u0022receipt\u0022: {\n", - " \u0022leaf\u0022: \u0022\u0022,\n", - " \u0022node_id\u0022: \u0022\u0022,\n", - " \u0022proof\u0022: [],\n", - " \u0022root\u0022: \u0022\u0022,\n", - " \u0022signature\u0022: \u0022\u0022\n", - " },\n", - " \u0022state\u0022: \u0022Loading\u0022,\n", - " \u0022transactionId\u0022: \u0022\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "455697659" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceiptAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceiptAsync.json deleted file mode 100644 index 45bd2bee97b1..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetReceiptAsync.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "ef5ffc906035410ae345afbee8d3969e", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:34 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "ef5ffc906035410ae345afbee8d3969e", - "x-ms-correlation-request-id": "30fd0157-a016-42bf-bab5-91e1817efab4", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "640c3be575ae85b4d67609156fe0ec9b", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test9149" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.109", - "x-ms-client-request-id": "640c3be575ae85b4d67609156fe0ec9b", - "x-ms-request-id": "461895887" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.109/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "5c2b4d4e8a5a81dc74e5e83182aa7ca9", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.109", - "x-ms-client-request-id": "5c2b4d4e8a5a81dc74e5e83182aa7ca9", - "x-ms-request-id": "1886807524" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.109" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.109/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b25985b6c21a86e2aa695fe9012b7365", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.110", - "x-ms-client-request-id": "b25985b6c21a86e2aa695fe9012b7365", - "x-ms-request-id": "869309430" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.109" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "6a869a2263415f5b8befc88d83032bfa", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test3938" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.111", - "x-ms-client-request-id": "6a869a2263415f5b8befc88d83032bfa", - "x-ms-request-id": "522943979" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.111/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "87ea5e6081396b8ba5b1f02af2804871", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.111", - "x-ms-client-request-id": "87ea5e6081396b8ba5b1f02af2804871", - "x-ms-request-id": "166178756" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.111" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.111/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "105f6e823ef52175fd538fd219f82765", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.112", - "x-ms-client-request-id": "105f6e823ef52175fd538fd219f82765", - "x-ms-request-id": "1520683739" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.111" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "cca0ee33de89a1890e1ac58f72306c0a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.112", - "x-ms-client-request-id": "cca0ee33de89a1890e1ac58f72306c0a", - "x-ms-request-id": "1783618894" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "140b56a61ba42104e9c889e6f1b952ac", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "4508", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.112", - "x-ms-client-request-id": "140b56a61ba42104e9c889e6f1b952ac", - "x-ms-request-id": "1626123447" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.84\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4068\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.86\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.88\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test2689\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.90\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.92\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.97\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.99\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5238\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.101\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.103\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1151\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.105\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.107\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.109\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3938\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.111\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25/receipt?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "03f68b8a7ce0a4e8e4bd01db79e5aecd", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "749", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.112", - "x-ms-client-request-id": "03f68b8a7ce0a4e8e4bd01db79e5aecd", - "x-ms-request-id": "1453075936" - }, - "ResponseBody": [ - "{\n", - " \u0022receipt\u0022: {\n", - " \u0022leaf\u0022: \u0022ed64dd10bc0299ef67716eb49b3caace05f5e3da2da8f5c11c0d30aa288386be\u0022,\n", - " \u0022node_id\u0022: \u0022ad728e883be240c44b715b890369e8790f4b6b4a20d0923a01fca7cc5b30d54c\u0022,\n", - " \u0022proof\u0022: [\n", - " {\n", - " \u0022left\u0022: \u00222f7436c4e1fb93b6b53234f722d4e535ee7d7ef78513917214eb72f151b44dcf\u0022\n", - " },\n", - " {\n", - " \u0022left\u0022: \u0022fd885bfd897f436f5bb87e331764b7c538e308b07fd99f618144afa51b0ebc1b\u0022\n", - " },\n", - " {\n", - " \u0022left\u0022: \u0022ff67ea532102aabf7217385ec1a8cf20d5ba988483b7af8bbf2c4c33e99a4e30\u0022\n", - " }\n", - " ],\n", - " \u0022root\u0022: \u002295e8850d64edc81609ec3c183a4762cafbd90d2a87193bb30042cf70243c47d0\u0022,\n", - " \u0022signature\u0022: \u0022MEQCIHpDpVNAENQYOX4m9\u002BmWH\u002BppvFPpHcvxKH\u002BcdjX9bemYAiA8BeXcRhMcFzz5RBBJv6JaGIaWYSDxxwYOFi0kOalYgw==\u0022\n", - " },\n", - " \u0022state\u0022: \u0022Ready\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - "}" - ] - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "354088011" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatus.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatus.json deleted file mode 100644 index 0064677b6f2a..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatus.json +++ /dev/null @@ -1,443 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "db01894d0bf02d91819e682387ed0e39", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:13 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "db01894d0bf02d91819e682387ed0e39", - "x-ms-correlation-request-id": "fbab92eb-8a6b-4616-bcc4-133e7572aac0", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e43f4d7371cce68767ef4410a7c5ac0a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test3333" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.84", - "x-ms-client-request-id": "e43f4d7371cce68767ef4410a7c5ac0a", - "x-ms-request-id": "236654346" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.84/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "30ef1427f35be16e601e8deda1934a2b", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.84", - "x-ms-client-request-id": "30ef1427f35be16e601e8deda1934a2b", - "x-ms-request-id": "2058799038" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.84" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.84/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "cb297bdabd8117807af4881c4d1ddad8", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.85", - "x-ms-client-request-id": "cb297bdabd8117807af4881c4d1ddad8", - "x-ms-request-id": "890240113" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.84" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "1fd85f18bd08de7f5e83aee49944d4a5", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test4068" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.86", - "x-ms-client-request-id": "1fd85f18bd08de7f5e83aee49944d4a5", - "x-ms-request-id": "1702545967" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.86/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9b2b351889e0936ad8b6666a52934343", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.86", - "x-ms-client-request-id": "9b2b351889e0936ad8b6666a52934343", - "x-ms-request-id": "1757441274" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.86" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.86/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "338931b40c71bed2a9ec2239d133e0b0", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.87", - "x-ms-client-request-id": "338931b40c71bed2a9ec2239d133e0b0", - "x-ms-request-id": "1578344336" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.86" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e73577b43caf8fdbf545475156148bcb", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.87", - "x-ms-client-request-id": "e73577b43caf8fdbf545475156148bcb", - "x-ms-request-id": "99520320" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "682f6b3fa0bb0b34626df2f36630c1a4", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "3305", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.87", - "x-ms-client-request-id": "682f6b3fa0bb0b34626df2f36630c1a4", - "x-ms-request-id": "569574252" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.84\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4068\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.86\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "dbb6b6d65b5e779455fa3e2bc5816795", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.87", - "x-ms-client-request-id": "dbb6b6d65b5e779455fa3e2bc5816795", - "x-ms-request-id": "1925846335" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.25" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1203071432" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatusAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatusAsync.json deleted file mode 100644 index 385c32bb4951..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/GetTransactionStatusAsync.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "251d79d06247eaaf093e7611c448d95d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:38 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "251d79d06247eaaf093e7611c448d95d", - "x-ms-correlation-request-id": "3f000694-67bd-48f7-b701-6ee5a51f2ed9", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-6nddc" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "1091cd6e7ad99103ea4683e30451ce20", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test5070" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.113", - "x-ms-client-request-id": "1091cd6e7ad99103ea4683e30451ce20", - "x-ms-request-id": "1146021771" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.113/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "c560287b671a7d7f9ec8a678c4e8e3fb", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.113", - "x-ms-client-request-id": "c560287b671a7d7f9ec8a678c4e8e3fb", - "x-ms-request-id": "872364293" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.113" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.113/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "302742652984fff619945c1b2c0605ed", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.114", - "x-ms-client-request-id": "302742652984fff619945c1b2c0605ed", - "x-ms-request-id": "1520837339" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.113" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "792048f1d6974d06137211d48acd0163", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test8328" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.115", - "x-ms-client-request-id": "792048f1d6974d06137211d48acd0163", - "x-ms-request-id": "1334803402" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.115/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "29c17e879b9e315261ab850b645197c2", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.115", - "x-ms-client-request-id": "29c17e879b9e315261ab850b645197c2", - "x-ms-request-id": "1382384228" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.115" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.115/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "a0d2d0b882c36ccd20e370b7e52a8fc7", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.116", - "x-ms-client-request-id": "a0d2d0b882c36ccd20e370b7e52a8fc7", - "x-ms-request-id": "510062994" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.115" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "88a4b85ac3445509f6ee18ec50fbe9c2", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "131", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.116", - "x-ms-client-request-id": "88a4b85ac3445509f6ee18ec50fbe9c2", - "x-ms-request-id": "1169516436" - }, - "ResponseBody": [ - "{\n", - " \u0022@nextLink\u0022: \u0022/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25\u0022,\n", - " \u0022state\u0022: \u0022Loading\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview\u0026subLedgerId=subledger:0\u0026fromTransactionId=2.25", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "b91b4eda61fa05a0b15509ba2a9a4b36", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "4728", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.116", - "x-ms-client-request-id": "b91b4eda61fa05a0b15509ba2a9a4b36", - "x-ms-request-id": "2070350685" - }, - "ResponseBody": [ - "{\n", - " \u0022entries\u0022: [\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.25\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.27\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.29\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.31\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.33\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.35\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.37\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.39\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.40\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.42\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.44\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.46\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.48\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.50\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.52\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8441\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.53\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.57\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.59\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.61\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5051\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.63\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test7509\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.68\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test638\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.70\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1645\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.72\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1704\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.74\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test6719\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.76\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4251\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.78\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test658\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.80\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.82\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3333\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.84\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4068\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.86\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test293\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.88\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test2689\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.90\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8551\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.92\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test4186\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.97\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1839\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.99\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5238\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.101\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test409\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.103\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test1151\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.105\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9033\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.107\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test9149\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.109\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test3938\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.111\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test5070\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.113\u0022\n", - " },\n", - " {\n", - " \u0022contents\u0022: \u0022test8328\u0022,\n", - " \u0022subLedgerId\u0022: \u0022subledger:0\u0022,\n", - " \u0022transactionId\u0022: \u00222.115\u0022\n", - " }\n", - " ],\n", - " \u0022state\u0022: \u0022Ready\u0022\n", - "}" - ] - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.25/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "abb0be1c0facf57ec77caad46ae11c25", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.116", - "x-ms-client-request-id": "abb0be1c0facf57ec77caad46ae11c25", - "x-ms-request-id": "627779195" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.25" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "885444783" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntry.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntry.json deleted file mode 100644 index 480726c573fd..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntry.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "ef94b5cae834ac03fe969fec1a489921", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:17 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "ef94b5cae834ac03fe969fec1a489921", - "x-ms-correlation-request-id": "a0ff2203-8699-4420-87f2-390edff1aa64", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "22", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "8149db26c02920d60683705bdfa6317f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test293" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.88", - "x-ms-client-request-id": "8149db26c02920d60683705bdfa6317f", - "x-ms-request-id": "688259602" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.88/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "e494321cda52c8cd5270f17b576294a9", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.88", - "x-ms-client-request-id": "e494321cda52c8cd5270f17b576294a9", - "x-ms-request-id": "1257057789" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.88" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.88/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "9045c20b072af5a0bdce2d6593511ff0", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.89", - "x-ms-client-request-id": "9045c20b072af5a0bdce2d6593511ff0", - "x-ms-request-id": "1854938649" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.88" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "0416fd6d593c0e4c802eb9ce5bc8a3ee", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test2689" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.90", - "x-ms-client-request-id": "0416fd6d593c0e4c802eb9ce5bc8a3ee", - "x-ms-request-id": "1849675214" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.90/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "601d4fc655a192149f2783ac68350051", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "42", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.90", - "x-ms-client-request-id": "601d4fc655a192149f2783ac68350051", - "x-ms-request-id": "568833289" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.90" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.90/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "65e90d01a57e68cff982aad9e6276206", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "44", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.91", - "x-ms-client-request-id": "65e90d01a57e68cff982aad9e6276206", - "x-ms-request-id": "1144838610" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.90" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "1279542385" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntryAsync.json b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntryAsync.json deleted file mode 100644 index 9e6cacc908ed..000000000000 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/SessionRecords/ConfidentialLedgerClientLiveTests/PostLedgerEntryAsync.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://identity.accledger.azure.com/ledgerIdentity/chrissconfidentialledger?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "f14ae97742d97aadc6fddca06f75834a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 11 Nov 2021 22:25:42 GMT", - "Server": "Kestrel", - "Transfer-Encoding": "chunked", - "x-ms-client-request-id": "f14ae97742d97aadc6fddca06f75834a", - "x-ms-correlation-request-id": "c22a4966-8356-4a0e-bde9-9e4031bd4010", - "x-ms-image-digest": "sha256:f14f8e393ffe723a4151d742fdcfac8a74b1791e3c5a8e0a031f4082c50f2ff5", - "x-ms-image-tag": "1.0.01773.235-03ad23ebf84223f96c7e3e2a1619ba91bc83fbbb", - "x-ms-machineName": "identityservice-5995f45cc4-sqsrg" - }, - "ResponseBody": { - "ledgerTlsCertificate": "-----BEGIN CERTIFICATE-----\nMIIBejCCASGgAwIBAgIRANPpW17pcDYr1KnqsJH5yC8wCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABOCPGnfcmfm5Vyax3bvg5Xqg6RUZtda0U5qpmxqGgLfL3LYJd3heTPd\u002B\n51o29pMtKJGG4cWeZ3\u002BYbhZzHnetf8WjUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFFxq\u002BImyEVh4u4BfynwnEAsbvRJBMB8GA1UdIwQYMBaAFFxq\u002BImyEVh4u4Bf\nynwnEAsbvRJBMAoGCCqGSM49BAMCA0cAMEQCIC597R3C89/IzfqjkO31XKy4Rnfy\nXauWszBChtH1v2CoAiAS0tmFNjD3fweHH8O2ySXK/tPCBTq877pIjFGwvuj2uw==\n-----END CERTIFICATE-----\n\u0000", - "ledgerId": "chrissconfidentialledger" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "686d017943b5906ccca2a4a3e6c6ef5f", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test8441" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.117", - "x-ms-client-request-id": "686d017943b5906ccca2a4a3e6c6ef5f", - "x-ms-request-id": "2034300888" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.117/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "1ac3fcefc4a94c4ca766584c88474777", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.117", - "x-ms-client-request-id": "1ac3fcefc4a94c4ca766584c88474777", - "x-ms-request-id": "1538750085" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.117" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.117/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "fcd8d16bde11a5c1de610d9f08d7df37", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.118", - "x-ms-client-request-id": "fcd8d16bde11a5c1de610d9f08d7df37", - "x-ms-request-id": "317915690" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.117" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions?api-version=0.1-preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "Content-Length": "23", - "Content-Type": "application/json", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "bf797f417230b5b520c14feb1f08845a", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "contents": "test6342" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "29", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.119", - "x-ms-client-request-id": "bf797f417230b5b520c14feb1f08845a", - "x-ms-request-id": "495893809" - }, - "ResponseBody": { - "subLedgerId": "subledger:0" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.119/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "ed15382d4df33a111d3c48b7ac44cf86", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "43", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.120", - "x-ms-client-request-id": "ed15382d4df33a111d3c48b7ac44cf86", - "x-ms-request-id": "1934918029" - }, - "ResponseBody": { - "state": "Pending", - "transactionId": "2.119" - } - }, - { - "RequestUri": "https://chrissconfidentialledger.confidential-ledger.azure.com/app/transactions/2.119/status?api-version=0.1-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-Security.ConfidentialLedger/1.0.0-alpha.20211111.1", - "(.NET 5.0.12; Microsoft Windows 10.0.22000)" - ], - "x-ms-client-request-id": "c7465f20b7cd5f3a2347f01c72babe58", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Content-Length": "45", - "Content-Type": "application/json", - "x-ms-ccf-transaction-id": "2.120", - "x-ms-client-request-id": "c7465f20b7cd5f3a2347f01c72babe58", - "x-ms-request-id": "1606523139" - }, - "ResponseBody": { - "state": "Committed", - "transactionId": "2.119" - } - } - ], - "Variables": { - "CONFIDENTIALLEDGER_IDENTITY_URL": "https://identity.accledger.azure.com/", - "CONFIDENTIALLEDGER_URL": "https://chrissconfidentialledger.confidential-ledger.azure.com", - "RandomSeed": "417178718" - } -} \ No newline at end of file diff --git a/sdk/confidentialledger/test-resources-pre.ps1 b/sdk/confidentialledger/test-resources-pre.ps1 new file mode 100644 index 000000000000..650fef3b6b82 --- /dev/null +++ b/sdk/confidentialledger/test-resources-pre.ps1 @@ -0,0 +1,5 @@ +Import-Module -Name ./eng/scripts/X509Certificate2 -Verbose + +$cert = New-X509Certificate2 -SubjectName 'E=opensource@microsoft.com, CN=Azure SDK, OU=Azure SDK, O=Microsoft, L=Frisco, S=TX, C=US' -ValidDays 3652 +$templateFileParameters['ConfidentialLedgerPrincipalPEM'] = Format-X509Certificate2 -Certificate $cert +$templateFileParameters['ConfidentialLedgerPrincipalPEMPK'] = Format-X509Certificate2 -Type Pkcs8 -Certificate $cert diff --git a/sdk/confidentialledger/test-resources.json b/sdk/confidentialledger/test-resources.json index 25b3a3ad174d..51273a8e3a07 100644 --- a/sdk/confidentialledger/test-resources.json +++ b/sdk/confidentialledger/test-resources.json @@ -25,10 +25,22 @@ }, "location": { "type": "string", - "defaultValue": "eastus2euap", + "defaultValue": "southcentralus", "metadata": { "description": "The location of the resource. By default, this is the same as the resource group." } + }, + "ConfidentialLedgerPrincipalPEM": { + "type": "string", + "metadata": { + "description": "The certificate to configure as a certBasedSecurityPrincipal." + } + }, + "ConfidentialLedgerPrincipalPEMPK": { + "type": "string", + "metadata": { + "description": "The certificate to configure as a certBasedSecurityPrincipal." + } } }, "resources": [ @@ -36,7 +48,7 @@ "type": "Microsoft.ConfidentialLedger/ledgers", "apiVersion": "2020-12-01-preview", "name": "[parameters('baseName')]", - "location": "EASTUS", + "location": "[parameters('location')]", "properties": { "ledgerType": "Public", "aadBasedSecurityPrincipals": [ @@ -44,6 +56,12 @@ "principalId": "[parameters('testApplicationOid')]", "ledgerRoleName": "Administrator" } + ], + "certBasedSecurityPrincipals": [ + { + "cert": "[parameters('ConfidentialLedgerPrincipalPEM')]", + "ledgerRoleName": "Administrator" + } ] } } @@ -55,11 +73,19 @@ }, "CONFIDENTIALLEDGER_IDENTITY_URL": { "type": "string", - "value": "https://identity.accledger.azure.com/" + "value": "https://identity.confidential-ledger.core.azure.com" }, "CONFIDENTIALLEDGER_CLIENT_OBJECTID": { "type": "string", "value": "[parameters('testApplicationOid')]" + }, + "CONFIDENTIALLEDGER_CLIENT_PEM": { + "type": "string", + "value": "[parameters('ConfidentialLedgerPrincipalPEM')]" + }, + "CONFIDENTIALLEDGER_CLIENT_PEM_PK": { + "type": "string", + "value": "[parameters('ConfidentialLedgerPrincipalPEMPK')]" } } } diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index cd9d8cfa5764..87b35becd5bb 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -200,8 +200,11 @@ public T InstrumentClientOptions(T clientOptions, TestRecording recording = d clientOptions.Retry.Delay = TimeSpan.FromMilliseconds(10); clientOptions.Retry.Mode = RetryMode.Fixed; } - - clientOptions.Transport = recording.CreateTransport(clientOptions.Transport); + // No need to set the transport if we are in Live mode + if (Mode != RecordedTestMode.Live) + { + clientOptions.Transport = recording.CreateTransport(clientOptions.Transport); + } return clientOptions; } diff --git a/sdk/core/Azure.Core.TestFramework/src/TestServer.cs b/sdk/core/Azure.Core.TestFramework/src/TestServer.cs index dc55595697dc..5811a463e13f 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestServer.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestServer.cs @@ -37,7 +37,11 @@ public TestServer(RequestDelegate app, bool https = false) { if (https) { - listenOptions.UseHttps(TestEnvironment.DevCertPath, TestEnvironment.DevCertPassword); + listenOptions.UseHttps(TestEnvironment.DevCertPath, TestEnvironment.DevCertPassword, config => + { + config.ClientCertificateMode = Microsoft.AspNetCore.Server.Kestrel.Https.ClientCertificateMode.AllowCertificate; + config.ClientCertificateValidation = (_, _, _) => true; + }); } }); }) diff --git a/sdk/core/Azure.Core/api/Azure.Core.net461.cs b/sdk/core/Azure.Core/api/Azure.Core.net461.cs index 322a7a138462..f891c1bede9a 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net461.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net461.cs @@ -959,6 +959,7 @@ protected HttpPipelineTransport() { } public partial class HttpPipelineTransportOptions { public HttpPipelineTransportOptions() { } + public System.Collections.Generic.IList ClientCertificates { get { throw null; } } public System.Func? ServerCertificateCustomValidationCallback { get { throw null; } set { } } } public partial class ServerCertificateCustomValidationArgs diff --git a/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs b/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs index 74cb0da73412..4926e18e1c6c 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.net5.0.cs @@ -959,6 +959,7 @@ protected HttpPipelineTransport() { } public partial class HttpPipelineTransportOptions { public HttpPipelineTransportOptions() { } + public System.Collections.Generic.IList ClientCertificates { get { throw null; } } public System.Func? ServerCertificateCustomValidationCallback { get { throw null; } set { } } } public partial class ServerCertificateCustomValidationArgs diff --git a/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs b/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs index 322a7a138462..f891c1bede9a 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs @@ -959,6 +959,7 @@ protected HttpPipelineTransport() { } public partial class HttpPipelineTransportOptions { public HttpPipelineTransportOptions() { } + public System.Collections.Generic.IList ClientCertificates { get { throw null; } } public System.Func? ServerCertificateCustomValidationCallback { get { throw null; } set { } } } public partial class ServerCertificateCustomValidationArgs diff --git a/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs b/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs index 322a7a138462..f891c1bede9a 100644 --- a/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs +++ b/sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs @@ -959,6 +959,7 @@ protected HttpPipelineTransport() { } public partial class HttpPipelineTransportOptions { public HttpPipelineTransportOptions() { } + public System.Collections.Generic.IList ClientCertificates { get { throw null; } } public System.Func? ServerCertificateCustomValidationCallback { get { throw null; } set { } } } public partial class ServerCertificateCustomValidationArgs diff --git a/sdk/core/Azure.Core/src/ClientOptions.cs b/sdk/core/Azure.Core/src/ClientOptions.cs index 5568a6d8de9c..4ef5e1024bcd 100644 --- a/sdk/core/Azure.Core/src/ClientOptions.cs +++ b/sdk/core/Azure.Core/src/ClientOptions.cs @@ -61,7 +61,7 @@ internal ClientOptions(ClientOptions? clientOptions, DiagnosticsOptions? diagnos // Implementation Note: this code must use the copy constructors on DiagnosticsOptions and RetryOptions specifying // null as the argument rather than calling their default constructors. Calling their default constructors would result // in a stack overflow as this constructor is called from a static initializer. - _transport = GetDefaultTransport(); + _transport = HttpPipelineTransport.Create(); Diagnostics = new DiagnosticsOptions(null); Retry = new RetryOptions(null); } @@ -112,19 +112,6 @@ public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position) internal List<(HttpPipelinePosition Position, HttpPipelinePolicy Policy)>? Policies { get; private set; } - private static HttpPipelineTransport GetDefaultTransport() - { -#if NETFRAMEWORK - if (!AppContextSwitchHelper.GetConfigValue( - "Azure.Core.Pipeline.DisableHttpWebRequestTransport", - "AZURE_CORE_DISABLE_HTTPWEBREQUESTTRANSPORT")) - { - return HttpWebRequestTransport.Shared; - } -#endif - return HttpClientTransport.Shared; - } - /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object? obj) => base.Equals(obj); diff --git a/sdk/core/Azure.Core/src/DefaultClientOptions.cs b/sdk/core/Azure.Core/src/DefaultClientOptions.cs index 892444013a9e..f609612be5d8 100644 --- a/sdk/core/Azure.Core/src/DefaultClientOptions.cs +++ b/sdk/core/Azure.Core/src/DefaultClientOptions.cs @@ -10,7 +10,6 @@ internal class DefaultClientOptions: ClientOptions { public DefaultClientOptions(): base(null, null) { - Transport = HttpPipelineTransport.Create(); Diagnostics.IsTelemetryEnabled = !EnvironmentVariableToBool(Environment.GetEnvironmentVariable("AZURE_TELEMETRY_DISABLED")) ?? true; Diagnostics.IsDistributedTracingEnabled = !EnvironmentVariableToBool(Environment.GetEnvironmentVariable("AZURE_TRACING_DISABLED")) ?? true; } diff --git a/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs b/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs index 466676911921..c65ada8fd261 100644 --- a/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs +++ b/sdk/core/Azure.Core/src/Pipeline/HttpClientTransport.cs @@ -558,18 +558,25 @@ private static SocketsHttpHandler ApplyOptionsToHandler(SocketsHttpHandler httpH return httpHandler; } +#pragma warning disable CA1416 // 'X509Certificate2' is unsupported on 'browser' // ServerCertificateCustomValidationCallback if (options.ServerCertificateCustomValidationCallback != null) { httpHandler.SslOptions.RemoteCertificateValidationCallback = (_, certificate, x509Chain, sslPolicyErrors) => -#pragma warning disable CA1416 // 'X509Certificate2' is unsupported on 'browser' options.ServerCertificateCustomValidationCallback( new ServerCertificateCustomValidationArgs( certificate is { } ? new X509Certificate2(certificate) : null, x509Chain, sslPolicyErrors)); -#pragma warning restore CA1416 // 'X509Certificate2' is unsupported on 'browser' } + // Set ClientCertificates + foreach (var cert in options.ClientCertificates) + { + httpHandler.SslOptions ??= new System.Net.Security.SslClientAuthenticationOptions(); + httpHandler.SslOptions.ClientCertificates ??= new X509CertificateCollection(); + httpHandler.SslOptions.ClientCertificates!.Add(cert); + } +#pragma warning restore CA1416 // 'X509Certificate2' is unsupported on 'browser' return httpHandler; } #endif @@ -584,12 +591,16 @@ private static HttpClientHandler ApplyOptionsToHandler(HttpClientHandler httpHan // ServerCertificateCustomValidationCallback if (options.ServerCertificateCustomValidationCallback != null) { - httpHandler.ServerCertificateCustomValidationCallback = - (_, certificate2, x509Chain, sslPolicyErrors) => - { - return options.ServerCertificateCustomValidationCallback( - new ServerCertificateCustomValidationArgs(certificate2, x509Chain, sslPolicyErrors)); - }; + httpHandler.ServerCertificateCustomValidationCallback = (_, certificate2, x509Chain, sslPolicyErrors) => + { + return options.ServerCertificateCustomValidationCallback( + new ServerCertificateCustomValidationArgs(certificate2, x509Chain, sslPolicyErrors)); + }; + } + // Set ClientCertificates + foreach (var cert in options.ClientCertificates) + { + httpHandler.ClientCertificates.Add(cert); } return httpHandler; } diff --git a/sdk/core/Azure.Core/src/Pipeline/HttpPipelineTransportOptions.cs b/sdk/core/Azure.Core/src/Pipeline/HttpPipelineTransportOptions.cs index 4a6880d846b7..320af70914f1 100644 --- a/sdk/core/Azure.Core/src/Pipeline/HttpPipelineTransportOptions.cs +++ b/sdk/core/Azure.Core/src/Pipeline/HttpPipelineTransportOptions.cs @@ -2,6 +2,8 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; +using System.Security.Cryptography.X509Certificates; namespace Azure.Core.Pipeline { @@ -10,9 +12,23 @@ namespace Azure.Core.Pipeline /// public class HttpPipelineTransportOptions { + /// + /// Initializes an instance of . + /// + public HttpPipelineTransportOptions() + { + ClientCertificates = new List(); + } + /// /// A delegate that validates the certificate presented by the server. /// public Func? ServerCertificateCustomValidationCallback { get; set; } + + /// + /// The client certificate collection that will be configured for the transport. + /// + /// + public IList ClientCertificates {get;} } } diff --git a/sdk/core/Azure.Core/src/Pipeline/HttpWebRequestTransport.cs b/sdk/core/Azure.Core/src/Pipeline/HttpWebRequestTransport.cs index 1f1ff6c65842..a7bf39788aca 100644 --- a/sdk/core/Azure.Core/src/Pipeline/HttpWebRequestTransport.cs +++ b/sdk/core/Azure.Core/src/Pipeline/HttpWebRequestTransport.cs @@ -389,6 +389,11 @@ private static void ApplyOptionsToRequest(HttpWebRequest request, HttpPipelineTr x509Chain, sslPolicyErrors)); } + // Set ClientCertificates + foreach (var cert in options.ClientCertificates) + { + request.ClientCertificates.Add(cert); + } } } #endif diff --git a/sdk/core/Azure.Core/tests/PipelineTestBase.cs b/sdk/core/Azure.Core/tests/PipelineTestBase.cs index 9e5c188d23d9..75a5b20ffca5 100644 --- a/sdk/core/Azure.Core/tests/PipelineTestBase.cs +++ b/sdk/core/Azure.Core/tests/PipelineTestBase.cs @@ -49,5 +49,84 @@ protected async Task ExecuteRequest(HttpMessage message, HttpPipeline } return message.Response; } + + protected const string Pfx = @" +MIIQ5gIBAzCCEKIGCSqGSIb3DQEHAaCCEJMEghCPMIIQizCCCowGCSqGSIb3DQEHAaCCCn0Eggp5 +MIIKdTCCCnEGCyqGSIb3DQEMCgECoIIJfjCCCXowHAYKKoZIhvcNAQwBAzAOBAg6i6mCUbwdbAIC +B9AEgglYsHHK8w7YYufZ7ZNhiQTudYQXxdfQCEmcAL6sV1YWAVaNhm7yrsiKuOIiKU7wm5ZHTPrI +Yk6uLeE3uA+KLMBqlDheDZfs5pcbi8QHXNy7yVURvU+Wa7Jdo3On+ti9W6MU2ImBXa3JhXdQfJLP +QyjBOTiuKL0yiwQZWvb6+wFeNPgYXcAQOW4bwobm4gtUsNlZlTgLo/R0wzz9cfIvKTmy+94mObxs +HVydIkzuCPqjLcrfJz//qwr8fsg2GbpPehqqcwqMdkrxduhlCDFf3MMN07SZKC+o+UX9boQbi8yr +2uLcyTDc2lqSTxaLyKkXCiI0WmxBTmcMs/tTyB7QIsuqNJjlAX/sMqpeMTd8iWESL18eM0l5YR7/ +rGVDCczJ5FiOgfFine2d0hhcHQwXOowtTvl90bMCONfndP5SZLp2Wz6qXKGgP3YKLimopaOc8Wsz +kPUYk3s1ADywIfw6H4CTXPKiT1FFCQpdSvaC0vqIb3Un77ZV5ReUAtQY8kCg3IgTelsjwl04yJAO +xpB5SFyWHyInsxSvHhv+mqu32dLXMWdriynxeuv+Y4S9ravI5WgVRE4LnnmPdy4zP75icoVpbkrq +KqKztD9ySSG3fmdvsRORSEJ9Fh8ZoxcqHO/YZ14NwizVuO/nTBTmOdkmCMahCgoHntHTmsMz6tO3 +Q3+CcXXdigbkdjly5vbMjjsu0CR/o2Lgn4jx9bO+WQmGyyWwR6UvesdPzf4T1nN5Py2UtYsK8Npm +BiZZDMbURd5UIBxFMrHVAJOPSeJGMigRbwwYVKOIphvWBJIY7h+iXDWlbCJfII/YeJU22kMThqzl +zNGKttVGnVGFRHZLXKVWHqXJuViY3stmWg8TO1O9LEIsJX+3zgMWy0o3vNturFJ1V3zFWte10Xib +M+qGNWfYt2y5ebKg+B0HJxdbL+hl+JWxwsP1jRo4kekoFIvuxuwCmOLaU+EsNwCngN1uPqhRgDDi +Qv6LXVTGqH8mQgcp0bc986/tYzV9l7QWpohVKboYVjmbbe0/Wt+KuklkQDNhhyrwiHLlqA0Z9mU8 +4XnrRp6Iwe53IZHfaiw21ontaO6cMdWKp4brM7Hlk6ehCVZlBEpm7h6EnZuhC6adtR9EMGhGR3PW +oOY069ztvf39BIK5SfSPv4OFqnSFB1dVLNWhz6Uy4MbhPmG8pzKiAoX+1RlwRI6ZoEPoLszdFv2o +cnGeTnnwbdJ8PmJbfZSCYdZ8uprLUz8ShIA2zRhYJohuNXMLTUpYVAn0zcGLbfv3boG7yjTsbvIB +mBZ6NZaWb0HmMGHi+Ui5omFU6ZtiqHSGR21yPI7Wm9dnPnu54UybvCSiTaapRvlFaGGdU5EX4FLD +nYrDYraw98yhtkxXwc+iY3HZ8CakMUcYcbSkXJAQr9jpJTGvAouZXrPqVa0Lz55VPKBYAjStd0sU +Fam7sG2tH4Q/MY3NsQ+CEBFrynOcBj6H/nVbJHL9D1RqvCd7ugWW0Ixps6L7mCEDzDNpggVEvUaF +Y8BtsLSRhpCfcQlEE0jyrkQ1WwCG+MvI+3rF+MGlcJrp7PYB1utiRV6fcsxlC0ZiLjA8KLMRRO4G +4gDI1BAgqqHDm2sKKT98FRSoK0xeSTkZIxBVV0ft+VI3BhB735rqJZCw0f5BTLcgq+w1mW2o1iBG +p99qqPd9vXy/kgCtl5e47cZmM9Hr672rvLz0NHLrIBZY3llHdBlPCy7q8jfyzpiYsD4D2pFusbxE +Tm4OvXAI/v9jUtcv1ebA3rgfi4aDTbCMY4dy0xs43NZKZIANO5EuFKGHg8ZH9TQbsGNKTP9MdJZr +Sc6xrqzvCiGqewrGqTeq6jgGlTcFaQDDTwExWtFqY4OFq3iFKal/XJoZdJ4iPViw9/YmKsdqkBAB +DoPLA3MY9Elr9ME22ImsdO+y9NgemF6J3GtqNLGvRY3/tZ9RTDHzcoLQv3saz8f/FTD00Q8EgFuj +pIz4ZFGrledLVEF9NMU9SKz78Bcn84yCQalaTfg6WckWfb2takeJVbojrfiJq9Vs6f7RvaAWxKXB +AnOptz+Y21CVXz8BpmZU39tlfyh1Axu2BtRCtD6PvavjtOYuWXWFYNJ5vXnF35MHRV0ip+0ryqSd +4MUVZx4Ad8P6TxYNRJvg3FZFwqvlVhlYjFbKMfgfZbmlKS29bS5yFXAGkKwfAsSEbV2wxd8HOiex +WN0y2nPiltJuUsPznPidJ8m2QzHGo7sL//mB64ZoBv1zMy8kWrYOvV7Ru1ur22F7hWrNMad7hwIQ +10dutJHzmsRcVFCBZvojiMDovF2Ge98xh3A2AGvN/nEQBayKPqSTL4JggC+K+TpizW82MDMqcp/n +fEtWJ5v0TDBlWqapKwi12hN2JIwmfWgowKfQar2FMBB1B5agHCTHXmVY8lRBqW2dSC+lUUPakHSr +IMEfjBTm8VD+GYvnlD/1wxmsooVsxDEOvxFsLgcXlY2/5SqsLSmSEmqIjGtwcOOn6brhXBBx8V/T +VsdRw00ounu+gApAFsCSGM4/O2IRRoNpLkZrSG8v9SFj5ieZqo53mb6USyhDlgL670P/oO7C+Ta0 +icNR55z/h8Yu8NBPtQ6Ahsou8/wXDnbkxqjx8LwLlGsZuHmzPecBQicn0wgRa4c2z98ycyPoLcvF +o0R6D5prvHXY3ej3wtzytXiBAcJk3Yh1BQbVUBWftRqm2TcBa5TIkvdDoNP+UWDPHoxEP008gkJp +gX0aU+xI9doprq9xM/QFClPnnHyFN6lqHUFEOT8fNAKS3bQZtZPn7Iqn0rtmtWv06wCNfdlh7MGg +fIcx1Eks2bA4nMCnA7PJaG5PDaCQsxW4yiyQhC6cNz81ZpuSqmzBdToDjwTIaOiDVfAAPhzO8284 +LPp2FuLEUgVyRGJ0hCgHDIqEMp7C7sgK2uWcUUGBiHXusFuA6C3WDqLsjriCtvWkIcL4v4ByKxqh +16nPBt09mhRXXzO9gKtVJ0cvTfLyKgyIHTjQnLJLuHpKiJ/9SqrWHOv6CwTUk2OV51VedYe3emr7 +Fa9dt6EPvzLTbLdB/CnEOPzh7aInR/iaiWMSNxOE7AJ8hACU8/C3QEDsjnUK6LoTzC71jWAdCPcZ +1uze0fhHYwZ67rWneQOShhHEfX2Vxlm1R8L4sbPppFHrIygR9KCPjUUj8OTNvwQUumdqE0C8iNyQ +T4E0NzGB3zATBgkqhkiG9w0BCRUxBgQEAQAAADBbBgkqhkiG9w0BCRQxTh5MAHsARQBDADkAMwBC +ADcANQA1AC0AQwA5ADYAMwAtADQANgBBADAALQA5AEIARQBDAC0ANAAzADQANgBDADkARQA4AEYA +MwBBADkAfTBrBgkrBgEEAYI3EQExXh5cAE0AaQBjAHIAbwBzAG8AZgB0ACAARQBuAGgAYQBuAGMA +ZQBkACAAQwByAHkAcAB0AG8AZwByAGEAcABoAGkAYwAgAFAAcgBvAHYAaQBkAGUAcgAgAHYAMQAu +ADAwggX3BgkqhkiG9w0BBwagggXoMIIF5AIBADCCBd0GCSqGSIb3DQEHATAcBgoqhkiG9w0BDAED +MA4ECL8s4RtLNs3DAgIH0ICCBbBAol2PhYnPwgbJIcgwyWPLA05DjtjrtsM9y3XszmwCZZoW2Iiz +3CTua8Z+ZRfWGbxeH5gnuFSLbFLVSavJcFMecylHqgcBTrzlgYuWq2a0WDz0Msb51fLB7+4OvXMe +uUmW3yZniRIHMv/pzeTUBKNLE50XNPIwU8+mk144CadARMbIMDDj9F0Uy4Tn7Y7lSPTQokh2CunP +to77UaJadBno5F6WnrjckUttkBh5/wHlrdLaSdcSCWG0/uxjOrVgQpaXmhN+nb/YfDyJZFBCDXF4 +klTdF+e3BOUjMn4opoW/RhVkyqNPxgPHEJnd0yxWuP0yN7BwbRLMMAz4Ui36rCbrEAyXtuAfH8og +r65T6DrKJti4rRxrkzVNQeB7TGk2Sk73KaJLNhyW0LkZ4lolOi8vq1qpGBA8nJtKXE6q3U6euINM +2szuQTQh5KNQ4zKgHCd3P7p5e7sLyxO6FGd/NGvMVt9wLk8wzbJXEC6k2AgdYsdbgzSYq0zDVB2f +R+3ZXMh8tXPi0hPd5Uj/jlD3SV/wRFBxzginGvx4w8DkcDvS3phL+N+C2nSGdwruqFYWX9MUp3J6 +KrlwMc16EVS7yJRL9GTkRP7gKFDGbeYdo2to8oWory/P9WJ1YttToVFZdomo/4pScWQTbod5Eqta +UEZq3QG/gtdTTXgdDYIk930jiJZoFH9s+LHax5zzV2hZaSzwMl17ZKO/1cre9D1nEph96nNm/epq +LUUL3xTGhQ/0/U3C5+Wy+Op3b0EW3jTjwGU8TvChs8ioau2PoByRnpa2qP4/9YxZvcjQd/dLXJDz +pVA1U+ZxxnhKeDJaAzW2s1IlHx7PInfSorNXqi/O+ERHf8gibrlm+jtxioc6dxHh7/KnFmuQ0V8Q +VzwG5zUtDvmXgM4BIu0lYCrCIBR7vsq6eM4+euetHZuhQTUlKCWkTFm4UGQaJI4Vy+u+SbTS6ONb +HUwV0buH+L5k8vDZznG4Wcpz1+naE4tMg5RWMQCaXym2KphjLHYXR1w9nSG5MpuozmQ2Ecp2VMho +cSTevk9mX426tsXgIuFuAPlu+SlK6+1KKD5jPl5T+zFhg2l1y/BosornTXgR667v7WLeVwIrFaAP +TZb4qxOxaZ+uA2fuVU0yehexrT0gwQCrLKe6gzkrKrPotKkjn1a1Vxi95KVZK9xikX3ptBrhea/t +1ZBogOdjYxtqlPAyL7DyPpac2jX234AL18d7tEw0GVNcgllqxFVYq1tXg0I3ypW6uksX4VYkNSNy +9Xo5mh/QQsJp4JLPveGiq1RoJ69nNq2kuElIVzAUjljA0pZWgMU9hSQJeDF93jxor24nAz6QXZVL +JOWP2EOAfp3+u3pZFJHsvYbFtYtEWoXLxEWvRv+XzjMK3L/iUGmz2mlNe8NtZNokSR3NvrqSDHly +xlw8Lc+L0hNVd+3z96d7heRX9GVCSO6YHIuSDtOH4KbM5ZdpDQccYFUmghOefoAoYQ3YKafO/GKO +4Onm/Y8EdMokdk+EuwN1o8muRcPb+W9OJgmJvUvozgBCEmBgE09iwPWI77H/AqNODRc5UPmikNvs +FYnVpaj2vgV6r4fNxz49C6US5WyKqJgOwBiPDHRRVULHB8JNos0q0gf1yeLcflmkQtclEvpITQ6+ +YmJzz4VMOAIFLehxG8ntO/W2QWQ20hyVPORRkOU2U4AELJisP94PBvpAIrNWFkGGvai7iTD/9eSj +1mNfzZ3MM8mdBM9QumgSFfZJgSa+LlPQlemVv+Oa5wKI36nzuC6R/gvP6NlBBWjUUsUZRkg4CDVO +QCmsuFhVJJQQhpk3qaYi7eSKep7cVWCj8Fd70fDLPENC8Go5bWx0qf/UifHioQfoXK7wwvWTR8Ia +SFOZJoMiZA9U17D0bxXn3LUImJn9MhBs5m3G9/A7C/M6y0PAdsnzHro/LpC17zbnJ1zOMDswHzAH +BgUrDgMCGgQUwVWF1Axq6WtJTF05+H4d6s1JX64EFBqoVUD5ZqKahaRAXLZ6WX9DqGmhAgIH0AAA +AAAAAAAA"; } } diff --git a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs index 6b717f8f793d..41f23a8df8df 100644 --- a/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs +++ b/sdk/core/Azure.Core/tests/TransportFunctionalTests.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Net; +using System.Runtime.ConstrainedExecution; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Text; @@ -1068,6 +1069,45 @@ public async Task ServerCertificateCustomValidationCallbackIsHonored([Values(tru } } + [Test] + public async Task ClientCertificateIsHonored([Values(true, false)] bool setClientCertificate) + { + // This test assumes ServicePointManager.ServerCertificateValidationCallback will be unset. + ServicePointManager.ServerCertificateValidationCallback = null; + var clientCert = new X509Certificate2(Convert.FromBase64String(Pfx)); + + using (TestServer testServer = new TestServer( + async context => + { + var cert = context.Connection.ClientCertificate; + if (setClientCertificate) + { + Assert.NotNull(cert); + } + else + { + Assert.Null(cert); + } + byte[] buffer = Encoding.UTF8.GetBytes("Hello"); + await context.Response.Body.WriteAsync(buffer, 0, buffer.Length); + }, + true)) + { + var options = new HttpPipelineTransportOptions(); + + options.ServerCertificateCustomValidationCallback = args => true; + if (setClientCertificate) + { + options.ClientCertificates.Add(clientCert); + } + var transport = GetTransport(true, options); + Request request = transport.CreateRequest(); + request.Uri.Reset(testServer.Address); + + await ExecuteRequest(request, transport); + } + } + [Test] public async Task No100ContinueSentByDefault() { diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs index 5e4fd9d41dd4..fe412ab42184 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs @@ -540,7 +540,7 @@ Analyzer CreatePatternAnalyzer(RegexFlags rf) => }); } - [Fact(Skip = "https://github.com/Azure/azure-sdk-for-net/issues/29190")] + [Fact(Skip="https://github.com/Azure/azure-sdk-for-net/issues/29190")] public void CanUseAllAnalysisComponentOptions() { Run(() => From acf7b149d1c9ee468f65a7c287d5937b8a8ac9e1 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 21 Jun 2022 12:59:23 -0500 Subject: [PATCH 2/5] undo search merge --- .../Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs index fe412ab42184..5e4fd9d41dd4 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/CustomAnalyzerTests.cs @@ -540,7 +540,7 @@ Analyzer CreatePatternAnalyzer(RegexFlags rf) => }); } - [Fact(Skip="https://github.com/Azure/azure-sdk-for-net/issues/29190")] + [Fact(Skip = "https://github.com/Azure/azure-sdk-for-net/issues/29190")] public void CanUseAllAnalysisComponentOptions() { Run(() => From 5388ab90861dbdaa4e06e95767017590d3041e83 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 21 Jun 2022 13:11:34 -0500 Subject: [PATCH 3/5] revert eng/common --- eng/common/TestResources/README.md | 45 +++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index 0fbb4ea50374..957a1f9c3577 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -49,7 +49,7 @@ ${env:KEYVAULT_CLIENT_ID} = '<>' ${env:KEYVAULT_CLIENT_SECRET} = '<>' ${env:KEYVAULT_SUBSCRIPTION_ID} = 'YOUR SUBSCRIPTION ID' ${env:KEYVAULT_RESOURCE_GROUP} = 'rg-myusername' -${env:KEYVAULT_LOCATION} = 'westus' +${env:KEYVAULT_LOCATION} = 'westus2' ${env:KEYVAULT_SKU} = 'premium' ${env:AZURE_KEYVAULT_URL} = '<>' ``` @@ -77,6 +77,49 @@ setx KEYVAULT_SKU ${env:KEYVAULT_SKU} setx AZURE_KEYVAULT_URL ${env:AZURE_KEYVAULT_URL} ``` +### Pre- and Post- Scripts + +Sometimes creating test resources requires either some work to be done prior to or after the main test-resources.json script is executed. +For these scenarios a `test-resources-pre.ps1` or `test-resources-post.ps1`, respectively, can be created in the same folder as the `test-resources.json` file. + +For example, it may be necessary to create artifacts prior to provisioning the actual resource, such as a certificate. +Typically the created artifact will need to be passed to `test-resources.json` to be used in the ARM template or as output (or both). + +Below is an example of how `$templateFileParameters` can be used to pass data from the `pre-` script to `test-resources.json`. + +**Snippet from `test-resources-pre.ps1`** +```powershell +$cert = New-X509Certificate2 -SubjectName 'E=opensource@microsoft.com, CN=Azure SDK, OU=Azure SDK, O=Microsoft, L=Frisco, S=TX, C=US' -ValidDays 3652 +# Create new entries in $templateFileParameters +$templateFileParameters['ConfidentialLedgerPrincipalPEM'] = Format-X509Certificate2 -Certificate $cert +$templateFileParameters['ConfidentialLedgerPrincipalPEMPK'] = Format-X509Certificate2 -Type Pkcs8 -Certificate $cert +``` + +**Snippet from the corresponding `test-resources.json`.** + +Note that the values present in `$templateFileParameters` will map to parameters of the same name. +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "_comment": "Other required parameters would go here... (this is not part of the actual test-resources.json)", + "ConfidentialLedgerPrincipalPEM": { + "type": "string", + "metadata": { + "description": "The certificate to configure as a certBasedSecurityPrincipal." + } + }, + "ConfidentialLedgerPrincipalPEMPK": { + "type": "string", + "metadata": { + "description": "The certificate to configure as a certBasedSecurityPrincipal." + } + } + }, +} +``` + ### Cleaning up Resources By default, resource groups are tagged with a `DeleteAfter` value and date according to the default or specified From 8fe041a24676a36eb818c93eb808b7102729db48 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 21 Jun 2022 13:13:05 -0500 Subject: [PATCH 4/5] revert eng/common (again) --- eng/common/TestResources/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/TestResources/README.md b/eng/common/TestResources/README.md index 957a1f9c3577..757c7c337ac5 100644 --- a/eng/common/TestResources/README.md +++ b/eng/common/TestResources/README.md @@ -49,7 +49,7 @@ ${env:KEYVAULT_CLIENT_ID} = '<>' ${env:KEYVAULT_CLIENT_SECRET} = '<>' ${env:KEYVAULT_SUBSCRIPTION_ID} = 'YOUR SUBSCRIPTION ID' ${env:KEYVAULT_RESOURCE_GROUP} = 'rg-myusername' -${env:KEYVAULT_LOCATION} = 'westus2' +${env:KEYVAULT_LOCATION} = 'westus' ${env:KEYVAULT_SKU} = 'premium' ${env:AZURE_KEYVAULT_URL} = '<>' ``` From 5df0261fc1fe8be01a009e5829e75099617cb339 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Wed, 22 Jun 2022 16:06:36 -0500 Subject: [PATCH 5/5] regen --- .../src/ConfidentialLedgerClient.cs | 28 ++-- .../src/Generated/ConfidentialLedgerClient.cs | 158 +++++++++--------- 2 files changed, 98 insertions(+), 88 deletions(-) diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs index 907cee77e47d..2e839f6c6420 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/ConfidentialLedgerClient.cs @@ -64,13 +64,17 @@ internal ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential = nu /// Posts a new entry to the ledger. A collection id may optionally be specified. /// - /// Schema for Request Body: + /// Below is the JSON schema for the request and response payloads. + /// + /// Request Body: + /// + /// Schema for LedgerEntry: /// { - /// contents: string (required), + /// contents: string, # Required. Contents of the ledger entry. /// collectionId: { - /// collectionId: string (required) - /// }, - /// transactionId: string + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. + /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// /// @@ -100,13 +104,17 @@ public virtual PostLedgerEntryOperation PostLedgerEntry( /// Posts a new entry to the ledger. A collection id may optionally be specified. /// - /// Schema for Request Body: + /// Below is the JSON schema for the request and response payloads. + /// + /// Request Body: + /// + /// Schema for LedgerEntry: /// { - /// contents: string (required), + /// contents: string, # Required. Contents of the ledger entry. /// collectionId: { - /// collectionId: string (required) - /// }, - /// transactionId: string + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. + /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// /// diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs index d9c52ca70ec7..c65a58fbbfb3 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs @@ -241,23 +241,13 @@ public virtual Response GetEnclaveQuotes(RequestContext context = null) /// Collection ids are user-created collections of ledger entries. /// The request context, which can override default behaviors on the request on a per-call basis. /// - /// Below is the JSON schema for the request and response payloads. - /// - /// Request Body: - /// - /// Schema for LedgerEntry: - /// { - /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. - /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. - /// } - /// + /// Below is the JSON schema for the response payload. /// /// Response Body: /// - /// Schema for LedgerWriteResult: + /// Schema for CollectionArray: /// { - /// subLedgerId: string, # Required. Identifier for sub-ledgers. + /// collectionId: string, # Required. /// } /// /// @@ -281,23 +271,13 @@ public virtual async Task GetCollectionsAsync(RequestContext context = /// Collection ids are user-created collections of ledger entries. /// The request context, which can override default behaviors on the request on a per-call basis. /// - /// Below is the JSON schema for the request and response payloads. - /// - /// Request Body: - /// - /// Schema for LedgerEntry: - /// { - /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. - /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. - /// } - /// + /// Below is the JSON schema for the response payload. /// /// Response Body: /// - /// Schema for LedgerWriteResult: + /// Schema for CollectionArray: /// { - /// subLedgerId: string, # Required. Identifier for sub-ledgers. + /// collectionId: string, # Required. /// } /// /// @@ -324,28 +304,27 @@ public virtual Response GetCollections(RequestContext context = null) /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. /// - /// Schema for Request Body: + /// Below is the JSON schema for the request and response payloads. + /// + /// Request Body: + /// + /// Schema for LedgerEntry: /// { - /// contents: string (required), + /// contents: string, # Required. Contents of the ledger entry. /// collectionId: { - /// collectionId: string (required) - /// }, - /// transactionId: string + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. + /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// - /// Schema for Response Body: + /// + /// Response Body: + /// + /// Schema for LedgerWriteResult: /// { /// collectionId: { - /// collectionId: string - /// } - /// } - /// - /// Schema for Response Error: - /// { - /// error: { - /// code: string, - /// message: string - /// } + /// collectionId: string, # Required. + /// }, # Required. Identifier for collections. /// } /// /// @@ -374,28 +353,27 @@ public virtual async Task PostLedgerEntryAsync(RequestContent content, /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. /// - /// Schema for Request Body: + /// Below is the JSON schema for the request and response payloads. + /// + /// Request Body: + /// + /// Schema for LedgerEntry: /// { - /// contents: string (required), + /// contents: string, # Required. Contents of the ledger entry. /// collectionId: { - /// collectionId: string (required) - /// }, - /// transactionId: string + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. + /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// - /// Schema for Response Body: + /// + /// Response Body: + /// + /// Schema for LedgerWriteResult: /// { /// collectionId: { - /// collectionId: string - /// } - /// } - /// - /// Schema for Response Error: - /// { - /// error: { - /// code: string, - /// message: string - /// } + /// collectionId: string, # Required. + /// }, # Required. Identifier for collections. /// } /// /// @@ -434,7 +412,9 @@ public virtual Response PostLedgerEntry(RequestContent content, string collectio /// state: "Loading" | "Ready", # Required. State of a ledger query. /// entry: { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// }, # Optional. The ledger entry found as a result of the query. This is only available if the query is in Ready state. /// } @@ -475,7 +455,9 @@ public virtual async Task GetLedgerEntryAsync(string transactionId, st /// state: "Loading" | "Ready", # Required. State of a ledger query. /// entry: { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// }, # Optional. The ledger entry found as a result of the query. This is only available if the query is in Ready state. /// } @@ -513,17 +495,24 @@ public virtual Response GetLedgerEntry(string transactionId, string collectionId /// Schema for TransactionReceipt: /// { /// receipt: { - /// leaf: string, # Required. Merkle tree leaf for this transaction. - /// nodeId: string, # Required. Id of the node returning the receipt. + /// cert: string, # Optional. + /// leaf: string, # Optional. + /// leafComponents: { + /// claimsDigest: string, # Optional. + /// commitEvidence: string, # Optional. + /// writeSetDigest: string, # Optional. + /// }, # Optional. + /// nodeId: string, # Required. /// proof: [ /// { /// left: string, # Optional. /// right: string, # Optional. /// } - /// ], # Required. Merkle proof. - /// root: string, # Required. Root of the Merkle tree at the time the transaction was recorded. - /// signature: string, # Required. Signature by the node, with its certificate, over the Merkle root. - /// }, # Optional. A receipt certifying the transaction at the specified id. + /// ], # Required. + /// root: string, # Optional. + /// serviceEndorsements: [string], # Optional. + /// signature: string, # Required. + /// }, # Optional. /// state: "Loading" | "Ready", # Required. State of a ledger query. /// transactionId: string, # Required. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } @@ -561,17 +550,24 @@ public virtual async Task GetReceiptAsync(string transactionId, Reques /// Schema for TransactionReceipt: /// { /// receipt: { - /// leaf: string, # Required. Merkle tree leaf for this transaction. - /// nodeId: string, # Required. Id of the node returning the receipt. + /// cert: string, # Optional. + /// leaf: string, # Optional. + /// leafComponents: { + /// claimsDigest: string, # Optional. + /// commitEvidence: string, # Optional. + /// writeSetDigest: string, # Optional. + /// }, # Optional. + /// nodeId: string, # Required. /// proof: [ /// { /// left: string, # Optional. /// right: string, # Optional. /// } - /// ], # Required. Merkle proof. - /// root: string, # Required. Root of the Merkle tree at the time the transaction was recorded. - /// signature: string, # Required. Signature by the node, with its certificate, over the Merkle root. - /// }, # Optional. A receipt certifying the transaction at the specified id. + /// ], # Required. + /// root: string, # Optional. + /// serviceEndorsements: [string], # Optional. + /// signature: string, # Required. + /// }, # Optional. /// state: "Loading" | "Ready", # Required. State of a ledger query. /// transactionId: string, # Required. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } @@ -679,7 +675,9 @@ public virtual Response GetTransactionStatus(string transactionId, RequestContex /// Schema for LedgerEntry: /// { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// @@ -712,7 +710,9 @@ public virtual async Task GetCurrentLedgerEntryAsync(string collection /// Schema for LedgerEntry: /// { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// @@ -738,7 +738,6 @@ public virtual Response GetCurrentLedgerEntry(string collectionId = null, Reques /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. public virtual async Task DeleteUserAsync(string userId, RequestContext context = null) { Argument.AssertNotNull(userId, nameof(userId)); @@ -761,7 +760,6 @@ public virtual async Task DeleteUserAsync(string userId, RequestContex /// The user id, either an AAD object ID or certificate fingerprint. /// The request context, which can override default behaviors on the request on a per-call basis. /// is null. - /// is an empty string, and was expected to be non-empty. public virtual Response DeleteUser(string userId, RequestContext context = null) { Argument.AssertNotNull(userId, nameof(userId)); @@ -955,7 +953,9 @@ public virtual Response CreateOrUpdateUser(string userId, RequestContent content /// Schema for LedgerEntries: /// { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } /// @@ -996,7 +996,9 @@ async IAsyncEnumerable> CreateEnumerableAsync(string nextLink, /// Schema for LedgerEntries: /// { /// contents: string, # Required. Contents of the ledger entry. - /// subLedgerId: string, # Optional. Identifier for sub-ledgers. + /// collectionId: { + /// collectionId: string, # Required. + /// }, # Optional. Identifier for collections. /// transactionId: string, # Optional. A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. /// } ///