diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 397f5d12ef01..b31e3365ac74 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -531,6 +531,12 @@ "startf", "dpkg" ] + }, + { + "filename": "sdk/confidentialledger/test-resources.bicep", + "words": [ + "pysdkci" + ] } ], "allowCompoundWords": true diff --git a/sdk/confidentialledger/azure-confidentialledger/CHANGELOG.md b/sdk/confidentialledger/azure-confidentialledger/CHANGELOG.md index 0dddf2e275d3..b86fb668f34e 100644 --- a/sdk/confidentialledger/azure-confidentialledger/CHANGELOG.md +++ b/sdk/confidentialledger/azure-confidentialledger/CHANGELOG.md @@ -1,12 +1,23 @@ # Release History -## 1.0.0b2 (Unreleased) +## 1.0.0 (2022-07-19) + +GA Data Plane Python SDK for Confidential Ledger. ### Bugs Fixed +- User ids that are certificate fingerprints are no longer URL-encoded in the request URI. -### Other Changes +### Breaking Changes +- Removed all models. Methods now return JSON directly. +- `sub_ledger_id` fields are now named `collection_id`. +- `azure.confidentialledger.identity_service` has been renamed to `azure.confidentialledger.certificate`. +- `ConfidentialLedgerIdentityServiceClient` is now `ConfidentialLedgerCertificateClient`. +- `post_ledger_entry` has been renamed to `create_ledger_entry`. -- Python 2.7 is no longer supported. Please use Python version 3.6 or later. +### Other Changes +- Python 2.7 is no longer supported. Please use Python version 3.7 or later. +- Convenience poller methods added for certain long-running operations. +- Add new supported API version: `2022-05-13`. ## 1.0.0b1 (2021-05-12) diff --git a/sdk/confidentialledger/azure-confidentialledger/README.md b/sdk/confidentialledger/azure-confidentialledger/README.md index 6dbd304a0944..7c38bf5a2426 100644 --- a/sdk/confidentialledger/azure-confidentialledger/README.md +++ b/sdk/confidentialledger/azure-confidentialledger/README.md @@ -35,32 +35,50 @@ export AZURE_TENANT_ID="tenant id" ``` Then, `DefaultAzureCredential` will be able to authenticate the `ConfidentialLedgerClient`. -Constructing the client also requires your Confidential Ledger's URL and id, which you can get from the Azure CLI or the Azure Portal. When you have retrieved those values, please replace instances of `"my-ledger-id"` and `"https://my-ledger-url.confidential-ledger.azure.com"` in the examples below. You may also need to replace `"https://identity.accledger.azure.com"` with the hostname from the `identityServiceUri` in the ARM description of your ledger. +Constructing the client also requires your Confidential Ledger's URL and id, which you can get from the Azure CLI or the Azure Portal. When you have retrieved those values, please replace instances of `"my-ledger-id"` and `"https://my-ledger-id.confidential-ledger.azure.com"` in the examples below. You may also need to replace `"https://identity.confidential-ledger.core.azure.com"` with the hostname from the `identityServiceUri` in the ARM description of your ledger. Because Confidential Ledgers use self-signed certificates securely generated and stored in an enclave, the signing certificate for each Confidential Ledger must first be retrieved from the Confidential Ledger Identity Service. ```python -from azure.identity import DefaultAzureCredential from azure.confidentialledger import ConfidentialLedgerClient -from azure.confidentialledger.identity_service import ConfidentialLedgerIdentityServiceClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -identity_client = ConfidentialLedgerIdentityServiceClient("https://identity.accledger.azure.com") +identity_client = ConfidentialLedgerCertificateClient() network_identity = identity_client.get_ledger_identity( ledger_id="my-ledger-id" ) ledger_tls_cert_file_name = "ledger_certificate.pem" with open(ledger_tls_cert_file_name, "w") as cert_file: - cert_file.write(network_identity.ledger_tls_certificate) + cert_file.write(network_identity["ledgerTlsCertificate"]) credential = DefaultAzureCredential() ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", + endpoint="https://my-ledger-id.confidential-ledger.azure.com", credential=credential, ledger_certificate_path=ledger_tls_cert_file_name ) ``` +Conveniently, the `ConfidentialLedgerClient` constructor will fetch the ledger TLS certificate (and write it to the specified file) if it is provided with a non-existent file. The user is responsible for removing the created file as needed. + +```python +from azure.confidentialledger import ConfidentialLedgerClient +from azure.identity import DefaultAzureCredential + +credential = DefaultAzureCredential() +ledger_client = ConfidentialLedgerClient( + endpoint="https://my-ledger-id.confidential-ledger.azure.com", + credential=credential, + ledger_certificate_path="ledger_certificate.pem" +) + +# The ledger TLS certificate is written to `ledger_certificate.pem`. +``` + +To make it clear that a file is being used for the ledger TLS certificate, subsequent examples will explicitly write the ledger TLS certificate to a file. + ## Key concepts ### Ledger entries and transactions Every write to Azure Confidential Ledger generates an immutable ledger entry in the service. Writes, also referred to as transactions, are uniquely identified by transaction ids that increment with each write. Once written, ledger entries may be retrieved at any time. @@ -68,10 +86,10 @@ Every write to Azure Confidential Ledger generates an immutable ledger entry in ### Receipts State changes to the Confidential Ledger are saved in a data structure called a Merkle tree. To cryptographically verify that writes were correctly saved, a Merkle proof, or receipt, can be retrieved for any transaction id. -### Sub-ledgers -While most use cases will involve one ledger, we provide the sub-ledger feature in case semantically or logically different groups of data need to be stored in the same Confidential Ledger. +### Collections +While most use cases involve just one collection per Confidential Ledger, we provide the collection id feature in case semantically or logically different groups of data need to be stored in the same Confidential Ledger. -Ledger entries are retrieved by their sub-ledger identifier. The Confidential Ledger will always assume a constant, service-determined sub-ledger id for entries submitted without a sub-ledger specified. +Ledger entries are retrieved by their `collectionId`. The Confidential Ledger will always assume a constant, service-determined `collectionId` for entries written without a `collectionId` specified. ### Users Users are managed directly with the Confidential Ledger instead of through Azure. Users may be AAD-based, identified by their AAD object id, or certificate-based, identified by their PEM certificate fingerprint. @@ -80,278 +98,265 @@ Users are managed directly with the Confidential Ledger instead of through Azure [Azure Confidential Computing][azure_confidential_computing] allows you to isolate and protect your data while it is being processed in the cloud. Azure Confidential Ledger runs on Azure Confidential Computing virtual machines, thus providing stronger data protection with encryption of data in use. ### Confidential Consortium Framework -Azure Confidential Ledger is built on Microsoft Research's open-source [Confidential Consortium Framework (CCF)][ccf]. Under CCF, applications are managed by a consortium of members with the ability to submit proposals to modify and govern application operation. In Azure Confidential Ledger, Microsoft Azure owns a member identity, allowing it to perform governance actions like replacing unhealthy nodes in the Confidential Ledger, or upgrading the enclave code. +Azure Confidential Ledger is built on Microsoft Research's open-source [Confidential Consortium Framework (CCF)][ccf]. Under CCF, applications are managed by a consortium of members with the ability to submit proposals to modify and govern application operation. In Azure Confidential Ledger, Microsoft Azure owns an operator member identity that allows it to perform governance and maintenance actions like replacing unhealthy nodes in the Confidential Ledger and upgrading the enclave code. ## Examples -This section contains code snippets covering common tasks: -* [Append a ledger entry](#append-entry "Append a ledger entry") -* [Get a receipt](#get-receipt "Get a receipt") -* [Using sub-ledgers](#using-sub-ledgers "Using sub-ledgers") -* [Retrieving ledger entries](#retrieving-ledger-entries "Retrieving ledger entries") -* [Making a ranged query](#making-a-ranged-query "Making a ranged query") -* [Managing users](#managing-users "Managing users") -* [Using certificate authentication](#using-certificate-authentication "Using certificate authentication") -* [Verifying service details](#verifying-service-details "Verifying service details") -* [Asynchronously get a ledger entry](#asynchronously-get-a-ledger-entry "Asynchronously get a ledger entry") -* [Asynchronously get a range of ledger entries](#asynchronously-get-a-range-of-ledger-entries "Asynchronously get a range of ledger entries") - +This section contains code snippets covering common tasks, including: +- [Append entry](#append-entry) +- [Retrieving ledger entries](#retrieving-ledger-entries) +- [Making a ranged query](#making-a-ranged-query) +- [Managing users](#managing-users) +- [Using certificate authentication](#using-certificate-authentication) ### Append entry Data that needs to be stored immutably in a tamper-proof manner can be saved to Azure Confidential Ledger by appending an entry to the ledger. -```python -first_append_result = ledger_client.append_to_ledger(entry_contents="Hello world!") -print(first_append_result.transaction_id) -``` +Since Confidential Ledger is a distributed system, rare transient failures may cause writes to be lost. For entries that must be preserved, it is advisable to verify that the write became durable. For less important writes where higher client throughput is preferred, the wait step may be skipped. -Since Confidential Ledger is a distributed system, rare transient failures may cause writes to be lost. For entries that must be preserved, it is advisable to verify that the write became durable. Waits are blocking calls. ```python -from azure.confidentialledger import TransactionState -ledger_client.wait_until_durable(transaction_id=first_append_result.transaction_id) -assert ledger_client.get_transaction_status( - transaction_id=first_append_result.transaction_id -).state is TransactionState.COMMITTED - -# Alternatively, a client may wait when appending. -append_result = ledger_client.append_to_ledger( - entry_contents="Hello world, again!", wait_for_commit=True -) -assert ledger_client.get_transaction_status( - transaction_id=append_result.transaction_id -).state is TransactionState.COMMITTED -``` +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -### Get receipt -A receipt can be retrieved for any transaction id to provide cryptographic proof of the contents of the transaction. -```python -receipt = ledger_client.get_transaction_receipt( - transaction_id=append_result.transaction_id +identity_client = ConfidentialLedgerCertificateClient() +network_identity = identity_client.get_ledger_identity( + ledger_id="my-ledger-id" ) -print(receipt.contents) -``` -### Using sub-ledgers -Clients can write to different sub-ledgers to separate logically-distinct data. -```python -ledger_client.append_to_ledger( - entry_contents="Hello from Alice", sub_ledger_id="Alice" -) -ledger_client.append_to_ledger( - entry_contents="Hello from Bob", sub_ledger_id="Bob" +ledger_tls_cert_file_name = "ledger_certificate.pem" +with open(ledger_tls_cert_file_name, "w") as cert_file: + cert_file.write(network_identity["ledgerTlsCertificate"]) + +credential = DefaultAzureCredential() +ledger_client = ConfidentialLedgerClient( + endpoint="https://my-ledger-id.confidential-ledger.azure.com", + credential=credential, + ledger_certificate_path=ledger_tls_cert_file_name ) + +post_entry_result = ledger_client.create_ledger_entry( + {"contents": "Hello world!"} + ) +transaction_id = post_entry_result["transactionId"] + +wait_poller = ledger_client.begin_wait_for_commit(transaction_id) +wait_poller.wait() +print(f'Ledger entry at transaction id {transaction_id} has been committed successfully') ``` -When no sub-ledger id is specified on method calls, the Confidential Ledger service will assume a constant, service-determined sub-ledger id. +Alternatively, the client may wait for commit when writing a ledger entry. + ```python -append_result = ledger_client.append_to_ledger(entry_contents="Hello world?", wait_for_commit=True) +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -# The append result contains the sub-ledger id assigned. -entry_by_subledger = ledger_client.get_ledger_entry( - transaction_id=append_result.transaction_id, - sub_ledger_id=append_result.sub_ledger_id +identity_client = ConfidentialLedgerCertificateClient() +network_identity = identity_client.get_ledger_identity( + ledger_id="my-ledger-id" ) -assert entry_by_subledger.contents == "Hello world?" -# When a ledger entry is retrieved without a sub-ledger specified, -# the service default is used. -entry = ledger_client.get_ledger_entry(transaction_id=append_result.transaction_id) -assert entry.contents == entry_by_subledger.contents -assert entry.sub_ledger_id == entry_by_subledger.sub_ledger_id +ledger_tls_cert_file_name = "ledger_certificate.pem" +with open(ledger_tls_cert_file_name, "w") as cert_file: + cert_file.write(network_identity["ledgerTlsCertificate"]) + +credential = DefaultAzureCredential() +ledger_client = ConfidentialLedgerClient( + endpoint="https://my-ledger-id.confidential-ledger.azure.com", + credential=credential, + ledger_certificate_path=ledger_tls_cert_file_name +) + +post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "Hello world again!"} +) +new_post_result = post_poller.result() +print( + 'The new ledger entry has been committed successfully at transaction id ' + f'{new_post_result["transactionId"]}' +) ``` ### Retrieving ledger entries -Ledger entries are retrieved from sub-ledgers. When a transaction id is specified, the returned value is the value contained in the specified sub-ledger at the point in time identified by the transaction id. If no transaction id is specified, the latest available value is returned. +Getting ledger entries older than the latest may take some time as the service is loading historical entries, so a poller is provided. + +Ledger entries are retrieved by collection. The returned value is the value contained in the specified collection at the point in time identified by the transaction id. + ```python -append_result = ledger_client.append_to_ledger(entry_contents="Hello world 0") -ledger_client.append_to_ledger(entry_contents="Hello world 1") +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -subledger_append_result = ledger_client.append_to_ledger( - entry_contents="Hello world sub-ledger 0", - sub_ledger_id="sub-ledger" +identity_client = ConfidentialLedgerCertificateClient() +network_identity = identity_client.get_ledger_identity( + ledger_id="my-ledger-id" +) + +ledger_tls_cert_file_name = "ledger_certificate.pem" +with open(ledger_tls_cert_file_name, "w") as cert_file: + cert_file.write(network_identity["ledgerTlsCertificate"]) + +credential = DefaultAzureCredential() +ledger_client = ConfidentialLedgerClient( + endpoint="https://my-ledger-id.confidential-ledger.azure.com", + credential=credential, + ledger_certificate_path=ledger_tls_cert_file_name ) -ledger_client.append_to_ledger( - entry_contents="Hello world sub-ledger 1", - sub_ledger_id="sub-ledger", - wait_for_commit=True + +post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "Original hello"} ) +post_result = post_poller.result() -# The ledger entry written at 'append_result.transaction_id' -# is retrieved from the default sub-ledger. -entry = ledger_client.get_ledger_entry(transaction_id=append_result.transaction_id) -assert entry.contents == "Hello world 0" +latest_entry = ledger_client.get_current_ledger_entry() +print( + f'Current entry (transaction id = {latest_entry["transactionId"]}) " + f"in collection {latest_entry["collectionId"]}: {latest_entry["contents"]}' +) -# This is the latest entry available in the default sub-ledger. -latest_entry = ledger_client.get_ledger_entry() -assert latest_entry.contents == "Hello world 1" +prior_transaction_id = latest_entry["transactionId"] -# The ledger entry written at 'subledger_append_result.transaction_id' -# is retrieved from the sub-ledger 'sub-ledger'. -subledger_entry = ledger_client.get_ledger_entry( - transaction_id=subledger_append_result.transaction_id, - sub_ledger_id="sub-ledger" +post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "Hello!"} ) -assert subledger_entry.contents == "Hello world sub-ledger 0" +post_result = post_poller.result() -# This is the latest entry available in the sub-ledger 'sub-ledger'. -subledger_latest_entry = ledger_client.get_ledger_entry( - sub_ledger_id="sub-ledger" +get_entry_poller = ledger_client.begin_get_ledger_entry(prior_transaction_id) +older_entry = get_entry_poller.result() +print( + f'Contents of {older_entry["collectionId"]} at {prior_transaction_id}: {older_entry["contents"]}' ) -assert subledger_latest_entry.contents == "Hello world sub-ledger 1" ``` ### Making a ranged query -Ledger entries in a sub-ledger may be retrieved over a range of transaction ids. +Ledger entries may be retrieved over a range of transaction ids. Entries will only be returned from the default or specified collection. + ```python -ranged_result = ledger_client.get_ledger_entries( - from_transaction_id=first_append_result.transaction_id +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential + +identity_client = ConfidentialLedgerCertificateClient() +network_identity = identity_client.get_ledger_identity( + ledger_id="my-ledger-id" ) -for entry in ranged_result: - print(f"Transaction id {entry.transaction_id} contents: {entry.contents}") -``` -### Managing users -Users with `Administrator` privileges can manage users of the Confidential Ledger directly with the Confidential Ledger itself. Available roles are `Reader` (read-only), `Contributor` (read and write), and `Administrator` (read, write, and add or remove users). +ledger_tls_cert_file_name = "ledger_certificate.pem" +with open(ledger_tls_cert_file_name, "w") as cert_file: + cert_file.write(network_identity["ledgerTlsCertificate"]) -```python -from azure.confidentialledger import LedgerUserRole -user_id = "some AAD object id" -user = ledger_client.create_or_update_user( - user_id, LedgerUserRole.CONTRIBUTOR +credential = DefaultAzureCredential() +ledger_client = ConfidentialLedgerClient( + endpoint="https://my-ledger-id.confidential-ledger.azure.com", + credential=credential, + ledger_certificate_path=ledger_tls_cert_file_name ) -# A client may now be created and used with AAD credentials for the user identified by `user_id`. -user = ledger_client.get_user(user_id) -assert user.id == user_id -assert user.role == LedgerUserRole.CONTRIBUTOR +post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "First message"} +) +first_transaction_id = post_poller.result()["transactionId"] -ledger_client.delete_user(user_id) +for i in range(10): + ledger_client.create_ledger_entry( + {"contents": f"Message {i}"} + ) -# For a certificate-based user, their user ID is the fingerprint for their PEM certificate. -user_id = "PEM certificate fingerprint" -user = ledger_client.create_or_update_user( - user_id, LedgerUserRole.READER +post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "Last message"} ) +last_transaction_id = post_poller.result()["transactionId"] + +ranged_result = ledger_client.list_ledger_entries( + from_transaction_id=first_transaction_id, + to_transaction_id=last_transaction_id, +) +for entry in ranged_result: + print(f'Contents at {entry["transactionId"]}: {entry["contents"]}') ``` -### Using certificate authentication -Clients may authenticate with a client certificate in mutual TLS instead of via an Azure Active Directory token. `ConfidentialLedgerCertificateCredential` is provided for such clients. +### Managing users +Users with `Administrator` privileges can manage users of the Confidential Ledger directly with the Confidential Ledger itself. Available roles are `Reader` (read-only), `Contributor` (read and write), and `Administrator` (read, write, and add or remove users). + ```python -from azure.confidentialledger import ConfidentialLedgerClient, ConfidentialLedgerCertificateCredential -from azure.confidentialledger.identity_service import ConfidentialLedgerIdentityServiceClient +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -identity_client = ConfidentialLedgerIdentityServiceClient("https://identity.accledger.azure.com") +identity_client = ConfidentialLedgerCertificateClient() network_identity = identity_client.get_ledger_identity( ledger_id="my-ledger-id" ) ledger_tls_cert_file_name = "ledger_certificate.pem" with open(ledger_tls_cert_file_name, "w") as cert_file: - cert_file.write(network_identity.ledger_tls_certificate) + cert_file.write(network_identity["ledgerTlsCertificate"]) -credential = ConfidentialLedgerCertificateCredential("path to user certificate PEM") +credential = DefaultAzureCredential() ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", + endpoint="https://my-ledger-id.confidential-ledger.azure.com", credential=credential, ledger_certificate_path=ledger_tls_cert_file_name ) -``` -### Verifying service details -One may want to validate details about the Confidential Ledger for a variety of reasons. For example, you may want to view details about how Microsoft may manage your Confidential Ledger as part of [Confidential Consortium Framework governance](https://microsoft.github.io/CCF/main/governance/index.html), or verify that your Confidential Ledger is indeed running in a secure enclave. A number of client methods are provided for these use cases. -```python -consortium = ledger_client.get_consortium() -# Consortium members can manage and alter the Confidential Ledger, -# such as by replacing unhealthy nodes. -for member in consortium.members: - print(member.certificate) - print(member.id) - -import hashlib -# The constitution is a collection of JavaScript code that -# defines actions available to members, -# and vets proposals by members to execute those actions. -constitution = ledger_client.get_constitution() -assert constitution.digest.lower() == \ - hashlib.sha256(constitution.contents.encode()).hexdigest().lower() -print(constitution.contents) -print(constitution.digest) - -# Enclave quotes contain material that can be used to -# cryptographically verify the validity and contents -# of an enclave. -ledger_enclaves = ledger_client.get_enclave_quotes() -assert ledger_enclaves.source_node in ledger_enclaves.quotes -for node_id, quote in ledger_enclaves.quotes.items(): - assert node_id == quote.node_id - print(quote.node_id) - print(quote.mrenclave) - print(quote.raw_quote) - print(quote.version) -``` +user_id = "some AAD object id" +user = ledger_client.create_or_update_user( + user_id, {"assignedRole": "Contributor"} +) +# A client may now be created and used with AAD credentials (i.e. AAD-issued JWT tokens) for the user identified by `user_id`. -[Microsoft Azure Attestation Service](https://azure.microsoft.com/services/azure-attestation/) is one provider of enclave quotes. +user = ledger_client.get_user(user_id) +assert user["userId"] == user_id +assert user["assignedRole"] == "Contributor" -### Async API -This library includes a complete async API supported on Python 3.5+. To use it, you must first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp). See the [azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport) for more information. +ledger_client.delete_user(user_id) + +# For a certificate-based user, their user ID is the fingerprint for their PEM certificate. +user_id = "PEM certificate fingerprint" +user = ledger_client.create_or_update_user( + user_id, {"assignedRole": "Reader"} +) -An async client is obtained from `azure.confidentialledger.aio`. Methods have the same names and signatures as the synchronous client. +user = ledger_client.get_user(user_id) +assert user["userId"] == user_id +assert user["assignedRole"] == "Reader" -Async clients should be closed when they're no longer needed. These objects are async context managers and define async `close` methods. For example: +ledger_client.delete_user(user_id) +``` + +### Using certificate authentication +Clients may authenticate with a client certificate in mutual TLS instead of via an Azure Active Directory token. `ConfidentialLedgerCertificateCredential` is provided for such clients. ```python -from azure.identity.aio import DefaultAzureCredential -from azure.confidentialledger.aio import ConfidentialLedgerClient -from azure.confidentialledger.identity_service.aio import ConfidentialLedgerIdentityServiceClient +from azure.confidentialledger import ( + ConfidentialLedgerCertificateCredential, + ConfidentialLedgerClient, +) +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient -identity_client = ConfidentialLedgerIdentityServiceClient("https://identity.accledger.azure.com") -network_identity = await identity_client.get_ledger_identity( +identity_client = ConfidentialLedgerCertificateClient() +network_identity = identity_client.get_ledger_identity( ledger_id="my-ledger-id" ) ledger_tls_cert_file_name = "ledger_certificate.pem" with open(ledger_tls_cert_file_name, "w") as cert_file: - cert_file.write(network_identity.ledger_tls_certificate) + cert_file.write(network_identity["ledgerTlsCertificate"]) -credential = DefaultAzureCredential() -ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", - credential=credential, - ledger_certificate_path=ledger_tls_cert_file_name +credential = ConfidentialLedgerCertificateCredential( + certificate_path="Path to user certificate PEM file" ) - -# Call close when the client and credential are no longer needed. -await client.close() -await credential.close() - -# Alternatively, use them as async context managers (contextlib.AsyncExitStack can help). ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", + endpoint="https://my-ledger-id.confidential-ledger.azure.com", credential=credential, ledger_certificate_path=ledger_tls_cert_file_name ) -async with client: - async with credential: - pass ``` -#### Asynchronously get a ledger entry -Ledger entries may be retrieved with the async client. -```python -entry = await self.client.get_ledger_entry() -print(entry.contents) -print(entry.sub_ledger_id) -``` +### Async API +This library includes a complete async API supported on Python 3.5+. To use it, you must first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp). See the [azure-core documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport) for more information. -#### Asynchronously get a range of ledger entries -Ledger entries may be retrieved over a range with the async client. -```python -query_result = client.get_ledger_entries( - from_transaction_id="12.3" -) -async for entry in query_result: - print(entry.transaction_id) - print(entry.contents) -``` +An async client is obtained from `azure.confidentialledger.aio`. Methods have the same names and signatures as the synchronous client. Samples may be found [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples). ## Troubleshooting ### General @@ -359,28 +364,30 @@ Confidential Ledger clients raise exceptions defined in [azure-core][azure_core_ ```python from azure.core.exceptions import ResourceNotFoundError -from azure.identity import DefaultAzureCredential from azure.confidentialledger import ConfidentialLedgerClient -from azure.confidentialledger.identity_service import ConfidentialLedgerIdentityServiceClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential -identity_client = ConfidentialLedgerIdentityServiceClient("https://identity.accledger.azure.com") +identity_client = ConfidentialLedgerCertificateClient() network_identity = identity_client.get_ledger_identity( ledger_id="my-ledger-id" ) ledger_tls_cert_file_name = "ledger_certificate.pem" with open(ledger_tls_cert_file_name, "w") as cert_file: - cert_file.write(network_identity.ledger_tls_certificate) + cert_file.write(network_identity["ledgerTlsCertificate"]) credential = DefaultAzureCredential() ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", + endpoint="https://my-ledger-id.confidential-ledger.azure.com", credential=credential, ledger_certificate_path=ledger_tls_cert_file_name ) try: - ledger_client.get_ledger_entry(transaction_id="10000.100000") + ledger_client.begin_get_ledger_entry( + transaction_id="10000.100000" # Using a very high id that probably doesn't exist in the ledger if it's relatively new. + ) except ResourceNotFoundError as e: print(e.message) ``` @@ -394,9 +401,9 @@ Detailed DEBUG level logging, including request/response bodies and unredacted h import logging import sys -from azure.identity import DefaultAzureCredential from azure.confidentialledger import ConfidentialLedgerClient -from azure.confidentialledger.identity_service import ConfidentialLedgerIdentityServiceClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.identity import DefaultAzureCredential # Create a logger for the 'azure' SDK logger = logging.getLogger('azure') @@ -406,32 +413,47 @@ logger.setLevel(logging.DEBUG) handler = logging.StreamHandler(stream=sys.stdout) logger.addHandler(handler) -identity_client = ConfidentialLedgerIdentityServiceClient("https://identity.accledger.azure.com") +identity_client = ConfidentialLedgerCertificateClient() network_identity = identity_client.get_ledger_identity( ledger_id="my-ledger-id" ) ledger_tls_cert_file_name = "ledger_certificate.pem" with open(ledger_tls_cert_file_name, "w") as cert_file: - cert_file.write(network_identity.ledger_tls_certificate) + cert_file.write(network_identity["ledgerTlsCertificate"]) credential = DefaultAzureCredential() -# This client will log detailed information about its HTTP sessions, at DEBUG level +# This client will log detailed information about its HTTP sessions, at DEBUG level. ledger_client = ConfidentialLedgerClient( - endpoint="https://my-ledger-url.confidential-ledger.azure.com", + endpoint="https://my-ledger-id.confidential-ledger.azure.com", credential=credential, ledger_certificate_path=ledger_tls_cert_file_name, - logging_enable=True + logging_enable=True, ) ``` Similarly, `logging_enable` can enable detailed logging for a single operation, even when it isn't enabled for the client: ```python -ledger_client.get_ledger_entry(transaction_id="12.3", logging_enable=True) +ledger_client.get_current_ledger_entry(logging_enable=True) ``` ## Next steps +### More sample code +These code samples show common scenario operations with the Azure Confidential Ledger client library. + +Common scenarios + +- Writing to the ledger: [write_to_ledger.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py]) +- Write many ledger entries and retrievee them all afterwards: [list_ledger_entries.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py]) +- Manage users using service-implemented role-based access control: [manage_users.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py]) + +Advanced scenarios + +- Using collections: [use_collections.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py]) +- Getting receipts for ledger writes: [get_receipt.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py]) +- Verifying service details: [verify_service.py][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py] ([async version][https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py]) + ### Additional Documentation For more extensive documentation on Azure Confidential Ledger, see the [API reference documentation][reference_docs]. You may also read more about Microsoft Research's open-source [Confidential Consortium Framework][ccf]. diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/__init__.py index 43762be102fc..8db66d3d0f0f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/__init__.py @@ -1,2 +1 @@ - __path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/__init__.py index 86f8b706c3ff..7a7b8cfc1b1b 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/__init__.py @@ -1,46 +1,24 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -# pylint: disable=unused-import +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- from ._client import ConfidentialLedgerClient -from ._enums import LedgerUserRole, TransactionState -from ._models import ( - AppendResult, - Consortium, - ConsortiumMember, - Constitution, - EnclaveQuote, - LedgerEnclaves, - LedgerEntry, - LedgerUser, - TransactionReceipt, - TransactionStatus, -) -from ._shared import ConfidentialLedgerCertificateCredential +from ._version import VERSION +__version__ = VERSION -__all__ = [ - "ConfidentialLedgerCertificateCredential", - "ConfidentialLedgerClient", - # Enums - "LedgerUserRole", - "TransactionState", - # Models - "AppendResult", - "Consortium", - "ConsortiumMember", - "Constitution", - "EnclaveQuote", - "LedgerEnclaves", - "LedgerEntry", - "LedgerUser", - "TransactionReceipt", - "TransactionStatus", -] +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk +__all__ = ["ConfidentialLedgerClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) -from ._version import VERSION - -__version__ = VERSION +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py index 15e1958c9f13..e3e1ea0641a8 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client.py @@ -1,481 +1,88 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- -import time +from copy import deepcopy +from typing import Any, TYPE_CHECKING -from azure.core.tracing.decorator import distributed_trace +from azure.core import PipelineClient +from azure.core.rest import HttpRequest, HttpResponse -from ._client_base import ConfidentialLedgerClientBase -from ._enums import LedgerUserRole, TransactionState -from ._generated._generated_ledger.v0_1_preview.models import ConfidentialLedgerQueryState -from ._models import ( - AppendResult, - Constitution, - Consortium, - ConsortiumMember, - EnclaveQuote, - LedgerEnclaves, - LedgerEntry, - LedgerUser, - TransactionReceipt, - TransactionStatus, -) -from ._shared import ( - ConfidentialLedgerCertificateCredential, -) - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False +from ._configuration import ConfidentialLedgerClientConfiguration +from ._operations import ConfidentialLedgerClientOperationsMixin +from ._serialization import Deserializer, Serializer if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - from azure.core.paging import ItemPaged - from typing import Any, Union - - -class ConfidentialLedgerClient(ConfidentialLedgerClientBase): - """A client for putting data into and querying data from the Confidential Ledger service. - - The `transport` parameter is typically accepted by Azure SDK clients to provide a custom - transport stage in the pipeline. Since this client makes modifications to the default transport, - using a custom transport will override and remove the following functionality: - 1) Authentication using a client certificate. - 2) TLS verification using the Confidential Ledger TLS certificate. - - :param str endpoint: URL of the Confidential Ledger service. - :param credential: A credential object for authenticating with the Confidential Ledger. - :type credential: ~azure.confidentialledger.ConfidentialLedgerCertificateCredential - :param str ledger_certificate_path: The path to the ledger's TLS certificate. - :keyword api_version: Version of the Confidential Ledger API to use. Defaults to the most recent. - Support API versions: - - 0.1-preview - :type api_version: str + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + +class ConfidentialLedgerClient( + ConfidentialLedgerClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential + Ledger service. + + :param ledger_endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. Required. + :type ledger_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ - def __init__(self, endpoint, credential, ledger_certificate_path, **kwargs): - # type: (str, Union[ConfidentialLedgerCertificateCredential, TokenCredential], str, Any) -> None - super(ConfidentialLedgerClient, self).__init__( - endpoint=endpoint, - credential=credential, - ledger_certificate_path=ledger_certificate_path, - **kwargs - ) - - @distributed_trace - def append_to_ledger( - self, - entry_contents, # type: str - **kwargs # type: Any - ): - # type: (...) -> AppendResult - """Appends an entry to the Confidential Ledger. - - :param entry_contents: Text to write to the ledger. - :type entry_contents: str - :keyword str sub_ledger_id: Identifies the sub-ledger to append to. If none is - specified, the service will use the service-default sub-ledger id. - :keyword bool wait_for_commit: If True, this method will not return until the write is - durably saved to the ledger. - """ - - wait_for_commit = kwargs.pop("wait_for_commit", False) - - if entry_contents is None: - raise ValueError("entry_contents must be a string") - - # pylint: disable=protected-access - result = self._client.confidential_ledger.post_ledger_entry( - contents=entry_contents, - # Not a valid kwarg for wait_for_commit (will throw at requests layer), - # so it has to be popped. - sub_ledger_id=kwargs.pop("sub_ledger_id", None), - cls=kwargs.pop("cls", AppendResult._from_pipeline_result), - **kwargs - ) - - if wait_for_commit: - self.wait_until_durable(result.transaction_id, **kwargs) - - return result - - @distributed_trace - def create_or_update_user( - self, - user_id, # type: str - role, # type: Union[str, LedgerUserRole] - **kwargs # type: Any - ): - # type: (...) -> LedgerUser - """Creates a new Confidential Ledger user, or updates an existing one. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :param role: Role to assigned to the user. - :type role: str or LedgerUserRole - :return: Details of the updated ledger user. - :rtype: ~azure.confidentialledger.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None or role is None: - raise ValueError("user_id or role cannot be None") - - result = self._client.confidential_ledger.create_or_update_user( - user_id=user_id, - assigned_role=role.value if isinstance(role, LedgerUserRole) else role, - **kwargs - ) - return LedgerUser( - user_id=result.user_id, role=LedgerUserRole(result.assigned_role) - ) - - @distributed_trace - def delete_user( - self, - user_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a user from the Confidential Ledger. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :return: None - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None: - raise ValueError("user_id cannot be None") - - self._client.confidential_ledger.delete_user(user_id=user_id, **kwargs) - - @distributed_trace - def get_constitution( - self, **kwargs # type: Any - ): - # type: (...) -> Constitution - """Gets the constitution used for governance. - - The constitution is a script that assesses and applies proposals from consortium members. - - :return: The contents of the constitution and its digest. - :rtype: ~azure.confidentialledger.Constitution - :raises: ~azure.core.exceptions.HttpResponseError - """ - - result = self._client.confidential_ledger.get_constitution(**kwargs) - return Constitution(script=result.script, digest=result.digest) - - @distributed_trace - def get_consortium( - self, - **kwargs # type: Any - ): - # type: (...) -> Consortium - """Gets the consortium members. - - Consortium members can manage the Confidential Ledger. - - :return: Details about the consortium. - :rtype: ~azure.confidentialledger.Consortium - :raises: ~azure.core.exceptions.HttpResponseError - """ - - result = self._client.confidential_ledger.get_consortium_members(**kwargs) - return Consortium( - members=[ - ConsortiumMember(certificate=member.certificate, member_id=member.id) - for member in result.members - ] - ) - - @distributed_trace - def get_enclave_quotes( - self, - **kwargs # type: Any - ): - # type: (...) -> LedgerEnclaves - """Gets enclave quotes from all nodes in the Confidential Ledger network. - - :return: Enclave quotes for nodes in the Confidential Ledger. - :rtype: ~azure.confidentialledger.LedgerEnclaves - :raises: ~azure.core.exceptions.HttpResponseError + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, ledger_endpoint: str, **kwargs: Any + ) -> None: + _endpoint = "{ledgerEndpoint}" + self._config = ConfidentialLedgerClientConfiguration(ledger_endpoint=ledger_endpoint, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse """ - result = self._client.confidential_ledger.get_enclave_quotes(**kwargs) - return LedgerEnclaves( - { - quote.node_id: EnclaveQuote( - node_id=quote.node_id, - mrenclave=quote.mrenclave, - raw_quote=quote.raw, - version=quote.quote_version, - ) - for quote in result.enclave_quotes.values() - }, - result.current_node_id, - ) - - @distributed_trace - def get_ledger_entries( - self, - **kwargs # type: Any - ): - # type: (...) -> ItemPaged[LedgerEntry] - """Gets a range of entries in the ledger. - - :keyword str from_transaction_id: Transaction identifier from which to start the query. - If this is not specified, the query begins from the first transaction. - :keyword str to_transaction_id: Transaction identifier at which to end the query - (inclusive). If this is not specified, the query ends at the end of the ledger. - :keyword str sub_ledger_id: Identifies the sub-ledger to fetch the ledger entry from. - :return: An iterable for iterating over the entries in the range. - :rtype: ~azure.core.paging.ItemPaged[LedgerEntry] - :raises: ~azure.core.exceptions.HttpResponseError - """ - - from_transaction_id = kwargs.pop("from_transaction_id", None) - to_transaction_id = kwargs.pop("to_transaction_id", None) - - if from_transaction_id is not None: - if not from_transaction_id: - raise ValueError( - "If not None, from_transaction_id must be a non-empty string" - ) - if to_transaction_id is not None: - if not to_transaction_id: - raise ValueError( - "If not None, to_transaction_id must be a non-empty string" - ) - - # pylint: disable=protected-access - return self._client.confidential_ledger.get_ledger_entries( - from_transaction_id=from_transaction_id, - to_transaction_id=to_transaction_id, - cls=kwargs.pop( - "cls", - lambda entries: [ - LedgerEntry._from_pipeline_result(entry) for entry in entries - ] - if entries is not None - else [], + request_copy = deepcopy(request) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True ), - **kwargs - ) - - @distributed_trace - def get_ledger_entry( - self, - **kwargs # type: Any - ): - # type: (...) -> LedgerEntry - """Gets an entry in the ledger. The query may need to be retried while the - service is loading results. - - :keyword float interval: Interval, in seconds, between retries while waiting for results, - defaults to 0.5. - :keyword int max_tries: Maximum number of times to try the query, defaults to 6. Retries are - attempted if the result is not Ready. - :keyword str transaction_id: A transaction identifier. If not specified, the latest - transaction is fetched. - :keyword sub_ledger_id: Identifies the sub-ledger to fetch the ledger entry from. - :return: The corresponding ledger entry. - :rtype: ~azure.confidentialledger.LedgerEntry - :raises: ~azure.core.exceptions.HttpResponseError - """ - - interval = kwargs.pop("interval", 0.5) - max_tries = kwargs.pop("max_tries", 6) - transaction_id = kwargs.pop("transaction_id", None) - - if transaction_id is not None: - if not transaction_id: - raise ValueError( - "If not None, transaction_id must be a non-empty string" - ) - - if transaction_id is None: - result = self._client.confidential_ledger.get_current_ledger_entry(**kwargs) - return LedgerEntry( - transaction_id=result.transaction_id, - contents=result.contents, - sub_ledger_id=result.sub_ledger_id, - ) - - ready = False - result = None - state = None - for _ in range(max_tries): - result = self._client.confidential_ledger.get_ledger_entry( - transaction_id=transaction_id, **kwargs - ) - ready = result.state == ConfidentialLedgerQueryState.READY - if not ready: - state = result.state - time.sleep(interval) - else: - break - if not ready: - raise TimeoutError( - "After {0} attempts, the query still had state {1}, not {2}".format( - max_tries, state, ConfidentialLedgerQueryState.READY - ) - ) - - return LedgerEntry( - transaction_id=result.entry.transaction_id, - contents=result.entry.contents, - sub_ledger_id=result.entry.sub_ledger_id, - ) - - @distributed_trace - def get_transaction_receipt( - self, - transaction_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> TransactionReceipt - """Get a receipt for a specific transaction. The query may need to be retried while the - service is loading results. - - :param transaction_id: Transaction identifier. - :type transaction_id: str - :keyword float interval: Interval, in seconds, between retries while waiting for results, - defaults to 0.5. - :keyword int max_tries: Maximum number of times to try the query, defaults to 6. Retries are - attempted if the result is not Ready. - :return: Receipt certifying the specified transaction. - :rtype: ~azure.confidentialledger.TransactionReceipt - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if transaction_id is None: - raise ValueError("transaction_id cannot be None") - - interval = kwargs.pop("interval", 0.5) - max_tries = kwargs.pop("max_tries", 6) - - ready = False - result = None - state = None - for _ in range(max_tries): - result = self._client.confidential_ledger.get_receipt( - transaction_id=transaction_id, - **kwargs - ) - - ready = result.state == ConfidentialLedgerQueryState.READY - if not ready: - state = result.state - time.sleep(interval) - else: - break - if not ready: - raise TimeoutError( - "After {0} attempts, the query still had state {1}, not {2}".format( - max_tries, state, ConfidentialLedgerQueryState.READY - ) - ) - - return TransactionReceipt( - transaction_id=result.transaction_id, receipt=result.receipt - ) - - @distributed_trace - def get_transaction_status( - self, - transaction_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> TransactionStatus - """Gets the status of a transaction. - - :param transaction_id: Identifier for the transaction to get the status of. - :type transaction_id: str - :return: Status object describing the transaction status. - :rtype: ~azure.confidentialledger.TransactionStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if transaction_id is None: - raise ValueError("transaction_id cannot be None") - - result = self._client.confidential_ledger.get_transaction_status( - transaction_id=transaction_id, **kwargs - ) - return TransactionStatus( - transaction_id=result.transaction_id, state=TransactionState(result.state) - ) - - @distributed_trace - def get_user( - self, - user_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> LedgerUser - """Gets a Confidential Ledger user. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :return: Details about the user. - :rtype: ~azure.confidentialledger.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None: - raise ValueError("user_id cannot be None") - - result = self._client.confidential_ledger.get_user(user_id=user_id, **kwargs) - return LedgerUser( - user_id=result.user_id, role=LedgerUserRole(result.assigned_role) - ) - - @distributed_trace - def wait_until_durable( - self, - transaction_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Queries the status of the specified transaction until it is Committed, indicating that - the transaction is durably stored in the Confidential Ledger. If this state is not reached - by `max_queries`, a TimeoutError is raised. - - :param transaction_id: Identifies the transaction to wait for. - :type transaction_id: str - :keyword float interval: Interval, in seconds, between retries while waiting for results, - defaults to 0.5. - :keyword int max_queries: Maximum number of queries to make for durability, defaults to 3. - :return: None. - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - :raises: TimeoutError - """ + } - interval = kwargs.pop("interval", 0.5) - max_queries = kwargs.pop("max_queries", 3) + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) - for attempt_num in range(max_queries): - transaction_status = self.get_transaction_status( - transaction_id=transaction_id, **kwargs - ) - if transaction_status.state is TransactionState.COMMITTED: - return + def close(self): + # type: () -> None + self._client.close() - if attempt_num < max_queries - 1: - time.sleep(interval) + def __enter__(self): + # type: () -> ConfidentialLedgerClient + self._client.__enter__() + return self - raise TimeoutError( - "Transaction {0} is not {1} yet".format( - transaction_id, TransactionState.COMMITTED - ) - ) + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client_base.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client_base.py deleted file mode 100644 index 437902fe6158..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_client_base.py +++ /dev/null @@ -1,123 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from azure.core.pipeline.policies import BearerTokenCredentialPolicy, HttpLoggingPolicy - -from ._generated._generated_ledger.v0_1_preview import ( - ConfidentialLedgerClient as _ConfidentialLedgerClient, -) -from ._shared import ConfidentialLedgerCertificateCredential, DEFAULT_VERSION -from ._user_agent import USER_AGENT - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - from typing import Any, Union - - -class ConfidentialLedgerClientBase(object): - def __init__(self, endpoint, credential, ledger_certificate_path, **kwargs): - # type: (str, Union[ConfidentialLedgerCertificateCredential, TokenCredential], str, Any) -> None - - client = kwargs.get("generated_client") - if client: - # caller provided a configured client -> nothing left to initialize - self._client = client - return - - if not endpoint: - raise ValueError("Expected endpoint to be a non-empty string") - - if not credential: - raise ValueError("Expected credential to not be None") - - if not isinstance(ledger_certificate_path, str): - raise TypeError("ledger_certificate_path must be a string") - - if ledger_certificate_path == "": - raise ValueError( - "If not None, ledger_certificate_path must be a non-empty string" - ) - - try: - endpoint = endpoint.strip(" /") - if not endpoint.startswith("https://"): - self._endpoint = "https://" + endpoint - else: - self._endpoint = endpoint - except AttributeError: - raise ValueError("Confidential Ledger URL must be a string.") - - self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) - - if not kwargs.get("transport", None): - # Customize the transport layer to use client certificate authentication and validate - # a self-signed TLS certificate. - if isinstance(credential, ConfidentialLedgerCertificateCredential): - kwargs["connection_cert"] = credential.certificate_path - - kwargs["connection_verify"] = ledger_certificate_path - - http_logging_policy = HttpLoggingPolicy(**kwargs) - http_logging_policy.allowed_header_names.update( - { - "x-ms-keyvault-network-info", - "x-ms-keyvault-region", - "x-ms-keyvault-service-version", - } - ) - - if not isinstance(credential, ConfidentialLedgerCertificateCredential): - kwargs["authentication_policy"] = kwargs.pop( - "authentication_policy", - BearerTokenCredentialPolicy( - credential, - "https://confidential-ledger.azure.com/.default", - **kwargs - ), - ) - - try: - self._client = _ConfidentialLedgerClient( - self._endpoint, - api_version=self.api_version, - http_logging_policy=http_logging_policy, - sdk_moniker=USER_AGENT, - **kwargs - ) - except NotImplementedError: - raise NotImplementedError( - "This package doesn't support API version '{}'. ".format( - self.api_version - ) - + "Supported versions: 0.1-preview" - ) - - @property - def endpoint(self): - # type: () -> str - """The URL this client is connected to.""" - return self._endpoint - - def __enter__(self): - # type: () -> ConfidentialLedgerClientBase - self._client.__enter__() - return self - - def __exit__(self, *args): - # type: (Any) -> None - self._client.__exit__(*args) - - def close(self): - # type: () -> None - """Close sockets opened by the client. - - Calling this method is unnecessary when using the client as a context manager. - """ - self._client.close() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_configuration.py new file mode 100644 index 000000000000..3436c18050cb --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + + +class ConfidentialLedgerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ConfidentialLedgerClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param ledger_endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. Required. + :type ledger_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, ledger_endpoint: str, **kwargs: Any) -> None: + super(ConfidentialLedgerClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop("api_version", "2022-05-13") # type: str + + if ledger_endpoint is None: + raise ValueError("Parameter 'ledger_endpoint' must not be None.") + + self.ledger_endpoint = ledger_endpoint + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "confidentialledger/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_enums.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_enums.py deleted file mode 100644 index 16dbec4f84ab..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_enums.py +++ /dev/null @@ -1,21 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from enum import Enum - - -class LedgerUserRole(Enum): - """User roles assignable in a Confidential Ledger.""" - - ADMINISTRATOR = "Administrator" - CONTRIBUTOR = "Contributor" - READER = "Reader" - - -class TransactionState(Enum): - """Indicates the status of a transaction.""" - - COMMITTED = "Committed" - PENDING = "Pending" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_confidential_ledger_identity_service_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_confidential_ledger_identity_service_client.py deleted file mode 100644 index 4f40b466195a..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_confidential_ledger_identity_service_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core import PipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import ConfidentialLedgerIdentityServiceClientConfiguration -from .operations import ConfidentialLedgerIdentityServiceOperations -from . import models - - -class ConfidentialLedgerIdentityServiceClient(object): - """The ConfidentialLedgerIdentityServiceClient is used to retrieve the TLS certificate required for connecting to a Confidential Ledger. - - :ivar confidential_ledger_identity_service: ConfidentialLedgerIdentityServiceOperations operations - :vartype confidential_ledger_identity_service: azure.confidentialledger._generated/_generated_identity.v0_1_preview.operations.ConfidentialLedgerIdentityServiceOperations - :param identity_service_uri: The Identity Service URL, for example https://identity.accledger.azure.com. - :type identity_service_uri: str - """ - - def __init__( - self, - identity_service_uri, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - base_url = '{identityServiceUri}' - self._config = ConfidentialLedgerIdentityServiceClientConfiguration(identity_service_uri, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.confidential_ledger_identity_service = ConfidentialLedgerIdentityServiceOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'identityServiceUri': self._serialize.url("self._config.identity_service_uri", self._config.identity_service_uri, 'str', skip_quote=True), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> ConfidentialLedgerIdentityServiceClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_configuration.py deleted file mode 100644 index 59868ce0001a..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_configuration.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - -class ConfidentialLedgerIdentityServiceClientConfiguration(Configuration): - """Configuration for ConfidentialLedgerIdentityServiceClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param identity_service_uri: The Identity Service URL, for example https://identity.accledger.azure.com. - :type identity_service_uri: str - """ - - def __init__( - self, - identity_service_uri, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if identity_service_uri is None: - raise ValueError("Parameter 'identity_service_uri' must not be None.") - super(ConfidentialLedgerIdentityServiceClientConfiguration, self).__init__(**kwargs) - - self.identity_service_uri = identity_service_uri - self.api_version = "0.1-preview" - kwargs.setdefault('sdk_moniker', 'confidentialledger/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_version.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_version.py deleted file mode 100644 index b88f651c36ac..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/__init__.py deleted file mode 100644 index 8c928193cb70..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._confidential_ledger_identity_service_client import ConfidentialLedgerIdentityServiceClient -__all__ = ['ConfidentialLedgerIdentityServiceClient'] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_confidential_ledger_identity_service_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_confidential_ledger_identity_service_client.py deleted file mode 100644 index 040d84b52ef3..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_confidential_ledger_identity_service_client.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from msrest import Deserializer, Serializer - -from ._configuration import ConfidentialLedgerIdentityServiceClientConfiguration -from .operations import ConfidentialLedgerIdentityServiceOperations -from .. import models - - -class ConfidentialLedgerIdentityServiceClient(object): - """The ConfidentialLedgerIdentityServiceClient is used to retrieve the TLS certificate required for connecting to a Confidential Ledger. - - :ivar confidential_ledger_identity_service: ConfidentialLedgerIdentityServiceOperations operations - :vartype confidential_ledger_identity_service: azure.confidentialledger._generated/_generated_identity.v0_1_preview.aio.operations.ConfidentialLedgerIdentityServiceOperations - :param identity_service_uri: The Identity Service URL, for example https://identity.accledger.azure.com. - :type identity_service_uri: str - """ - - def __init__( - self, - identity_service_uri: str, - **kwargs: Any - ) -> None: - base_url = '{identityServiceUri}' - self._config = ConfidentialLedgerIdentityServiceClientConfiguration(identity_service_uri, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.confidential_ledger_identity_service = ConfidentialLedgerIdentityServiceOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'identityServiceUri': self._serialize.url("self._config.identity_service_uri", self._config.identity_service_uri, 'str', skip_quote=True), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "ConfidentialLedgerIdentityServiceClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_configuration.py deleted file mode 100644 index 0e4742f10a6c..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/_configuration.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -from .._version import VERSION - - -class ConfidentialLedgerIdentityServiceClientConfiguration(Configuration): - """Configuration for ConfidentialLedgerIdentityServiceClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param identity_service_uri: The Identity Service URL, for example https://identity.accledger.azure.com. - :type identity_service_uri: str - """ - - def __init__( - self, - identity_service_uri: str, - **kwargs: Any - ) -> None: - if identity_service_uri is None: - raise ValueError("Parameter 'identity_service_uri' must not be None.") - super(ConfidentialLedgerIdentityServiceClientConfiguration, self).__init__(**kwargs) - - self.identity_service_uri = identity_service_uri - self.api_version = "0.1-preview" - kwargs.setdefault('sdk_moniker', 'confidentialledger/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/_confidential_ledger_identity_service_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/_confidential_ledger_identity_service_operations.py deleted file mode 100644 index d30c64d88358..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/_confidential_ledger_identity_service_operations.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ConfidentialLedgerIdentityServiceOperations: - """ConfidentialLedgerIdentityServiceOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get_ledger_identity( - self, - ledger_id: str, - **kwargs - ) -> "_models.LedgerIdentityInformation": - """Gets identity information for a Confidential Ledger instance. - - Gets identity information for a Confidential Ledger instance. - - :param ledger_id: Id of the Confidential Ledger instance to get information for. - :type ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerIdentityInformation, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.LedgerIdentityInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerIdentityInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_ledger_identity.metadata['url'] # type: ignore - path_format_arguments = { - 'identityServiceUri': self._serialize.url("self._config.identity_service_uri", self._config.identity_service_uri, 'str', skip_quote=True), - 'ledgerId': self._serialize.url("ledger_id", ledger_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerIdentityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ledger_identity.metadata = {'url': '/ledgerIdentity/{ledgerId}'} # type: ignore diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/__init__.py deleted file mode 100644 index 94764acc773f..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ConfidentialLedgerError - from ._models_py3 import ConfidentialLedgerErrorBody - from ._models_py3 import LedgerIdentityInformation -except (SyntaxError, ImportError): - from ._models import ConfidentialLedgerError # type: ignore - from ._models import ConfidentialLedgerErrorBody # type: ignore - from ._models import LedgerIdentityInformation # type: ignore - -__all__ = [ - 'ConfidentialLedgerError', - 'ConfidentialLedgerErrorBody', - 'LedgerIdentityInformation', -] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models.py deleted file mode 100644 index bd6cb215422c..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class ConfidentialLedgerError(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: An error response from Confidential Ledger. - :vartype error: - ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerError, self).__init__(**kwargs) - self.error = None - - -class ConfidentialLedgerErrorBody(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar inner_error: An error response from Confidential Ledger. - :vartype inner_error: - ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'inner_error': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'inner_error': {'key': 'innererror', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.inner_error = None - - -class LedgerIdentityInformation(msrest.serialization.Model): - """Contains the information about a Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar ledger_id: Id for the ledger. - :vartype ledger_id: str - :param ledger_tls_certificate: Required. PEM-encoded certificate used for TLS by the - Confidential Ledger. - :type ledger_tls_certificate: str - """ - - _validation = { - 'ledger_id': {'readonly': True}, - 'ledger_tls_certificate': {'required': True}, - } - - _attribute_map = { - 'ledger_id': {'key': 'ledgerId', 'type': 'str'}, - 'ledger_tls_certificate': {'key': 'ledgerTlsCertificate', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LedgerIdentityInformation, self).__init__(**kwargs) - self.ledger_id = None - self.ledger_tls_certificate = kwargs['ledger_tls_certificate'] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models_py3.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models_py3.py deleted file mode 100644 index ed081abd7668..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/models/_models_py3.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class ConfidentialLedgerError(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: An error response from Confidential Ledger. - :vartype error: - ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerError, self).__init__(**kwargs) - self.error = None - - -class ConfidentialLedgerErrorBody(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar inner_error: An error response from Confidential Ledger. - :vartype inner_error: - ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'inner_error': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'inner_error': {'key': 'innererror', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.inner_error = None - - -class LedgerIdentityInformation(msrest.serialization.Model): - """Contains the information about a Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar ledger_id: Id for the ledger. - :vartype ledger_id: str - :param ledger_tls_certificate: Required. PEM-encoded certificate used for TLS by the - Confidential Ledger. - :type ledger_tls_certificate: str - """ - - _validation = { - 'ledger_id': {'readonly': True}, - 'ledger_tls_certificate': {'required': True}, - } - - _attribute_map = { - 'ledger_id': {'key': 'ledgerId', 'type': 'str'}, - 'ledger_tls_certificate': {'key': 'ledgerTlsCertificate', 'type': 'str'}, - } - - def __init__( - self, - *, - ledger_tls_certificate: str, - **kwargs - ): - super(LedgerIdentityInformation, self).__init__(**kwargs) - self.ledger_id = None - self.ledger_tls_certificate = ledger_tls_certificate diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/_confidential_ledger_identity_service_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/_confidential_ledger_identity_service_operations.py deleted file mode 100644 index f3f64a726d6f..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/_confidential_ledger_identity_service_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ConfidentialLedgerIdentityServiceOperations(object): - """ConfidentialLedgerIdentityServiceOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get_ledger_identity( - self, - ledger_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerIdentityInformation" - """Gets identity information for a Confidential Ledger instance. - - Gets identity information for a Confidential Ledger instance. - - :param ledger_id: Id of the Confidential Ledger instance to get information for. - :type ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerIdentityInformation, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_identity.v0_1_preview.models.LedgerIdentityInformation - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerIdentityInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_ledger_identity.metadata['url'] # type: ignore - path_format_arguments = { - 'identityServiceUri': self._serialize.url("self._config.identity_service_uri", self._config.identity_service_uri, 'str', skip_quote=True), - 'ledgerId': self._serialize.url("ledger_id", ledger_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerIdentityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ledger_identity.metadata = {'url': '/ledgerIdentity/{ledgerId}'} # type: ignore diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_confidential_ledger_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_confidential_ledger_client.py deleted file mode 100644 index b51db868d5fa..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_confidential_ledger_client.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core import PipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import ConfidentialLedgerClientConfiguration -from .operations import ConfidentialLedgerOperations -from . import models - - -class ConfidentialLedgerClient(object): - """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service. - - :ivar confidential_ledger: ConfidentialLedgerOperations operations - :vartype confidential_ledger: azure.confidentialledger._generated/_generated_ledger.v0_1_preview.operations.ConfidentialLedgerOperations - :param ledger_uri: The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. - :type ledger_uri: str - """ - - def __init__( - self, - ledger_uri, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - base_url = '{ledgerUri}' - self._config = ConfidentialLedgerClientConfiguration(ledger_uri, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.confidential_ledger = ConfidentialLedgerOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> ConfidentialLedgerClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_configuration.py deleted file mode 100644 index 0e847cf9532c..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_configuration.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any - - -class ConfidentialLedgerClientConfiguration(Configuration): - """Configuration for ConfidentialLedgerClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param ledger_uri: The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. - :type ledger_uri: str - """ - - def __init__( - self, - ledger_uri, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - if ledger_uri is None: - raise ValueError("Parameter 'ledger_uri' must not be None.") - super(ConfidentialLedgerClientConfiguration, self).__init__(**kwargs) - - self.ledger_uri = ledger_uri - self.api_version = "0.1-preview" - kwargs.setdefault('sdk_moniker', 'confidentialledger/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/__init__.py deleted file mode 100644 index 2fc6d6cf7e46..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._confidential_ledger_client import ConfidentialLedgerClient -__all__ = ['ConfidentialLedgerClient'] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_confidential_ledger_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_confidential_ledger_client.py deleted file mode 100644 index 2a52f48cfce9..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_confidential_ledger_client.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from msrest import Deserializer, Serializer - -from ._configuration import ConfidentialLedgerClientConfiguration -from .operations import ConfidentialLedgerOperations -from .. import models - - -class ConfidentialLedgerClient(object): - """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service. - - :ivar confidential_ledger: ConfidentialLedgerOperations operations - :vartype confidential_ledger: azure.confidentialledger._generated/_generated_ledger.v0_1_preview.aio.operations.ConfidentialLedgerOperations - :param ledger_uri: The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. - :type ledger_uri: str - """ - - def __init__( - self, - ledger_uri: str, - **kwargs: Any - ) -> None: - base_url = '{ledgerUri}' - self._config = ConfidentialLedgerClientConfiguration(ledger_uri, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.confidential_ledger = ConfidentialLedgerOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "ConfidentialLedgerClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_configuration.py deleted file mode 100644 index f97b993b1ffe..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/_configuration.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies - -from .._version import VERSION - - -class ConfidentialLedgerClientConfiguration(Configuration): - """Configuration for ConfidentialLedgerClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param ledger_uri: The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. - :type ledger_uri: str - """ - - def __init__( - self, - ledger_uri: str, - **kwargs: Any - ) -> None: - if ledger_uri is None: - raise ValueError("Parameter 'ledger_uri' must not be None.") - super(ConfidentialLedgerClientConfiguration, self).__init__(**kwargs) - - self.ledger_uri = ledger_uri - self.api_version = "0.1-preview" - kwargs.setdefault('sdk_moniker', 'confidentialledger/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/_confidential_ledger_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/_confidential_ledger_operations.py deleted file mode 100644 index 291f8e0ee1fc..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/_confidential_ledger_operations.py +++ /dev/null @@ -1,777 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ConfidentialLedgerOperations: - """ConfidentialLedgerOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def get_constitution( - self, - **kwargs - ) -> "_models.Constitution": - """Gets the constitution used for governance. - - The constitution is a script that assesses and applies proposals from consortium members. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Constitution, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.Constitution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Constitution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_constitution.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Constitution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_constitution.metadata = {'url': '/app/governance/constitution'} # type: ignore - - async def get_consortium_members( - self, - **kwargs - ) -> "_models.Consortium": - """Gets the consortium members. - - Consortium members can manage the Confidential Ledger. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Consortium, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.Consortium - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Consortium"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_consortium_members.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Consortium', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_consortium_members.metadata = {'url': '/app/governance/members'} # type: ignore - - async def get_enclave_quotes( - self, - **kwargs - ) -> "_models.ConfidentialLedgerEnclaves": - """Gets quotes for all nodes of the Confidential Ledger. - - A quote is an SGX enclave measurement that can be used to verify the validity of a node and its - enclave. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfidentialLedgerEnclaves, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerEnclaves - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfidentialLedgerEnclaves"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_enclave_quotes.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ConfidentialLedgerEnclaves', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_enclave_quotes.metadata = {'url': '/app/enclaveQuotes'} # type: ignore - - def get_ledger_entries( - self, - sub_ledger_id: Optional[str] = None, - from_transaction_id: Optional[str] = None, - to_transaction_id: Optional[str] = None, - **kwargs - ) -> AsyncIterable["_models.PagedLedgerEntries"]: - """Gets ledger entries from a sub-ledger corresponding to a range. - - A sub-ledger id may optionally be specified. Only entries in the specified (or default) - sub-ledger will be returned. - - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :param from_transaction_id: Specify the first transaction ID in a range. - :type from_transaction_id: str - :param to_transaction_id: Specify the last transaction ID in a range. - :type to_transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PagedLedgerEntries or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.PagedLedgerEntries] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedLedgerEntries"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.get_ledger_entries.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - if from_transaction_id is not None: - query_parameters['fromTransactionId'] = self._serialize.query("from_transaction_id", from_transaction_id, 'str') - if to_transaction_id is not None: - query_parameters['toTransactionId'] = self._serialize.query("to_transaction_id", to_transaction_id, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PagedLedgerEntries', pipeline_response) - list_of_elem = deserialized.entries - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - get_ledger_entries.metadata = {'url': '/app/transactions'} # type: ignore - - async def post_ledger_entry( - self, - contents: str, - sub_ledger_id: Optional[str] = None, - **kwargs - ) -> "_models.LedgerWriteResult": - """Writes a ledger entry. - - A sub-ledger id may optionally be specified. - - :param contents: Contents of the ledger entry. - :type contents: str - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerWriteResult, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerWriteResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerWriteResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _entry = _models.LedgerEntry(contents=contents) - api_version = "0.1-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.post_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if _entry is not None: - body_content = self._serialize.body(_entry, 'LedgerEntry') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-ccf-transaction-id']=self._deserialize('str', response.headers.get('x-ms-ccf-transaction-id')) - deserialized = self._deserialize('LedgerWriteResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - post_ledger_entry.metadata = {'url': '/app/transactions'} # type: ignore - - async def get_ledger_entry( - self, - transaction_id: str, - sub_ledger_id: Optional[str] = None, - **kwargs - ) -> "_models.LedgerQueryResult": - """Gets the ledger entry at the specified transaction id. A sub-ledger id may optionally be specified to indicate the sub-ledger from which to fetch the value. - - 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. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerQueryResult, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerQueryResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerQueryResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerQueryResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ledger_entry.metadata = {'url': '/app/transactions/{transactionId}'} # type: ignore - - async def get_receipt( - self, - transaction_id: str, - **kwargs - ) -> "_models.TransactionReceipt": - """Gets a receipt certifying ledger contents at a particular transaction id. - - Gets a receipt certifying ledger contents at a particular transaction id. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TransactionReceipt, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionReceipt - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TransactionReceipt"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_receipt.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('TransactionReceipt', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_receipt.metadata = {'url': '/app/transactions/{transactionId}/receipt'} # type: ignore - - async def get_transaction_status( - self, - transaction_id: str, - **kwargs - ) -> "_models.TransactionStatus": - """Gets the status of an entry identified by a transaction id. - - Gets the status of an entry identified by a transaction id. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TransactionStatus, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TransactionStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_transaction_status.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('TransactionStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_transaction_status.metadata = {'url': '/app/transactions/{transactionId}/status'} # type: ignore - - async def get_current_ledger_entry( - self, - sub_ledger_id: Optional[str] = None, - **kwargs - ) -> "_models.LedgerEntry": - """Gets the current value available in the ledger. - - A sub-ledger id may optionally be specified. - - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerEntry, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerEntry"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_current_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerEntry', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_current_ledger_entry.metadata = {'url': '/app/transactions/current'} # type: ignore - - async def delete_user( - self, - user_id: str, - **kwargs - ) -> None: - """Deletes a user from the Confidential Ledger. - - Deletes a user from the Confidential Ledger. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.delete_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete_user.metadata = {'url': '/app/users/{userId}'} # type: ignore - - async def get_user( - self, - user_id: str, - **kwargs - ) -> "_models.LedgerUser": - """Gets a user. - - Gets a user. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerUser, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerUser"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerUser', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_user.metadata = {'url': '/app/users/{userId}'} # type: ignore - - async def create_or_update_user( - self, - user_id: str, - assigned_role: Union[str, "_models.ConfidentialLedgerUserRoleName"], - **kwargs - ) -> "_models.LedgerUser": - """Adds a user or updates a user's fields. - - A JSON merge patch is applied for existing users. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :param assigned_role: Represents an assignable role. - :type assigned_role: str or ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerUser, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerUser"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _user_details = _models.LedgerUser(assigned_role=assigned_role) - api_version = "0.1-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_user_details, 'LedgerUser') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerUser', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update_user.metadata = {'url': '/app/users/{userId}'} # type: ignore diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/__init__.py deleted file mode 100644 index 3631df5788da..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/__init__.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ConfidentialLedgerEnclaves - from ._models_py3 import ConfidentialLedgerError - from ._models_py3 import ConfidentialLedgerErrorBody - from ._models_py3 import Consortium - from ._models_py3 import ConsortiumMember - from ._models_py3 import Constitution - from ._models_py3 import EnclaveQuote - from ._models_py3 import LedgerEntry - from ._models_py3 import LedgerQueryResult - from ._models_py3 import LedgerUser - from ._models_py3 import LedgerWriteResult - from ._models_py3 import MerkleProofElement - from ._models_py3 import PagedLedgerEntries - from ._models_py3 import ReceiptContents - from ._models_py3 import RoleAssignment - from ._models_py3 import TransactionReceipt - from ._models_py3 import TransactionStatus -except (SyntaxError, ImportError): - from ._models import ConfidentialLedgerEnclaves # type: ignore - from ._models import ConfidentialLedgerError # type: ignore - from ._models import ConfidentialLedgerErrorBody # type: ignore - from ._models import Consortium # type: ignore - from ._models import ConsortiumMember # type: ignore - from ._models import Constitution # type: ignore - from ._models import EnclaveQuote # type: ignore - from ._models import LedgerEntry # type: ignore - from ._models import LedgerQueryResult # type: ignore - from ._models import LedgerUser # type: ignore - from ._models import LedgerWriteResult # type: ignore - from ._models import MerkleProofElement # type: ignore - from ._models import PagedLedgerEntries # type: ignore - from ._models import ReceiptContents # type: ignore - from ._models import RoleAssignment # type: ignore - from ._models import TransactionReceipt # type: ignore - from ._models import TransactionStatus # type: ignore - -from ._confidential_ledger_client_enums import ( - ConfidentialLedgerQueryState, - ConfidentialLedgerUserRoleName, - TransactionState, -) - -__all__ = [ - 'ConfidentialLedgerEnclaves', - 'ConfidentialLedgerError', - 'ConfidentialLedgerErrorBody', - 'Consortium', - 'ConsortiumMember', - 'Constitution', - 'EnclaveQuote', - 'LedgerEntry', - 'LedgerQueryResult', - 'LedgerUser', - 'LedgerWriteResult', - 'MerkleProofElement', - 'PagedLedgerEntries', - 'ReceiptContents', - 'RoleAssignment', - 'TransactionReceipt', - 'TransactionStatus', - 'ConfidentialLedgerQueryState', - 'ConfidentialLedgerUserRoleName', - 'TransactionState', -] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_confidential_ledger_client_enums.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_confidential_ledger_client_enums.py deleted file mode 100644 index 44eb693b30c4..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_confidential_ledger_client_enums.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class ConfidentialLedgerQueryState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """State of a ledger query. - """ - - LOADING = "Loading" - READY = "Ready" - -class ConfidentialLedgerUserRoleName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Represents an assignable role. - """ - - ADMINISTRATOR = "Administrator" - CONTRIBUTOR = "Contributor" - READER = "Reader" - -class TransactionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Represents the state of the transaction. - """ - - COMMITTED = "Committed" - PENDING = "Pending" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models.py deleted file mode 100644 index e831fced0518..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models.py +++ /dev/null @@ -1,564 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class ConfidentialLedgerEnclaves(msrest.serialization.Model): - """Information about the enclaves running the Confidential Ledger. - - All required parameters must be populated in order to send to Azure. - - :param current_node_id: Required. Id of the Confidential Ledger node responding to the request. - :type current_node_id: str - :param enclave_quotes: Required. Dictionary of enclave quotes, indexed by node id. - :type enclave_quotes: dict[str, - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.EnclaveQuote] - """ - - _validation = { - 'current_node_id': {'required': True}, - 'enclave_quotes': {'required': True}, - } - - _attribute_map = { - 'current_node_id': {'key': 'currentNodeId', 'type': 'str'}, - 'enclave_quotes': {'key': 'enclaveQuotes', 'type': '{EnclaveQuote}'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerEnclaves, self).__init__(**kwargs) - self.current_node_id = kwargs['current_node_id'] - self.enclave_quotes = kwargs['enclave_quotes'] - - -class ConfidentialLedgerError(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: An error response from Confidential Ledger. - :vartype error: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerError, self).__init__(**kwargs) - self.error = None - - -class ConfidentialLedgerErrorBody(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar inner_error: An error response from Confidential Ledger. - :vartype inner_error: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'inner_error': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'inner_error': {'key': 'innererror', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.inner_error = None - - -class Consortium(msrest.serialization.Model): - """List of members in the consortium. - - All required parameters must be populated in order to send to Azure. - - :param members: Required. - :type members: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConsortiumMember] - """ - - _validation = { - 'members': {'required': True}, - } - - _attribute_map = { - 'members': {'key': 'members', 'type': '[ConsortiumMember]'}, - } - - def __init__( - self, - **kwargs - ): - super(Consortium, self).__init__(**kwargs) - self.members = kwargs['members'] - - -class ConsortiumMember(msrest.serialization.Model): - """Describes a member of the consortium. - - All required parameters must be populated in order to send to Azure. - - :param certificate: Required. PEM-encoded certificate associated with the member. - :type certificate: str - :param id: Required. Identifier assigned to the member. - :type id: str - """ - - _validation = { - 'certificate': {'required': True}, - 'id': {'required': True}, - } - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConsortiumMember, self).__init__(**kwargs) - self.certificate = kwargs['certificate'] - self.id = kwargs['id'] - - -class Constitution(msrest.serialization.Model): - """The governance script for the application. - - All required parameters must be populated in order to send to Azure. - - :param digest: Required. SHA256 digest of the constitution script. - :type digest: str - :param script: Required. Contents of the constitution. - :type script: str - """ - - _validation = { - 'digest': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'script': {'key': 'script', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Constitution, self).__init__(**kwargs) - self.digest = kwargs['digest'] - self.script = kwargs['script'] - - -class EnclaveQuote(msrest.serialization.Model): - """Contains the enclave quote. - - All required parameters must be populated in order to send to Azure. - - :param node_id: Required. ID assigned to this node. - :type node_id: str - :param mrenclave: MRENCLAVE value of the code running in the enclave. - :type mrenclave: str - :param quote_version: Required. Version of the quote presented. - :type quote_version: str - :param raw: Required. Raw SGX quote, parsable by tools like Open Enclave's oeverify. - :type raw: str - """ - - _validation = { - 'node_id': {'required': True}, - 'quote_version': {'required': True}, - 'raw': {'required': True}, - } - - _attribute_map = { - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'mrenclave': {'key': 'mrenclave', 'type': 'str'}, - 'quote_version': {'key': 'quoteVersion', 'type': 'str'}, - 'raw': {'key': 'raw', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EnclaveQuote, self).__init__(**kwargs) - self.node_id = kwargs['node_id'] - self.mrenclave = kwargs.get('mrenclave', None) - self.quote_version = kwargs['quote_version'] - self.raw = kwargs['raw'] - - -class LedgerEntry(msrest.serialization.Model): - """An entry in the ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param contents: Required. Contents of the ledger entry. - :type contents: str - :ivar sub_ledger_id: Identifier for sub-ledgers. - :vartype sub_ledger_id: str - :ivar transaction_id: 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. - :vartype transaction_id: str - """ - - _validation = { - 'contents': {'required': True}, - 'sub_ledger_id': {'readonly': True}, - 'transaction_id': {'readonly': True}, - } - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - 'sub_ledger_id': {'key': 'subLedgerId', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LedgerEntry, self).__init__(**kwargs) - self.contents = kwargs['contents'] - self.sub_ledger_id = None - self.transaction_id = None - - -class LedgerQueryResult(msrest.serialization.Model): - """The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param entry: The ledger entry found as a result of the query. This is only available if the - query is in Ready state. - :type entry: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'entry': {'key': 'entry', 'type': 'LedgerEntry'}, - } - - def __init__( - self, - **kwargs - ): - super(LedgerQueryResult, self).__init__(**kwargs) - self.state = kwargs['state'] - self.entry = kwargs.get('entry', None) - - -class LedgerUser(msrest.serialization.Model): - """Details about a Confidential Ledger user. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param assigned_role: Required. Represents an assignable role. Possible values include: - "Administrator", "Contributor", "Reader". - :type assigned_role: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :ivar user_id: Identifier for the user. This must either be an AAD object id or a certificate - fingerprint. - :vartype user_id: str - """ - - _validation = { - 'assigned_role': {'required': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'assigned_role': {'key': 'assignedRole', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LedgerUser, self).__init__(**kwargs) - self.assigned_role = kwargs['assigned_role'] - self.user_id = None - - -class LedgerWriteResult(msrest.serialization.Model): - """Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. - - All required parameters must be populated in order to send to Azure. - - :param sub_ledger_id: Required. Identifier for sub-ledgers. - :type sub_ledger_id: str - """ - - _validation = { - 'sub_ledger_id': {'required': True}, - } - - _attribute_map = { - 'sub_ledger_id': {'key': 'subLedgerId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LedgerWriteResult, self).__init__(**kwargs) - self.sub_ledger_id = kwargs['sub_ledger_id'] - - -class MerkleProofElement(msrest.serialization.Model): - """An item in the Merkle proof. - - :param left: - :type left: str - :param right: - :type right: str - """ - - _attribute_map = { - 'left': {'key': 'left', 'type': 'str'}, - 'right': {'key': 'right', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MerkleProofElement, self).__init__(**kwargs) - self.left = kwargs.get('left', None) - self.right = kwargs.get('right', None) - - -class PagedLedgerEntries(msrest.serialization.Model): - """Paginated ledger entries returned in response to a query. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param next_link: Path from which to retrieve the next page of results. - :type next_link: str - :param entries: Required. Array of ledger entries. - :type entries: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry] - """ - - _validation = { - 'state': {'required': True}, - 'entries': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'entries': {'key': 'entries', 'type': '[LedgerEntry]'}, - } - - def __init__( - self, - **kwargs - ): - super(PagedLedgerEntries, self).__init__(**kwargs) - self.state = kwargs['state'] - self.next_link = kwargs.get('next_link', None) - self.entries = kwargs['entries'] - - -class ReceiptContents(msrest.serialization.Model): - """A receipt certifying the transaction at the specified id. - - All required parameters must be populated in order to send to Azure. - - :param leaf: Required. Merkle tree leaf for this transaction. - :type leaf: str - :param node_id: Required. Id of the node returning the receipt. - :type node_id: str - :param proof: Required. Merkle proof. - :type proof: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.MerkleProofElement] - :param root: Required. Root of the Merkle tree at the time the transaction was recorded. - :type root: str - :param signature: Required. Signature by the node, with its certificate, over the Merkle root. - :type signature: str - """ - - _validation = { - 'leaf': {'required': True}, - 'node_id': {'required': True}, - 'proof': {'required': True}, - 'root': {'required': True}, - 'signature': {'required': True}, - } - - _attribute_map = { - 'leaf': {'key': 'leaf', 'type': 'str'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'proof': {'key': 'proof', 'type': '[MerkleProofElement]'}, - 'root': {'key': 'root', 'type': 'str'}, - 'signature': {'key': 'signature', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ReceiptContents, self).__init__(**kwargs) - self.leaf = kwargs['leaf'] - self.node_id = kwargs['node_id'] - self.proof = kwargs['proof'] - self.root = kwargs['root'] - self.signature = kwargs['signature'] - - -class RoleAssignment(msrest.serialization.Model): - """Object for assigning a role to a user. - - All required parameters must be populated in order to send to Azure. - - :param role_name: Required. Represents an assignable role. Possible values include: - "Administrator", "Contributor", "Reader". - :type role_name: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :param description: Description of the role. - :type description: str - """ - - _validation = { - 'role_name': {'required': True}, - } - - _attribute_map = { - 'role_name': {'key': 'roleName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RoleAssignment, self).__init__(**kwargs) - self.role_name = kwargs['role_name'] - self.description = kwargs.get('description', None) - - -class TransactionReceipt(msrest.serialization.Model): - """A receipt certifying the transaction at the specified id. - - All required parameters must be populated in order to send to Azure. - - :param receipt: A receipt certifying the transaction at the specified id. - :type receipt: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ReceiptContents - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param transaction_id: 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. - :type transaction_id: str - """ - - _validation = { - 'state': {'required': True}, - 'transaction_id': {'required': True}, - } - - _attribute_map = { - 'receipt': {'key': 'receipt', 'type': 'ReceiptContents'}, - 'state': {'key': 'state', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TransactionReceipt, self).__init__(**kwargs) - self.receipt = kwargs.get('receipt', None) - self.state = kwargs['state'] - self.transaction_id = kwargs['transaction_id'] - - -class TransactionStatus(msrest.serialization.Model): - """Response returned to a query for the transaction status. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. Represents the state of the transaction. Possible values include: - "Committed", "Pending". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionState - :param transaction_id: 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. - :type transaction_id: str - """ - - _validation = { - 'state': {'required': True}, - 'transaction_id': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TransactionStatus, self).__init__(**kwargs) - self.state = kwargs['state'] - self.transaction_id = kwargs['transaction_id'] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models_py3.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models_py3.py deleted file mode 100644 index f212f58d01e0..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/models/_models_py3.py +++ /dev/null @@ -1,616 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Dict, List, Optional, Union - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - -from ._confidential_ledger_client_enums import * - - -class ConfidentialLedgerEnclaves(msrest.serialization.Model): - """Information about the enclaves running the Confidential Ledger. - - All required parameters must be populated in order to send to Azure. - - :param current_node_id: Required. Id of the Confidential Ledger node responding to the request. - :type current_node_id: str - :param enclave_quotes: Required. Dictionary of enclave quotes, indexed by node id. - :type enclave_quotes: dict[str, - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.EnclaveQuote] - """ - - _validation = { - 'current_node_id': {'required': True}, - 'enclave_quotes': {'required': True}, - } - - _attribute_map = { - 'current_node_id': {'key': 'currentNodeId', 'type': 'str'}, - 'enclave_quotes': {'key': 'enclaveQuotes', 'type': '{EnclaveQuote}'}, - } - - def __init__( - self, - *, - current_node_id: str, - enclave_quotes: Dict[str, "EnclaveQuote"], - **kwargs - ): - super(ConfidentialLedgerEnclaves, self).__init__(**kwargs) - self.current_node_id = current_node_id - self.enclave_quotes = enclave_quotes - - -class ConfidentialLedgerError(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: An error response from Confidential Ledger. - :vartype error: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerError, self).__init__(**kwargs) - self.error = None - - -class ConfidentialLedgerErrorBody(msrest.serialization.Model): - """An error response from Confidential Ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar inner_error: An error response from Confidential Ledger. - :vartype inner_error: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerErrorBody - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'inner_error': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'inner_error': {'key': 'innererror', 'type': 'ConfidentialLedgerErrorBody'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfidentialLedgerErrorBody, self).__init__(**kwargs) - self.code = None - self.message = None - self.inner_error = None - - -class Consortium(msrest.serialization.Model): - """List of members in the consortium. - - All required parameters must be populated in order to send to Azure. - - :param members: Required. - :type members: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConsortiumMember] - """ - - _validation = { - 'members': {'required': True}, - } - - _attribute_map = { - 'members': {'key': 'members', 'type': '[ConsortiumMember]'}, - } - - def __init__( - self, - *, - members: List["ConsortiumMember"], - **kwargs - ): - super(Consortium, self).__init__(**kwargs) - self.members = members - - -class ConsortiumMember(msrest.serialization.Model): - """Describes a member of the consortium. - - All required parameters must be populated in order to send to Azure. - - :param certificate: Required. PEM-encoded certificate associated with the member. - :type certificate: str - :param id: Required. Identifier assigned to the member. - :type id: str - """ - - _validation = { - 'certificate': {'required': True}, - 'id': {'required': True}, - } - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - certificate: str, - id: str, - **kwargs - ): - super(ConsortiumMember, self).__init__(**kwargs) - self.certificate = certificate - self.id = id - - -class Constitution(msrest.serialization.Model): - """The governance script for the application. - - All required parameters must be populated in order to send to Azure. - - :param digest: Required. SHA256 digest of the constitution script. - :type digest: str - :param script: Required. Contents of the constitution. - :type script: str - """ - - _validation = { - 'digest': {'required': True}, - 'script': {'required': True}, - } - - _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'script': {'key': 'script', 'type': 'str'}, - } - - def __init__( - self, - *, - digest: str, - script: str, - **kwargs - ): - super(Constitution, self).__init__(**kwargs) - self.digest = digest - self.script = script - - -class EnclaveQuote(msrest.serialization.Model): - """Contains the enclave quote. - - All required parameters must be populated in order to send to Azure. - - :param node_id: Required. ID assigned to this node. - :type node_id: str - :param mrenclave: MRENCLAVE value of the code running in the enclave. - :type mrenclave: str - :param quote_version: Required. Version of the quote presented. - :type quote_version: str - :param raw: Required. Raw SGX quote, parsable by tools like Open Enclave's oeverify. - :type raw: str - """ - - _validation = { - 'node_id': {'required': True}, - 'quote_version': {'required': True}, - 'raw': {'required': True}, - } - - _attribute_map = { - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'mrenclave': {'key': 'mrenclave', 'type': 'str'}, - 'quote_version': {'key': 'quoteVersion', 'type': 'str'}, - 'raw': {'key': 'raw', 'type': 'str'}, - } - - def __init__( - self, - *, - node_id: str, - quote_version: str, - raw: str, - mrenclave: Optional[str] = None, - **kwargs - ): - super(EnclaveQuote, self).__init__(**kwargs) - self.node_id = node_id - self.mrenclave = mrenclave - self.quote_version = quote_version - self.raw = raw - - -class LedgerEntry(msrest.serialization.Model): - """An entry in the ledger. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param contents: Required. Contents of the ledger entry. - :type contents: str - :ivar sub_ledger_id: Identifier for sub-ledgers. - :vartype sub_ledger_id: str - :ivar transaction_id: 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. - :vartype transaction_id: str - """ - - _validation = { - 'contents': {'required': True}, - 'sub_ledger_id': {'readonly': True}, - 'transaction_id': {'readonly': True}, - } - - _attribute_map = { - 'contents': {'key': 'contents', 'type': 'str'}, - 'sub_ledger_id': {'key': 'subLedgerId', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - *, - contents: str, - **kwargs - ): - super(LedgerEntry, self).__init__(**kwargs) - self.contents = contents - self.sub_ledger_id = None - self.transaction_id = None - - -class LedgerQueryResult(msrest.serialization.Model): - """The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param entry: The ledger entry found as a result of the query. This is only available if the - query is in Ready state. - :type entry: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry - """ - - _validation = { - 'state': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'entry': {'key': 'entry', 'type': 'LedgerEntry'}, - } - - def __init__( - self, - *, - state: Union[str, "ConfidentialLedgerQueryState"], - entry: Optional["LedgerEntry"] = None, - **kwargs - ): - super(LedgerQueryResult, self).__init__(**kwargs) - self.state = state - self.entry = entry - - -class LedgerUser(msrest.serialization.Model): - """Details about a Confidential Ledger user. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param assigned_role: Required. Represents an assignable role. Possible values include: - "Administrator", "Contributor", "Reader". - :type assigned_role: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :ivar user_id: Identifier for the user. This must either be an AAD object id or a certificate - fingerprint. - :vartype user_id: str - """ - - _validation = { - 'assigned_role': {'required': True}, - 'user_id': {'readonly': True}, - } - - _attribute_map = { - 'assigned_role': {'key': 'assignedRole', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, - } - - def __init__( - self, - *, - assigned_role: Union[str, "ConfidentialLedgerUserRoleName"], - **kwargs - ): - super(LedgerUser, self).__init__(**kwargs) - self.assigned_role = assigned_role - self.user_id = None - - -class LedgerWriteResult(msrest.serialization.Model): - """Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. - - All required parameters must be populated in order to send to Azure. - - :param sub_ledger_id: Required. Identifier for sub-ledgers. - :type sub_ledger_id: str - """ - - _validation = { - 'sub_ledger_id': {'required': True}, - } - - _attribute_map = { - 'sub_ledger_id': {'key': 'subLedgerId', 'type': 'str'}, - } - - def __init__( - self, - *, - sub_ledger_id: str, - **kwargs - ): - super(LedgerWriteResult, self).__init__(**kwargs) - self.sub_ledger_id = sub_ledger_id - - -class MerkleProofElement(msrest.serialization.Model): - """An item in the Merkle proof. - - :param left: - :type left: str - :param right: - :type right: str - """ - - _attribute_map = { - 'left': {'key': 'left', 'type': 'str'}, - 'right': {'key': 'right', 'type': 'str'}, - } - - def __init__( - self, - *, - left: Optional[str] = None, - right: Optional[str] = None, - **kwargs - ): - super(MerkleProofElement, self).__init__(**kwargs) - self.left = left - self.right = right - - -class PagedLedgerEntries(msrest.serialization.Model): - """Paginated ledger entries returned in response to a query. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param next_link: Path from which to retrieve the next page of results. - :type next_link: str - :param entries: Required. Array of ledger entries. - :type entries: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry] - """ - - _validation = { - 'state': {'required': True}, - 'entries': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'entries': {'key': 'entries', 'type': '[LedgerEntry]'}, - } - - def __init__( - self, - *, - state: Union[str, "ConfidentialLedgerQueryState"], - entries: List["LedgerEntry"], - next_link: Optional[str] = None, - **kwargs - ): - super(PagedLedgerEntries, self).__init__(**kwargs) - self.state = state - self.next_link = next_link - self.entries = entries - - -class ReceiptContents(msrest.serialization.Model): - """A receipt certifying the transaction at the specified id. - - All required parameters must be populated in order to send to Azure. - - :param leaf: Required. Merkle tree leaf for this transaction. - :type leaf: str - :param node_id: Required. Id of the node returning the receipt. - :type node_id: str - :param proof: Required. Merkle proof. - :type proof: - list[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.MerkleProofElement] - :param root: Required. Root of the Merkle tree at the time the transaction was recorded. - :type root: str - :param signature: Required. Signature by the node, with its certificate, over the Merkle root. - :type signature: str - """ - - _validation = { - 'leaf': {'required': True}, - 'node_id': {'required': True}, - 'proof': {'required': True}, - 'root': {'required': True}, - 'signature': {'required': True}, - } - - _attribute_map = { - 'leaf': {'key': 'leaf', 'type': 'str'}, - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'proof': {'key': 'proof', 'type': '[MerkleProofElement]'}, - 'root': {'key': 'root', 'type': 'str'}, - 'signature': {'key': 'signature', 'type': 'str'}, - } - - def __init__( - self, - *, - leaf: str, - node_id: str, - proof: List["MerkleProofElement"], - root: str, - signature: str, - **kwargs - ): - super(ReceiptContents, self).__init__(**kwargs) - self.leaf = leaf - self.node_id = node_id - self.proof = proof - self.root = root - self.signature = signature - - -class RoleAssignment(msrest.serialization.Model): - """Object for assigning a role to a user. - - All required parameters must be populated in order to send to Azure. - - :param role_name: Required. Represents an assignable role. Possible values include: - "Administrator", "Contributor", "Reader". - :type role_name: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :param description: Description of the role. - :type description: str - """ - - _validation = { - 'role_name': {'required': True}, - } - - _attribute_map = { - 'role_name': {'key': 'roleName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - role_name: Union[str, "ConfidentialLedgerUserRoleName"], - description: Optional[str] = None, - **kwargs - ): - super(RoleAssignment, self).__init__(**kwargs) - self.role_name = role_name - self.description = description - - -class TransactionReceipt(msrest.serialization.Model): - """A receipt certifying the transaction at the specified id. - - All required parameters must be populated in order to send to Azure. - - :param receipt: A receipt certifying the transaction at the specified id. - :type receipt: - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ReceiptContents - :param state: Required. State of a ledger query. Possible values include: "Loading", "Ready". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerQueryState - :param transaction_id: 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. - :type transaction_id: str - """ - - _validation = { - 'state': {'required': True}, - 'transaction_id': {'required': True}, - } - - _attribute_map = { - 'receipt': {'key': 'receipt', 'type': 'ReceiptContents'}, - 'state': {'key': 'state', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - *, - state: Union[str, "ConfidentialLedgerQueryState"], - transaction_id: str, - receipt: Optional["ReceiptContents"] = None, - **kwargs - ): - super(TransactionReceipt, self).__init__(**kwargs) - self.receipt = receipt - self.state = state - self.transaction_id = transaction_id - - -class TransactionStatus(msrest.serialization.Model): - """Response returned to a query for the transaction status. - - All required parameters must be populated in order to send to Azure. - - :param state: Required. Represents the state of the transaction. Possible values include: - "Committed", "Pending". - :type state: str or - ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionState - :param transaction_id: 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. - :type transaction_id: str - """ - - _validation = { - 'state': {'required': True}, - 'transaction_id': {'required': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'transaction_id': {'key': 'transactionId', 'type': 'str'}, - } - - def __init__( - self, - *, - state: Union[str, "TransactionState"], - transaction_id: str, - **kwargs - ): - super(TransactionStatus, self).__init__(**kwargs) - self.state = state - self.transaction_id = transaction_id diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/_confidential_ledger_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/_confidential_ledger_operations.py deleted file mode 100644 index d65a8cfec269..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/_confidential_ledger_operations.py +++ /dev/null @@ -1,793 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ConfidentialLedgerOperations(object): - """ConfidentialLedgerOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get_constitution( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.Constitution" - """Gets the constitution used for governance. - - The constitution is a script that assesses and applies proposals from consortium members. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Constitution, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.Constitution - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Constitution"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_constitution.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Constitution', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_constitution.metadata = {'url': '/app/governance/constitution'} # type: ignore - - def get_consortium_members( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.Consortium" - """Gets the consortium members. - - Consortium members can manage the Confidential Ledger. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Consortium, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.Consortium - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Consortium"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_consortium_members.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Consortium', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_consortium_members.metadata = {'url': '/app/governance/members'} # type: ignore - - def get_enclave_quotes( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.ConfidentialLedgerEnclaves" - """Gets quotes for all nodes of the Confidential Ledger. - - A quote is an SGX enclave measurement that can be used to verify the validity of a node and its - enclave. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConfidentialLedgerEnclaves, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerEnclaves - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConfidentialLedgerEnclaves"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_enclave_quotes.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ConfidentialLedgerEnclaves', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_enclave_quotes.metadata = {'url': '/app/enclaveQuotes'} # type: ignore - - def get_ledger_entries( - self, - sub_ledger_id=None, # type: Optional[str] - from_transaction_id=None, # type: Optional[str] - to_transaction_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PagedLedgerEntries"] - """Gets ledger entries from a sub-ledger corresponding to a range. - - A sub-ledger id may optionally be specified. Only entries in the specified (or default) - sub-ledger will be returned. - - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :param from_transaction_id: Specify the first transaction ID in a range. - :type from_transaction_id: str - :param to_transaction_id: Specify the last transaction ID in a range. - :type to_transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PagedLedgerEntries or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.PagedLedgerEntries] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PagedLedgerEntries"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.get_ledger_entries.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - if from_transaction_id is not None: - query_parameters['fromTransactionId'] = self._serialize.query("from_transaction_id", from_transaction_id, 'str') - if to_transaction_id is not None: - query_parameters['toTransactionId'] = self._serialize.query("to_transaction_id", to_transaction_id, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PagedLedgerEntries', pipeline_response) - list_of_elem = deserialized.entries - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - get_ledger_entries.metadata = {'url': '/app/transactions'} # type: ignore - - def post_ledger_entry( - self, - contents, # type: str - sub_ledger_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerWriteResult" - """Writes a ledger entry. - - A sub-ledger id may optionally be specified. - - :param contents: Contents of the ledger entry. - :type contents: str - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerWriteResult, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerWriteResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerWriteResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _entry = _models.LedgerEntry(contents=contents) - api_version = "0.1-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.post_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if _entry is not None: - body_content = self._serialize.body(_entry, 'LedgerEntry') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-ccf-transaction-id']=self._deserialize('str', response.headers.get('x-ms-ccf-transaction-id')) - deserialized = self._deserialize('LedgerWriteResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, response_headers) - - return deserialized - post_ledger_entry.metadata = {'url': '/app/transactions'} # type: ignore - - def get_ledger_entry( - self, - transaction_id, # type: str - sub_ledger_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerQueryResult" - """Gets the ledger entry at the specified transaction id. A sub-ledger id may optionally be specified to indicate the sub-ledger from which to fetch the value. - - 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. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerQueryResult, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerQueryResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerQueryResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerQueryResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ledger_entry.metadata = {'url': '/app/transactions/{transactionId}'} # type: ignore - - def get_receipt( - self, - transaction_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.TransactionReceipt" - """Gets a receipt certifying ledger contents at a particular transaction id. - - Gets a receipt certifying ledger contents at a particular transaction id. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TransactionReceipt, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionReceipt - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TransactionReceipt"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_receipt.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('TransactionReceipt', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_receipt.metadata = {'url': '/app/transactions/{transactionId}/receipt'} # type: ignore - - def get_transaction_status( - self, - transaction_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.TransactionStatus" - """Gets the status of an entry identified by a transaction id. - - Gets the status of an entry identified by a transaction id. - - :param transaction_id: Identifies a write transaction. - :type transaction_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: TransactionStatus, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.TransactionStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.TransactionStatus"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_transaction_status.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'transactionId': self._serialize.url("transaction_id", transaction_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('TransactionStatus', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_transaction_status.metadata = {'url': '/app/transactions/{transactionId}/status'} # type: ignore - - def get_current_ledger_entry( - self, - sub_ledger_id=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerEntry" - """Gets the current value available in the ledger. - - A sub-ledger id may optionally be specified. - - :param sub_ledger_id: The sub-ledger id. - :type sub_ledger_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerEntry, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerEntry - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerEntry"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_current_ledger_entry.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if sub_ledger_id is not None: - query_parameters['subLedgerId'] = self._serialize.query("sub_ledger_id", sub_ledger_id, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerEntry', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_current_ledger_entry.metadata = {'url': '/app/transactions/current'} # type: ignore - - def delete_user( - self, - user_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a user from the Confidential Ledger. - - Deletes a user from the Confidential Ledger. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.delete_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete_user.metadata = {'url': '/app/users/{userId}'} # type: ignore - - def get_user( - self, - user_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerUser" - """Gets a user. - - Gets a user. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerUser, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerUser"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "0.1-preview" - accept = "application/json" - - # Construct URL - url = self.get_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerUser', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_user.metadata = {'url': '/app/users/{userId}'} # type: ignore - - def create_or_update_user( - self, - user_id, # type: str - assigned_role, # type: Union[str, "_models.ConfidentialLedgerUserRoleName"] - **kwargs # type: Any - ): - # type: (...) -> "_models.LedgerUser" - """Adds a user or updates a user's fields. - - A JSON merge patch is applied for existing users. - - :param user_id: The user id, either an AAD object ID or certificate fingerprint. - :type user_id: str - :param assigned_role: Represents an assignable role. - :type assigned_role: str or ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.ConfidentialLedgerUserRoleName - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LedgerUser, or the result of cls(response) - :rtype: ~azure.confidentialledger._generated/_generated_ledger.v0_1_preview.models.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LedgerUser"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _user_details = _models.LedgerUser(assigned_role=assigned_role) - api_version = "0.1-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update_user.metadata['url'] # type: ignore - path_format_arguments = { - 'ledgerUri': self._serialize.url("self._config.ledger_uri", self._config.ledger_uri, 'str', skip_quote=True), - 'userId': self._serialize.url("user_id", user_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_user_details, 'LedgerUser') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ConfidentialLedgerError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('LedgerUser', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update_user.metadata = {'url': '/app/users/{userId}'} # type: ignore diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/py.typed b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_models.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_models.py deleted file mode 100644 index 051d55a0893e..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_models.py +++ /dev/null @@ -1,340 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from collections import namedtuple - -from ._enums import LedgerUserRole, TransactionState - - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - # pylint:disable=unused-import - from typing import Dict, List - - -class AppendResult(namedtuple("AppendResult", ["sub_ledger_id", "transaction_id"])): - """Result of appending to the ledger. - - :ivar str transaction_id: Identifier for when the append transaction was registered. - :ivar str sub_ledger_id: Identifies the sub-ledger the entry was appended to. - """ - - __slots__ = () - - def __new__(cls, sub_ledger_id, transaction_id): - return super(AppendResult, cls).__new__(cls, sub_ledger_id, transaction_id) - - @classmethod - def _from_pipeline_result(cls, _, deserialized, response_headers): - transaction_id = response_headers["x-ms-ccf-transaction-id"] - return cls( - transaction_id=transaction_id, sub_ledger_id=deserialized.sub_ledger_id - ) - - -class ConsortiumMember(object): - """Describes a member of the consortium. - - :param certificate: Certificate used by the member. - :type certificate: str - :param id: The member's assigned identifier. - :type id: str - """ - - def __init__( - self, - certificate, # type: str - member_id, # type: str - ): - if not certificate or not member_id: - raise ValueError("certificate and member_id cannot be None") - - self._certificate = certificate - self._member_id = member_id - - @property - def certificate(self): - # type: () -> str - """The member's certificate.""" - return self._certificate - - @property - def id(self): - # type: () -> str - """The member's identifier.""" - return self._member_id - - -class Consortium(object): - """Describes the consortium. - - :param members: List of members of the consortium. - :type members: List[ConsortiumMember] - """ - - def __init__( - self, members # type: List[ConsortiumMember] - ): - self._members = members - - @property - def members(self): - # type: () -> List[ConsortiumMember] - """Members of the consortium.""" - return self._members - - -class Constitution(object): - """Governance script for the Confidential Ledger. - - :param script: Contents of the constitution script. - :type script: str - :param digest: SHA256 digest of the script. - :type digest: str - """ - - def __init__( - self, - script, # type: str - digest, # type: str - ): - self._script = script - self._digest = digest - - @property - def contents(self): - # type: () -> str - """The contents of the constitution.""" - return self._script - - @property - def digest(self): - # type: () -> str - """SHA256 of the constitution.""" - return self._digest - - -class EnclaveQuote(object): - """Quote of an SGX enclave. - - :param node_id: ID assigned to this node by CCF. - :type node_id: int - :param mrenclave: MRENCLAVE value of the code running in the enclave. - :type mrenclave: str - :param raw_quote: Raw SGX quote, parsable by tools like Open Enclave's oeverify. - :type raw_quote: str - :param version: Version of the quote. - :type version: str - """ - - def __init__( - self, - node_id, # type: int - mrenclave, # type: str - raw_quote, # type: str - version, # type: str - ): - self._node_id = node_id - self._mrenclave = mrenclave - self._raw_quote = raw_quote - self._version = version - - @property - def node_id(self): - # type: () -> int - """The ID of the node identified by this quote.""" - return self._node_id - - @property - def mrenclave(self): - # type: () -> str - """The MRENCLAVE value for this enclave.""" - return self._mrenclave - - @property - def raw_quote(self): - # type: () -> str - """The raw quote for this enclave.""" - return self._raw_quote - - @property - def version(self): - # type: () -> str - """The version of the quote.""" - return self._version - - -class LedgerEnclaves(object): - """Collection of enclaves in the ledger. - - :param quotes: Dictionary of enclaves in the Confidential Ledger. - :type quotes: Dict[str, EnclaveQuote] - :param source_node: Id of the node providing the quotes. - :type source_node: str - """ - - def __init__( - self, - quotes, # type: Dict[str, EnclaveQuote] - source_node, # type: str - ): - self._quotes = quotes - self._source_node = source_node - - @property - def quotes(self): - # type: (...) -> Dict[str, EnclaveQuote] - """Get a dictionary of enclaves quotes.""" - return self._quotes - - @property - def source_node(self): - # type: (...) -> str - """Identifies the node that returned the contained quotes.""" - return self._source_node - - -class LedgerEntry(object): - """An entry in the ledger. - - :param transaction_id: Identifier for the transaction containing this ledger entry. - :type transaction_id: str - :param contents: Contents of the ledger entry. - :type contents: str - :param sub_ledger_id: Identifies the sub-ledger the entry is a part of. - :type sub_ledger_id: str - """ - - def __init__( - self, - transaction_id, # type: str - contents, # type: str - sub_ledger_id, # type: int - ): - self._transaction_id = transaction_id - self._contents = contents - self._sub_ledger_id = sub_ledger_id - - @property - def transaction_id(self): - # type: () -> str - """Id of the ledger entry.""" - return self._transaction_id - - @property - def contents(self): - # type: () -> str - """Contents of the ledger entry.""" - return self._contents - - @property - def sub_ledger_id(self): - # type: () -> int - """Identifies the sub-ledger this entry is a part of.""" - return self._sub_ledger_id - - @classmethod - def _from_pipeline_result(cls, deserialized): - # type: (...) -> LedgerEntry - return cls( - transaction_id=deserialized.transaction_id, - contents=deserialized.contents, - sub_ledger_id=deserialized.sub_ledger_id, - ) - - -class LedgerUser(object): - """Models a Confidential Ledger user. - - :param user_id: Identifier of the user. - :type user_id: str - :param role: Role assigned to the user. - :type role: LedgerUserRole - """ - - def __init__( - self, - user_id, # type: str - role, # type: LedgerUserRole - ): - self._id = user_id - self._role = role - - @property - def id(self): - # type: () -> str - """Returns the id of this user.""" - return self._id - - @property - def role(self): - # type: () -> LedgerUserRole - """Returns the role assigned to this user.""" - return self._role - - -class TransactionReceipt(object): - """Contains a receipt certifying a transaction. - - :param transaction_id: Unique identifier for a transaction. - :type transaction_id: str - :param receipt: The receipt, which is a list of integers comprising a Merkle proof. - :type receipt: List[int] - """ - - def __init__( - self, - transaction_id, # type: str - receipt, # type: List[int] - ): - # type: (int, List[int]) -> None - self._transaction_id = transaction_id - self._contents = receipt - - @property - def contents(self): - # type: () -> List[int] - """Contents of the receipt.""" - return self._contents - - @property - def transaction_id(self): - # type: () -> str - """Identifier for the transaction certified by this receipt.""" - return self._transaction_id - - -class TransactionStatus(object): - """Represents the status of a transaction. - - :param transaction_id: Identifier for the transaction. - :type transaction_id: str - :param state: State of the transation. - :type state: ~azure.confidentialledger.TransactionState - """ - - def __init__( - self, - transaction_id, # type: str - state, # type: TransactionState - ): - self._transaction_id = transaction_id - self._state = state - - @property - def transaction_id(self): - # type: () -> str - """The identifier for this transaction.""" - return self._transaction_id - - @property - def state(self): - # type: () -> TransactionState - """The state of the transaction.""" - return self._state diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/__init__.py similarity index 57% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/__init__.py index 8afa2547b234..a07d13d30393 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/aio/operations/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/__init__.py @@ -6,8 +6,14 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_operations import ConfidentialLedgerOperations +from ._operations import ConfidentialLedgerClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ - 'ConfidentialLedgerOperations', + "ConfidentialLedgerClientOperationsMixin", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_operations.py new file mode 100644 index 000000000000..4af1070a6970 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_operations.py @@ -0,0 +1,1440 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict + +from .._serialization import Serializer +from .._vendor import MixinABC, _format_url_section + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_constitution_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/governance/constitution" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_consortium_members_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/governance/members" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_enclave_quotes_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/enclaveQuotes" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_collections_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/collections" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_list_ledger_entries_request( + *, + collection_id: Optional[str] = None, + from_transaction_id: Optional[str] = None, + to_transaction_id: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if collection_id is not None: + _params["collectionId"] = _SERIALIZER.query("collection_id", collection_id, "str") + if from_transaction_id is not None: + _params["fromTransactionId"] = _SERIALIZER.query("from_transaction_id", from_transaction_id, "str") + if to_transaction_id is not None: + _params["toTransactionId"] = _SERIALIZER.query("to_transaction_id", to_transaction_id, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_ledger_entry_request(**kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + collection_id = kwargs.pop("collection_id", _params.pop("collectionId", None)) # type: Optional[str] + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if collection_id is not None: + _params["collectionId"] = _SERIALIZER.query("collection_id", collection_id, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_ledger_entry_request( + transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions/{transactionId}" + path_format_arguments = { + "transactionId": _SERIALIZER.url("transaction_id", transaction_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if collection_id is not None: + _params["collectionId"] = _SERIALIZER.query("collection_id", collection_id, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_receipt_request(transaction_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions/{transactionId}/receipt" + path_format_arguments = { + "transactionId": _SERIALIZER.url("transaction_id", transaction_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_transaction_status_request(transaction_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions/{transactionId}/status" + path_format_arguments = { + "transactionId": _SERIALIZER.url("transaction_id", transaction_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_current_ledger_entry_request(*, collection_id: Optional[str] = None, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/transactions/current" + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + if collection_id is not None: + _params["collectionId"] = _SERIALIZER.query("collection_id", collection_id, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_delete_user_request(user_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/users/{userId}" + path_format_arguments = { + "userId": _SERIALIZER.url("user_id", user_id, "str", skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_user_request(user_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/users/{userId}" + path_format_arguments = { + "userId": _SERIALIZER.url("user_id", user_id, "str", skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_create_or_update_user_request(user_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/app/users/{userId}" + path_format_arguments = { + "userId": _SERIALIZER.url("user_id", user_id, "str", skip_quote=True), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) + + +class ConfidentialLedgerClientOperationsMixin(MixinABC): + @distributed_trace + def get_constitution(self, **kwargs: Any) -> JSON: + """Gets the constitution used for governance. + + The constitution is a script that assesses and applies proposals from consortium members. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "digest": "str", # SHA256 digest of the constitution script. Required. + "script": "str" # Contents of the constitution. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_constitution_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def list_consortium_members(self, **kwargs: Any) -> Iterable[JSON]: + """Lists the consortium members. + + Consortium members can manage the Confidential Ledger. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "certificate": "str", # PEM-encoded certificate associated with the member. + Required. + "id": "str" # Identifier assigned to the member. Required. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_consortium_members_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["members"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get_enclave_quotes(self, **kwargs: Any) -> JSON: + """Gets quotes for all nodes of the Confidential Ledger. + + A quote is an SGX enclave measurement that can be used to verify the validity of a node and its + enclave. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "currentNodeId": "str", # Id of the Confidential Ledger node responding to + the request. Required. + "enclaveQuotes": { + "str": { + "mrenclave": "str", # Optional. MRENCLAVE value of the code + running in the enclave. + "nodeId": "str", # ID assigned to this node. Required. + "quoteVersion": "str", # Version of the quote presented. + Required. + "raw": "str" # Raw SGX quote, parsable by tools like Open + Enclave's oeverify. Required. + } + } + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_enclave_quotes_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def list_collections(self, **kwargs: Any) -> Iterable[JSON]: + """Retrieves a list of collection ids present in the Confidential Ledger. + + Collection ids are user-created collections of ledger entries. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_collections_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["collections"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_ledger_entries( + self, + *, + collection_id: Optional[str] = None, + from_transaction_id: Optional[str] = None, + to_transaction_id: Optional[str] = None, + **kwargs: Any + ) -> Iterable[JSON]: + """Gets ledger entries from a collection corresponding to a range. + + A collection id may optionally be specified. Only entries in the specified (or default) + collection will be returned. + + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword from_transaction_id: Specify the first transaction ID in a range. Default value is + None. + :paramtype from_transaction_id: str + :keyword to_transaction_id: Specify the last transaction ID in a range. Default value is None. + :paramtype to_transaction_id: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_ledger_entries_request( + collection_id=collection_id, + from_transaction_id=from_transaction_id, + to_transaction_id=to_transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["entries"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @overload + def create_ledger_entry( + self, entry: JSON, *, collection_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Required. + :type entry: JSON + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + entry = { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + + @overload + def create_ledger_entry( + self, entry: IO, *, collection_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Required. + :type entry: IO + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + + @distributed_trace + def create_ledger_entry( + self, entry: Union[JSON, IO], *, collection_id: Optional[str] = None, **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Is either a model type or a IO type. Required. + :type entry: JSON or IO + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(entry, (IO, bytes)): + _content = entry + else: + _json = entry + + request = build_create_ledger_entry_request( + collection_id=collection_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers["x-ms-ccf-transaction-id"] = self._deserialize( + "str", response.headers.get("x-ms-ccf-transaction-id") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) + + return cast(JSON, deserialized) + + @distributed_trace + def get_ledger_entry(self, transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any) -> JSON: + """Gets the ledger entry at the specified transaction id. A collection id may optionally be + specified to indicate the collection from which to fetch the value. + + 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. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "entry": { + "collectionId": "str", # Optional. The ledger entry found as a + result of the query. This is only available if the query is in Ready state. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + }, + "state": "str" # State of a ledger query. Required. Known values are: + "Loading" and "Ready". + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_ledger_entry_request( + transaction_id=transaction_id, + collection_id=collection_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def get_receipt(self, transaction_id: str, **kwargs: Any) -> JSON: + """Gets a receipt certifying ledger contents at a particular transaction id. + + Gets a receipt certifying ledger contents at a particular transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "receipt": { + "cert": "str", # Optional. + "leaf": "str", # Optional. + "leafComponents": { + "claimsDigest": "str", # Optional. + "commitEvidence": "str", # Optional. + "writeSetDigest": "str" # Optional. + }, + "nodeId": "str", # Required. + "proof": [ + { + "left": "str", # Optional. Required. + "right": "str" # Optional. Required. + } + ], + "root": "str", # Optional. + "serviceEndorsements": [ + "str" # Optional. + ], + "signature": "str" # Required. + }, + "state": "str", # State of a ledger query. Required. Known values are: + "Loading" and "Ready". + "transactionId": "str" # 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. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_receipt_request( + transaction_id=transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def get_transaction_status(self, transaction_id: str, **kwargs: Any) -> JSON: + """Gets the status of an entry identified by a transaction id. + + Gets the status of an entry identified by a transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "state": "str", # Represents the state of the transaction. Required. Known + values are: "Committed" and "Pending". + "transactionId": "str" # 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. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_transaction_status_request( + transaction_id=transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def get_current_ledger_entry(self, *, collection_id: Optional[str] = None, **kwargs: Any) -> JSON: + """Gets the current value available in the ledger. + + A collection id may optionally be specified. + + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_current_ledger_entry_request( + collection_id=collection_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def delete_user(self, user_id: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Deletes a user from the Confidential Ledger. + + Deletes a user from the Confidential Ledger. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_user_request( + user_id=user_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + @distributed_trace + def get_user(self, user_id: str, **kwargs: Any) -> JSON: + """Gets a user. + + Gets a user. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_user_request( + user_id=user_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @overload + def create_or_update_user( + self, user_id: str, user_details: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + ) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Required. + :type user_details: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/merge-patch+json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + user_details = { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + + @overload + def create_or_update_user( + self, user_id: str, user_details: IO, *, content_type: str = "application/merge-patch+json", **kwargs: Any + ) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Required. + :type user_details: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/merge-patch+json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + + @distributed_trace + def create_or_update_user(self, user_id: str, user_details: Union[JSON, IO], **kwargs: Any) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Is either a model type or a IO + type. Required. + :type user_details: JSON or IO + :keyword content_type: Body Parameter content-type. Known values are: + 'application/merge-patch+json'. Default value is None. + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + content_type = content_type or "application/merge-patch+json" + _json = None + _content = None + if isinstance(user_details, (IO, bytes)): + _content = user_details + else: + _json = user_details + + request = build_create_or_update_user_request( + user_id=user_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_patch.py new file mode 100644 index 000000000000..e8e491998de6 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_operations/_patch.py @@ -0,0 +1,321 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + +import time +from typing import Any, IO, Callable, List, Optional, Union, cast + +from azure.core.exceptions import ResourceNotFoundError +from azure.core.polling import PollingMethod, LROPoller, NoPolling + +from azure.confidentialledger._operations._operations import ( + ConfidentialLedgerClientOperationsMixin as GeneratedOperationsMixin, +) +from azure.confidentialledger._operations._operations import ClsType, JSON + +__all__: List[str] = [ + "ConfidentialLedgerClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class BaseStatePollingMethod: + """Base polling method for methods returning responses containing a 'state' field; the polling + completes when 'state' becomes a desired value. + """ + + def __init__( + self, + operation: Callable[[], Any], + desired_state: str, + polling_interval_s: float, + retry_not_found: bool, + ): + self._operation = operation + self._desired_state = desired_state + self._polling_interval_s = polling_interval_s + + self._deserialization_callback = None + self._status = "constructed" + self._latest_response = {} + + self._retry_not_found = retry_not_found + self._received_not_found_exception = False + + def initialize(self, client, initial_response, deserialization_callback): # pylint: disable=unused-argument + self._evaluate_response(initial_response) + self._deserialization_callback = deserialization_callback + + def _evaluate_response(self, response: JSON) -> None: + self._status = "finished" if response["state"] == self._desired_state else "polling" + self._latest_response = response + + def status(self) -> str: + return self._status + + def finished(self) -> bool: + return self.status() in {"finished", "failed"} + + def resource(self): + if self._deserialization_callback: + return self._deserialization_callback(self._latest_response) + + return self._latest_response + + +class StatePollingMethod(BaseStatePollingMethod, PollingMethod): + """Polling method for methods returning responses containing a 'state' field; the polling + completes when 'state' becomes a desired value. + """ + + def __init__( + self, + operation: Callable[[], JSON], + desired_state: str, + polling_interval_s: float, + retry_not_found: bool, + ): + super().__init__(operation, desired_state, polling_interval_s, retry_not_found) + + def run(self) -> None: + try: + while not self.finished(): + try: + response = self._operation() + self._evaluate_response(response) + except ResourceNotFoundError: + # We'll allow one instance of resource not found to account for replication + # delay. + if not self._retry_not_found or self._received_not_found_exception: + raise + + self._received_not_found_exception = True + + if not self.finished(): + time.sleep(self._polling_interval_s) + except Exception: + self._status = "failed" + raise + + +class ConfidentialLedgerClientOperationsMixin(GeneratedOperationsMixin): + def begin_get_ledger_entry( + self, transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any + ) -> LROPoller[JSON]: + """Returns a poller to fetch the ledger entry at the specified transaction id. + + A collection id may optionally be specified to indicate the collection from which to fetch + the value. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: An instance of LROPoller that returns a JSON object for the ledger entry. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + def operation() -> JSON: + return super(ConfidentialLedgerClientOperationsMixin, self).get_ledger_entry( + transaction_id, collection_id=collection_id, **kwargs + ) + + initial_response = operation() + + if polling is True: + polling_method = cast(PollingMethod, StatePollingMethod(operation, "Ready", lro_delay, False)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + + return LROPoller(self._client, initial_response, None, polling_method) + + def begin_get_receipt(self, transaction_id: str, **kwargs: Any) -> LROPoller[JSON]: + """Returns a poller for getting a receipt certifying ledger contents at a particular + transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: An instance of LROPoller that returns a JSON object for the receipt. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + def operation() -> JSON: + return super(ConfidentialLedgerClientOperationsMixin, self).get_receipt( + transaction_id=transaction_id, **kwargs + ) + + initial_response = operation() + + if polling is True: + polling_method = cast(PollingMethod, StatePollingMethod(operation, "Ready", lro_delay, False)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + + return LROPoller(self._client, initial_response, None, polling_method) + + def begin_create_ledger_entry( + self, + entry: Union[JSON, IO], + *, + collection_id: Optional[str] = None, + **kwargs: Any, + ) -> LROPoller[JSON]: + """Writes a ledger entry and returns a poller to wait for it to be durably committed. The + poller returns the result for the initial call to create the ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. + :type entry: Union[JSON, IO] + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: An instance of LROPoller that returns a JSON object + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + # Pop arguments that are unexpected in the pipeline. + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + # Pop the custom deserializer, if any, so we know the format of the response and can + # retrieve the transactionId. Serialize the response later. + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + kwargs["cls"] = lambda pipeline_response, json_response, headers: ( + pipeline_response, + { + **json_response, + "transactionId": headers["x-ms-ccf-transaction-id"], + }, + headers, + ) + + post_pipeline_response, post_result, post_headers = self.create_ledger_entry( + entry, collection_id=collection_id, **kwargs + ) + + # Delete the cls because it should only apply to the create_ledger_entry response, not the + # wait_for_commit call. + del kwargs["cls"] + + transaction_id = post_result["transactionId"] # type: ignore + + kwargs["polling"] = polling + kwargs["polling_interval"] = lro_delay + + if cls: + kwargs["_create_ledger_entry_response"] = cls( + post_pipeline_response, cast(JSON, post_result), post_headers # type: ignore + ) + else: + kwargs["_create_ledger_entry_response"] = post_result + + return self.begin_wait_for_commit(transaction_id, **kwargs) + + def begin_wait_for_commit( + self, + transaction_id, # type: str + **kwargs, # type: Any + ) -> LROPoller[JSON]: + """Creates a poller that queries the state of the specified transaction until it is + Committed, a state that indicates the transaction is durably stored in the Confidential + Ledger. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: An instance of LROPoller returning a JSON object describing the transaction status. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + # If this poller was called from begin_create_ledger_entry, we should return the + # create_ledger_entry response, not the transaction status. + post_result = kwargs.pop("_create_ledger_entry_response", None) + deserialization_callback = lambda x: x if post_result is None else post_result + + def operation() -> JSON: + return super(ConfidentialLedgerClientOperationsMixin, self).get_transaction_status( + transaction_id=transaction_id, **kwargs + ) + + initial_response = operation() + + if polling is True: + polling_method = cast(PollingMethod, StatePollingMethod(operation, "Committed", lro_delay, True)) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + + return LROPoller(self._client, initial_response, deserialization_callback, polling_method) + + def create_ledger_entry( + self, + entry: Union[JSON, IO], + *, + collection_id: Optional[str] = None, + **kwargs: Any, + ) -> JSON: + """Writes a ledger entry. + + The result is the expected JSON response with an additional field + 'transactionId' which represents the transaction identifier for this write operation. + + A collection id may optionally be specified. + + :param entry: Ledger entry. + :type entry: Union[JSON, IO] + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + entry = { + "collectionId": { + "collectionId": "str" # Required. + }, + "contents": "str", # Required. Contents of the ledger entry. + "transactionId": "str" # 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. + } + """ + + kwargs["cls"] = kwargs.get( + "cls", + lambda _, json_response, headers: { + **json_response, + "transactionId": headers["x-ms-ccf-transaction-id"], + }, + ) + return super().create_ledger_entry(entry, collection_id=collection_id, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py new file mode 100644 index 000000000000..5fded8dbce48 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_patch.py @@ -0,0 +1,107 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +import os +from typing import Any, List, Union + +from azure.core.credentials import TokenCredential +from azure.core.pipeline import policies + +from azure.confidentialledger._client import ConfidentialLedgerClient as GeneratedClient +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient + +__all__: List[str] = [ + "ConfidentialLedgerCertificateCredential", + "ConfidentialLedgerClient", +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class ConfidentialLedgerCertificateCredential: + """A certificate-based credential for the ConfidentialLedgerClient. + + :param certificate_path: Path to the PEM certificate to use for authentication. + :type certificate_path: Union[bytes, str, os.PathLike] + """ + + def __init__(self, certificate_path: Union[bytes, str, os.PathLike]): + self._certificate_path = certificate_path + + @property + def certificate_path(self) -> Union[bytes, str, os.PathLike]: + """The path to the certificate file for this credential.""" + + return self._certificate_path + + +class ConfidentialLedgerClient(GeneratedClient): + """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential + Ledger service. + + :param endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. + :type endpoint: str + :param credential: A credential object for authenticating with the Confidential Ledger. + :type credential: Union[ + ~azure.confidentialledger.ConfidentialLedgerCertificateCredential, + ~azure.core.credentials.TokenCredential] + :keyword ledger_certificate_path: The path to the Confidential Ledger's TLS certificate. If this + file does not exist yet, the Confidential Ledger's TLS certificate will be fetched and saved + to this file. + :paramtype ledger_certificate_path: Union[bytes, str, os.PathLike] + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + endpoint: str, + credential: Union[ConfidentialLedgerCertificateCredential, TokenCredential], + *, + ledger_certificate_path: Union[bytes, str, os.PathLike], + **kwargs: Any, + ) -> None: + if os.path.isfile(ledger_certificate_path) is False: + # We'll need to fetch the TLS certificate. + identity_service_client = ConfidentialLedgerCertificateClient(**kwargs) + + # Ledger URIs are of the form https://.confidential-ledger.azure.com. + ledger_id = endpoint.replace("https://", "").split(".")[0] + ledger_cert = identity_service_client.get_ledger_identity(ledger_id, **kwargs) + + with open(ledger_certificate_path, "w", encoding="utf-8") as outfile: + outfile.write(ledger_cert["ledgerTlsCertificate"]) + + # For ConfidentialLedgerCertificateCredential, pass the path to the certificate down to the + # PipelineCLient. + if isinstance(credential, ConfidentialLedgerCertificateCredential): + kwargs["connection_cert"] = kwargs.get("connection_cert", credential.certificate_path) + + # The auto-generated client has authentication disabled so we can customize authentication. + # If the credential is the typical TokenCredential, then construct the authentication policy + # the normal way. + else: + credential_scopes = kwargs.pop("credential_scopes", ["https://confidential-ledger.azure.com/.default"]) + kwargs["authentication_policy"] = kwargs.get( + "authentication_policy", + policies.BearerTokenCredentialPolicy(credential, *credential_scopes, **kwargs), + ) + + # Customize the underlying client to use a self-signed TLS certificate. + kwargs["connection_verify"] = kwargs.get("connection_verify", ledger_certificate_path) + + super().__init__(endpoint, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_serialization.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_serialization.py new file mode 100644 index 000000000000..648f84cc4e65 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_serialization.py @@ -0,0 +1,1970 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote # type: ignore +import xml.etree.ElementTree as ET + +import isodate + +from typing import Dict, Any, cast, TYPE_CHECKING + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +if TYPE_CHECKING: + from typing import Optional, Union, AnyStr, IO, Mapping + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data, content_type=None): + # type: (Optional[Union[AnyStr, IO]], Optional[str]) -> Any + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes, headers): + # type: (Optional[Union[AnyStr, IO]], Mapping) -> Any + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str # type: ignore + unicode_str = str # type: ignore + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc # type: ignore +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes=None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) + continue + if xml_desc.get("text", False): + serialized.text = new_attr + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) + else: # JSON + for k in reversed(keys): + unflattened = {k: new_attr} + new_attr = unflattened + + _new_attr = new_attr + _serialized = serialized + for k in keys: + if k not in _serialized: + _serialized.update(_new_attr) + _new_attr = _new_attr[k] + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) + return result + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes=None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) + attr = attr + padding + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/__init__.py deleted file mode 100644 index f8e4cbb104a1..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -# pylint: disable=unused-import -from .credential import ConfidentialLedgerCertificateCredential - -DEFAULT_VERSION = "0.1-preview" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/credential.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/credential.py deleted file mode 100644 index 57c1835cc616..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_shared/credential.py +++ /dev/null @@ -1,30 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - # pylint:disable=unused-import - pass - - -class ConfidentialLedgerCertificateCredential(object): - """A credential for authenticating with the Confidential Ledger using a certificate. - - :param str certificate_path: Path to the PEM-encoded certificate file including the private key. - """ - - def __init__(self, certificate_path): - # type: (str) -> None - if not certificate_path: - raise ValueError("certificate_path must be a non-empty string") - - if not certificate_path.endswith(".pem"): - raise ValueError("certificate_path must point to a .pem file") - - self.certificate_path = certificate_path diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_user_agent.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_user_agent.py deleted file mode 100644 index 2ebf4b0b9360..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_user_agent.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from ._version import VERSION - -USER_AGENT = "confidentialledger/{}".format(VERSION) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_vendor.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_vendor.py new file mode 100644 index 000000000000..c2b1ba4ac46f --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_vendor.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ConfidentialLedgerClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import PipelineClient + + from ._serialization import Deserializer, Serializer + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "PipelineClient" + _config: ConfidentialLedgerClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_version.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_version.py index e1816f2340d7..c47f66669f1b 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_version.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_version.py @@ -1,6 +1,9 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/__init__.py index 44b20ca97263..8c4cc88b81a3 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/__init__.py @@ -1,10 +1,21 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -# pylint: disable=unused-import +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- from ._client import ConfidentialLedgerClient +try: + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +except ImportError: + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk __all__ = ["ConfidentialLedgerClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py index 940b32753750..c040590052e1 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client.py @@ -1,466 +1,85 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- -import asyncio -from typing import Any, Optional, TYPE_CHECKING, Union +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING -from azure.core.async_paging import AsyncItemPaged -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest -from ._client_base import AsyncConfidentialLedgerClientBase -from .._enums import LedgerUserRole, TransactionState -from .._generated._generated_ledger.v0_1_preview.models import ConfidentialLedgerQueryState -from .._models import ( - AppendResult, - Constitution, - Consortium, - ConsortiumMember, - EnclaveQuote, - LedgerEnclaves, - LedgerEntry, - LedgerUser, - TransactionReceipt, - TransactionStatus, -) -from .._shared import ( - ConfidentialLedgerCertificateCredential, -) +from .._serialization import Deserializer, Serializer +from ._configuration import ConfidentialLedgerClientConfiguration +from ._operations import ConfidentialLedgerClientOperationsMixin if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - - -class ConfidentialLedgerClient(AsyncConfidentialLedgerClientBase): - """An asynchronous client for putting data into and querying data from the Confidential Ledger - service. - - The `transport` parameter is typically accepted by Azure SDK clients to provide a custom - transport stage in the pipeline. Since this client makes modifications to the default transport, - using a custom transport will override and remove the following functionality: - 1) Authentication using a client certificate. - 2) TLS verification using the Confidential Ledger TLS certificate. - - :param str endpoint: URL of the Confidential Ledger service. - :param credential: A credential object for authenticating with the Confidential Ledger. - :type credential: ~azure.confidentialledger.ConfidentialLedgerCertificateCredential - :param str ledger_certificate_path: The path to the ledger's TLS certificate. - :keyword api_version: Version of the Confidential Ledger API to use. Defaults to the most recent. - Support API versions: - - 0.1-preview - :type api_version: str + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + +class ConfidentialLedgerClient( + ConfidentialLedgerClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential + Ledger service. + + :param ledger_endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. Required. + :type ledger_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ - def __init__( - self, - endpoint: str, - credential: Union[ConfidentialLedgerCertificateCredential, "TokenCredential"], - ledger_certificate_path: str, - **kwargs: Any, + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, ledger_endpoint: str, **kwargs: Any ) -> None: - super().__init__( - endpoint=endpoint, - credential=credential, - ledger_certificate_path=ledger_certificate_path, - **kwargs - ) - - @distributed_trace_async - async def append_to_ledger( - self, - entry_contents: str, - *, - sub_ledger_id: Optional[str] = None, - wait_for_commit: bool = False, - **kwargs: Any, - ) -> AppendResult: - """Appends an entry to the Confidential Ledger. - - :param entry_contents: Text to write to the ledger. - :type entry_contents: str - :param sub_ledger_id: Identifies the sub-ledger to append to, defaults to None. If none is - specified, the service will use the service-default sub-ledger id. - :type sub_ledger_id: Optional[str] - :param wait_for_commit: If True, this method will not return until the write is - durably saved to the ledger, defaults to False. - :type wait_for_commit: bool, defaults to False. - :return: Details about the write transaction. - :rtype: ~azure.confidentialledger.AppendResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if entry_contents is None: - raise ValueError("entry_contents must not be None") - - # pylint: disable=protected-access - result = await self._client.confidential_ledger.post_ledger_entry( - contents=entry_contents, - sub_ledger_id=sub_ledger_id, - cls=kwargs.pop("cls", AppendResult._from_pipeline_result), - **kwargs - ) - - if wait_for_commit: - await self.wait_until_durable(result.transaction_id, **kwargs) - - return result - - @distributed_trace_async - async def create_or_update_user( - self, user_id: str, role: Union[str, LedgerUserRole], **kwargs: Any - ) -> LedgerUser: - """Creates a new Confidential Ledger user, or updates an existing one. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :param role: Role to assigned to the user. - :type role: str or LedgerUserRole - :return: Details of the updated ledger user. - :rtype: ~azure.confidentialledger.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None or role is None: - raise ValueError("user_id or role cannot be None") - - result = await self._client.confidential_ledger.create_or_update_user( - user_id=user_id, - assigned_role=role.value if isinstance(role, LedgerUserRole) else role, - **kwargs - ) - return LedgerUser( - user_id=result.user_id, role=LedgerUserRole(result.assigned_role) - ) - - @distributed_trace_async - async def delete_user(self, user_id: str, **kwargs: Any) -> None: - """Deletes a user from the Confidential Ledger. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :return: None - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None: - raise ValueError("user_id cannot be None") - - await self._client.confidential_ledger.delete_user(user_id=user_id, **kwargs) - - @distributed_trace_async - async def get_constitution(self, **kwargs: Any) -> Constitution: - """Gets the constitution used for governance. - - The constitution is a script that assesses and applies proposals from consortium members. - - :return: The contents of the constitution and its digest. - :rtype: ~azure.confidentialledger.Constitution - :raises: ~azure.core.exceptions.HttpResponseError - """ - - result = await self._client.confidential_ledger.get_constitution(**kwargs) - return Constitution(script=result.script, digest=result.digest) - - @distributed_trace_async - async def get_consortium(self, **kwargs: Any) -> Consortium: - """Gets the consortium members. - - Consortium members can manage the Confidential Ledger. - - :return: Details about the consortium. - :rtype: ~azure.confidentialledger.Consortium - :raises: ~azure.core.exceptions.HttpResponseError - """ - - result = await self._client.confidential_ledger.get_consortium_members(**kwargs) - return Consortium( - members=[ - ConsortiumMember(certificate=member.certificate, member_id=member.id) - for member in result.members - ] - ) - - @distributed_trace_async - async def get_enclave_quotes(self, **kwargs: Any) -> LedgerEnclaves: - """Gets enclave quotes from all nodes in the Confidential Ledger network. - - :return: Enclave quotes for nodes in the Confidential Ledger. - :rtype: ~azure.confidentialledger.LedgerEnclaves - :raises: ~azure.core.exceptions.HttpResponseError - """ - - result = await self._client.confidential_ledger.get_enclave_quotes(**kwargs) - return LedgerEnclaves( - { - quote.node_id: EnclaveQuote( - node_id=quote.node_id, - mrenclave=quote.mrenclave, - raw_quote=quote.raw, - version=quote.quote_version, - ) - for quote in result.enclave_quotes.values() - }, - result.current_node_id, - ) - - @distributed_trace - def get_ledger_entries( - self, - *, - from_transaction_id=None, # type: Optional[str] - to_transaction_id=None, # type: Optional[str] - sub_ledger_id=None, # type: Optional[str] - **kwargs # type: Any - ) -> AsyncItemPaged[LedgerEntry]: - """Gets a range of entries in the ledger. - - :param from_transaction_id: Transaction identifier from which to start the query, defaults - to None. If this is None, the query begins from the first transaction. - :type from_transaction_id: Optional[str] - :param to_transaction_id: Transaction identifier at which to end the query (inclusive), - defaults to None. If this is None, the query ends at the end of the ledger. - :type from_transaction_id: Optional[str] - :param sub_ledger_id: Identifies the sub-ledger to fetch the ledger entry from, defaults to - None. - :type sub_ledger_id: Optional[str] - :return: An iterable for iterating over the entries in the range. - :rtype: ~azure.core.async_paging.AsyncItemPaged[LedgerEntry] - :raises: ~azure.core.exceptions.HttpResponseError + _endpoint = "{ledgerEndpoint}" + self._config = ConfidentialLedgerClientConfiguration(ledger_endpoint=ledger_endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse """ - if from_transaction_id is not None: - if not from_transaction_id: - raise ValueError( - "If not None, from_transaction_id must be a non-empty string" - ) - if to_transaction_id is not None: - if not to_transaction_id: - raise ValueError( - "If not None, to_transaction_id must be a non-empty string" - ) - - # pylint: disable=protected-access - return self._client.confidential_ledger.get_ledger_entries( - from_transaction_id=from_transaction_id, - to_transaction_id=to_transaction_id, - sub_ledger_id=sub_ledger_id, - cls=kwargs.pop( - "cls", - lambda entries: [ - LedgerEntry._from_pipeline_result(entry) for entry in entries - ] - if entries is not None - else [], + request_copy = deepcopy(request) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True ), - **kwargs - ) - - @distributed_trace_async - async def get_ledger_entry( - self, - *, - transaction_id: Optional[str] = None, - sub_ledger_id: Optional[str] = None, - interval: float = 0.5, - max_tries: int = 6, - **kwargs: Any, - ) -> LedgerEntry: - """Gets an entry in the ledger. - - :param transaction_id: Transaction identifier, defaults to None. If this is None, the latest - transaction is fetched. - :type transaction_id: Optional[str] - :param sub_ledger_id: Identifies the sub-ledger to fetch the ledger entry from, defaults to - None. - :type sub_ledger_id: Optional[str] - :param interval: Interval, in seconds, between retries while waiting for results. - :type interval: float - :param max_tries: Maximum number of times to try the query. Retries are attempted if the - result is not Ready. - :type max_tries: int - :return: The corresponding ledger entry. - :rtype: ~azure.confidentialledger.LedgerEntry - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if transaction_id is not None: - if not transaction_id: - raise ValueError( - "If not None, transaction_id must be a non-empty string" - ) - - if transaction_id is None: - result = await self._client.confidential_ledger.get_current_ledger_entry( - sub_ledger_id=sub_ledger_id, **kwargs - ) - return LedgerEntry( - transaction_id=result.transaction_id, - contents=result.contents, - sub_ledger_id=result.sub_ledger_id, - ) - - ready = False - result = None - state = None - for _ in range(max_tries): - result = await self._client.confidential_ledger.get_ledger_entry( - transaction_id=transaction_id, sub_ledger_id=sub_ledger_id, **kwargs - ) - ready = result.state == ConfidentialLedgerQueryState.READY - if not ready: - state = result.state - await asyncio.sleep(interval) - else: - break - if not ready: - raise TimeoutError( - "After {} attempts, the query still had state {}, not {}".format( - max_tries, state, ConfidentialLedgerQueryState.READY - ) - ) - - return LedgerEntry( - transaction_id=result.entry.transaction_id, - contents=result.entry.contents, - sub_ledger_id=result.entry.sub_ledger_id, - ) - - @distributed_trace_async - async def get_transaction_receipt( - self, - transaction_id: str, - *, - interval: float = 0.5, - max_tries: int = 6, - **kwargs: Any, - ) -> TransactionReceipt: - """Get a receipt for a specific transaction. - - :param transaction_id: Transaction identifier. - :type transaction_id: str - :param interval: Interval, in seconds, between retries while waiting for results. - :type interval: float - :param max_tries: Maximum number of times to try the query. Retries are attempted if the - result is not Ready. - :type max_tries: int - :return: Receipt certifying the specified transaction. - :rtype: ~azure.confidentialledger.TransactionReceipt - :raises: ~azure.core.exceptions.HttpResponseError - """ + } - if transaction_id is None: - raise ValueError("transaction_id cannot be None") - - ready = False - result = None - state = None - for _ in range(max_tries): - result = await self._client.confidential_ledger.get_receipt( - transaction_id=transaction_id, **kwargs - ) - - ready = result.state == ConfidentialLedgerQueryState.READY - if not ready: - state = result.state - await asyncio.sleep(interval) - else: - break - if not ready: - raise TimeoutError( - "After {} attempts, the query still had state {}, not {}".format( - max_tries, state, ConfidentialLedgerQueryState.READY - ) - ) - - return TransactionReceipt( - transaction_id=result.transaction_id, receipt=result.receipt - ) - - @distributed_trace_async - async def get_transaction_status( - self, transaction_id: str, **kwargs: Any - ) -> TransactionStatus: - """Gets the status of a transaction. - - :param transaction_id: Identifier for the transaction to get the status of. - :type transaction_id: str - :return: Status object describing the transaction status. - :rtype: ~azure.confidentialledger.TransactionStatus - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if transaction_id is None: - raise ValueError("transaction_id cannot be None") - - result = await self._client.confidential_ledger.get_transaction_status( - transaction_id=transaction_id, **kwargs - ) - return TransactionStatus( - transaction_id=result.transaction_id, state=TransactionState(result.state) - ) - - @distributed_trace_async - async def get_user(self, user_id: str, **kwargs: Any) -> LedgerUser: - """Gets a Confidential Ledger user. - - :param user_id: Identifies the user to delete. This should be an AAD object id or - certificate fingerprint. - :type user_id: str - :return: Details about the user. - :rtype: ~azure.confidentialledger.LedgerUser - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if user_id is None: - raise ValueError("user_id cannot be None") - - result = await self._client.confidential_ledger.get_user(user_id=user_id, **kwargs) - return LedgerUser( - user_id=result.user_id, role=LedgerUserRole(result.assigned_role) - ) - - @distributed_trace_async - async def wait_until_durable( - self, - transaction_id, # type: str - *, - interval=0.5, # type: float - max_queries=3, # type: int - **kwargs # type: Any - ): - # type: (...) -> None - """Queries the status of the specified transaction until it is Committed, indicating that - the transaction is durably stored in the Confidential Ledger. If this state is not reached - by `max_queries`, a TimeoutError is raised. - - :param transaction_id: Identifies the transaction to wait for. - :type transaction_id: str - :param interval: Time, in seconds, to wait between queries. - :type interval: float - :param max_queries: The maximum amount of queries to make before raising an exception. - :type max_queries: int - :return: None. - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) - for attempt_num in range(max_queries): - transaction_status = await self.get_transaction_status( - transaction_id=transaction_id, **kwargs - ) - if transaction_status.state is TransactionState.COMMITTED: - return + async def close(self) -> None: + await self._client.close() - if attempt_num < max_queries - 1: - await asyncio.sleep(interval) + async def __aenter__(self) -> "ConfidentialLedgerClient": + await self._client.__aenter__() + return self - raise TimeoutError( - "Transaction {} is not {} yet".format( - transaction_id, TransactionState.COMMITTED - ) - ) + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client_base.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client_base.py deleted file mode 100644 index 1a6a11a47725..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_client_base.py +++ /dev/null @@ -1,127 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from typing import Any, TYPE_CHECKING, Union - -from azure.core.pipeline.policies import ( - AsyncBearerTokenCredentialPolicy, - HttpLoggingPolicy, -) - -from .._user_agent import USER_AGENT -from .._generated._generated_ledger.v0_1_preview.aio import ( - ConfidentialLedgerClient as _ConfidentialLedgerClient, -) -from .._shared import ConfidentialLedgerCertificateCredential, DEFAULT_VERSION - -if TYPE_CHECKING: - from azure.core.credentials import TokenCredential - - -class AsyncConfidentialLedgerClientBase(object): - def __init__( - self, - *, - endpoint: str, - credential: Union[ConfidentialLedgerCertificateCredential, "TokenCredential"], - ledger_certificate_path: str, - **kwargs: Any - ) -> None: - - client = kwargs.get("generated_client") - if client: - # caller provided a configured client -> nothing left to initialize - self._client = client - return - - if not endpoint: - raise ValueError("Expected endpoint to be a non-empty string") - - if not credential: - raise ValueError("Expected credential to not be None") - - if not isinstance(ledger_certificate_path, str): - raise TypeError("ledger_certificate_path must be a string") - - if ledger_certificate_path == "": - raise ValueError( - "If not None, ledger_certificate_path must be a non-empty string" - ) - - endpoint = endpoint.strip(" /") - try: - if not endpoint.startswith("https://"): - self._endpoint = "https://" + endpoint - else: - self._endpoint = endpoint - except AttributeError: - raise ValueError("Confidential Ledger URL must be a string.") - - self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) - - if not kwargs.get("transport", None): - # Customize the transport layer to use client certificate authentication and validate - # a self-signed TLS certificate. - if isinstance(credential, ConfidentialLedgerCertificateCredential): - # The async version of the client seems to expect a sequence of filenames. - # azure/core/pipeline/transport/_aiohttp.py:163 - # > ssl_ctx.load_cert_chain(*cert) - kwargs["connection_cert"] = (credential.certificate_path,) - - kwargs["connection_verify"] = ledger_certificate_path - - http_logging_policy = HttpLoggingPolicy(**kwargs) - http_logging_policy.allowed_header_names.update( - { - "x-ms-keyvault-network-info", - "x-ms-keyvault-region", - "x-ms-keyvault-service-version", - } - ) - - if not isinstance(credential, ConfidentialLedgerCertificateCredential): - kwargs["authentication_policy"] = kwargs.pop( - "authentication_policy", - AsyncBearerTokenCredentialPolicy( - credential, - "https://confidential-ledger.azure.com/.default", - **kwargs - ), - ) - - try: - self._client = _ConfidentialLedgerClient( - self._endpoint, - api_version=self.api_version, - http_logging_policy=http_logging_policy, - sdk_moniker=USER_AGENT, - **kwargs - ) - except NotImplementedError: - raise NotImplementedError( - "This package doesn't support API version '{}'. ".format( - self.api_version - ) - + "Supported versions: 0.1-preview" - ) - - @property - def endpoint(self) -> str: - """The URL this client is connected to.""" - return self._endpoint - - async def __aenter__(self) -> "AsyncConfidentialLedgerClientBase": - await self._client.__aenter__() - return self - - async def __aexit__(self, *args: Any) -> None: - await self._client.__aexit__(*args) - - async def close(self) -> None: - """Close sockets opened by the client. - - Calling this method is unnecessary when using the client as a context manager. - """ - await self._client.close() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_configuration.py new file mode 100644 index 000000000000..6f548afbf6b1 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_configuration.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + + +class ConfidentialLedgerClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ConfidentialLedgerClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param ledger_endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. Required. + :type ledger_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, ledger_endpoint: str, **kwargs: Any) -> None: + super(ConfidentialLedgerClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop("api_version", "2022-05-13") # type: str + + if ledger_endpoint is None: + raise ValueError("Parameter 'ledger_endpoint' must not be None.") + + self.ledger_endpoint = ledger_endpoint + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "confidentialledger/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/__init__.py similarity index 57% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/__init__.py index 512ae8a4c347..a07d13d30393 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/aio/operations/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/__init__.py @@ -6,8 +6,14 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_identity_service_operations import ConfidentialLedgerIdentityServiceOperations +from ._operations import ConfidentialLedgerClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ - 'ConfidentialLedgerIdentityServiceOperations', + "ConfidentialLedgerClientOperationsMixin", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_operations.py new file mode 100644 index 000000000000..624f9722d98c --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_operations.py @@ -0,0 +1,1150 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from urllib.parse import parse_qs, urljoin, urlparse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict + +from ..._operations._operations import ( + build_create_ledger_entry_request, + build_create_or_update_user_request, + build_delete_user_request, + build_get_constitution_request, + build_get_current_ledger_entry_request, + build_get_enclave_quotes_request, + build_get_ledger_entry_request, + build_get_receipt_request, + build_get_transaction_status_request, + build_get_user_request, + build_list_collections_request, + build_list_consortium_members_request, + build_list_ledger_entries_request, +) +from .._vendor import MixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ConfidentialLedgerClientOperationsMixin(MixinABC): + @distributed_trace_async + async def get_constitution(self, **kwargs: Any) -> JSON: + """Gets the constitution used for governance. + + The constitution is a script that assesses and applies proposals from consortium members. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "digest": "str", # SHA256 digest of the constitution script. Required. + "script": "str" # Contents of the constitution. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_constitution_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def list_consortium_members(self, **kwargs: Any) -> AsyncIterable[JSON]: + """Lists the consortium members. + + Consortium members can manage the Confidential Ledger. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "certificate": "str", # PEM-encoded certificate associated with the member. + Required. + "id": "str" # Identifier assigned to the member. Required. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_consortium_members_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["members"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace_async + async def get_enclave_quotes(self, **kwargs: Any) -> JSON: + """Gets quotes for all nodes of the Confidential Ledger. + + A quote is an SGX enclave measurement that can be used to verify the validity of a node and its + enclave. + + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "currentNodeId": "str", # Id of the Confidential Ledger node responding to + the request. Required. + "enclaveQuotes": { + "str": { + "mrenclave": "str", # Optional. MRENCLAVE value of the code + running in the enclave. + "nodeId": "str", # ID assigned to this node. Required. + "quoteVersion": "str", # Version of the quote presented. + Required. + "raw": "str" # Raw SGX quote, parsable by tools like Open + Enclave's oeverify. Required. + } + } + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_enclave_quotes_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace + def list_collections(self, **kwargs: Any) -> AsyncIterable[JSON]: + """Retrieves a list of collection ids present in the Confidential Ledger. + + Collection ids are user-created collections of ledger entries. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_collections_request( + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["collections"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @distributed_trace + def list_ledger_entries( + self, + *, + collection_id: Optional[str] = None, + from_transaction_id: Optional[str] = None, + to_transaction_id: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable[JSON]: + """Gets ledger entries from a collection corresponding to a range. + + A collection id may optionally be specified. Only entries in the specified (or default) + collection will be returned. + + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword from_transaction_id: Specify the first transaction ID in a range. Default value is + None. + :paramtype from_transaction_id: str + :keyword to_transaction_id: Specify the last transaction ID in a range. Default value is None. + :paramtype to_transaction_id: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_ledger_entries_request( + collection_id=collection_id, + from_transaction_id=from_transaction_id, + to_transaction_id=to_transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + else: + # make call to next link with the client's api-version + _parsed_next_link = urlparse(next_link) + _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + return request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = deserialized["entries"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + @overload + async def create_ledger_entry( + self, entry: JSON, *, collection_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Required. + :type entry: JSON + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + entry = { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + + @overload + async def create_ledger_entry( + self, entry: IO, *, collection_id: Optional[str] = None, content_type: str = "application/json", **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Required. + :type entry: IO + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + + @distributed_trace_async + async def create_ledger_entry( + self, entry: Union[JSON, IO], *, collection_id: Optional[str] = None, **kwargs: Any + ) -> JSON: + """Writes a ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. Is either a model type or a IO type. Required. + :type entry: JSON or IO + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. + Default value is None. + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str" # Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + content_type = content_type or "application/json" + _json = None + _content = None + if isinstance(entry, (IO, bytes)): + _content = entry + else: + _json = entry + + request = build_create_ledger_entry_request( + collection_id=collection_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers["x-ms-ccf-transaction-id"] = self._deserialize( + "str", response.headers.get("x-ms-ccf-transaction-id") + ) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), response_headers) + + return cast(JSON, deserialized) + + @distributed_trace_async + async def get_ledger_entry( + self, transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any + ) -> JSON: + """Gets the ledger entry at the specified transaction id. A collection id may optionally be + specified to indicate the collection from which to fetch the value. + + 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. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "entry": { + "collectionId": "str", # Optional. The ledger entry found as a + result of the query. This is only available if the query is in Ready state. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + }, + "state": "str" # State of a ledger query. Required. Known values are: + "Loading" and "Ready". + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_ledger_entry_request( + transaction_id=transaction_id, + collection_id=collection_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace_async + async def get_receipt(self, transaction_id: str, **kwargs: Any) -> JSON: + """Gets a receipt certifying ledger contents at a particular transaction id. + + Gets a receipt certifying ledger contents at a particular transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "receipt": { + "cert": "str", # Optional. + "leaf": "str", # Optional. + "leafComponents": { + "claimsDigest": "str", # Optional. + "commitEvidence": "str", # Optional. + "writeSetDigest": "str" # Optional. + }, + "nodeId": "str", # Required. + "proof": [ + { + "left": "str", # Optional. Required. + "right": "str" # Optional. Required. + } + ], + "root": "str", # Optional. + "serviceEndorsements": [ + "str" # Optional. + ], + "signature": "str" # Required. + }, + "state": "str", # State of a ledger query. Required. Known values are: + "Loading" and "Ready". + "transactionId": "str" # 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. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_receipt_request( + transaction_id=transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace_async + async def get_transaction_status(self, transaction_id: str, **kwargs: Any) -> JSON: + """Gets the status of an entry identified by a transaction id. + + Gets the status of an entry identified by a transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "state": "str", # Represents the state of the transaction. Required. Known + values are: "Committed" and "Pending". + "transactionId": "str" # 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. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_transaction_status_request( + transaction_id=transaction_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace_async + async def get_current_ledger_entry(self, *, collection_id: Optional[str] = None, **kwargs: Any) -> JSON: + """Gets the current value available in the ledger. + + A collection id may optionally be specified. + + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "collectionId": "str", # Optional. + "contents": "str", # Contents of the ledger entry. Required. + "transactionId": "str" # 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. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_current_ledger_entry_request( + collection_id=collection_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @distributed_trace_async + async def delete_user(self, user_id: str, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements + """Deletes a user from the Confidential Ledger. + + Deletes a user from the Confidential Ledger. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[None] + + request = build_delete_user_request( + user_id=user_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + @distributed_trace_async + async def get_user(self, user_id: str, **kwargs: Any) -> JSON: + """Gets a user. + + Gets a user. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_user_request( + user_id=user_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) + + @overload + async def create_or_update_user( + self, user_id: str, user_details: JSON, *, content_type: str = "application/merge-patch+json", **kwargs: Any + ) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Required. + :type user_details: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/merge-patch+json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + user_details = { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + + @overload + async def create_or_update_user( + self, user_id: str, user_details: IO, *, content_type: str = "application/merge-patch+json", **kwargs: Any + ) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Required. + :type user_details: IO + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/merge-patch+json". + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + + @distributed_trace_async + async def create_or_update_user(self, user_id: str, user_details: Union[JSON, IO], **kwargs: Any) -> JSON: + """Adds a user or updates a user's fields. + + A JSON merge patch is applied for existing users. + + :param user_id: The user id, either an AAD object ID or certificate fingerprint. Required. + :type user_id: str + :param user_details: Details about a Confidential Ledger user. Is either a model type or a IO + type. Required. + :type user_details: JSON or IO + :keyword content_type: Body Parameter content-type. Known values are: + 'application/merge-patch+json'. Default value is None. + :paramtype content_type: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "assignedRole": "str", # Represents an assignable role. Required. Known + values are: "Administrator", "Contributor", and "Reader". + "userId": "str" # Optional. Identifier for the user. This must either be an + AAD object id or a certificate fingerprint. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + content_type = content_type or "application/merge-patch+json" + _json = None + _content = None + if isinstance(user_details, (IO, bytes)): + _content = user_details + else: + _json = user_details + + request = build_create_or_update_user_request( + user_id=user_id, + content_type=content_type, + api_version=self._config.api_version, + json=_json, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "ledgerEndpoint": self._serialize.url( + "self._config.ledger_endpoint", self._config.ledger_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_patch.py new file mode 100644 index 000000000000..a8dd9d049f35 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_operations/_patch.py @@ -0,0 +1,281 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" + +import asyncio +from typing import Any, Callable, IO, Coroutine, List, Optional, Union, cast + +from azure.core.exceptions import ResourceNotFoundError +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod + +from azure.confidentialledger.aio._operations._operations import ( + ConfidentialLedgerClientOperationsMixin as GeneratedOperationsMixin, +) +from azure.confidentialledger.aio._operations._operations import ClsType, JSON +from azure.confidentialledger._operations._patch import BaseStatePollingMethod + +__all__: List[str] = [ + "ConfidentialLedgerClientOperationsMixin" +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class AsyncStatePollingMethod(BaseStatePollingMethod, AsyncPollingMethod): + """Polling method for methods returning responses containing a 'state' field; the polling + completes when 'state' becomes a desired value. + """ + + def __init__( + self, + operation: Callable[[], Coroutine[Any, Any, JSON]], + desired_state: str, + polling_interval_s: float, + retry_not_found: bool, + ): + super().__init__(operation, desired_state, polling_interval_s, retry_not_found) + + async def run(self) -> None: + try: + while not self.finished(): + try: + response = await self._operation() + self._evaluate_response(response) + except ResourceNotFoundError: + # We'll allow one instance of resource not found to account for replication + # delay. + if not self._retry_not_found or self._received_not_found_exception: + raise + + self._received_not_found_exception = True + + if not self.finished(): + await asyncio.sleep(self._polling_interval_s) + except Exception: + self._status = "failed" + raise + + +class ConfidentialLedgerClientOperationsMixin(GeneratedOperationsMixin): + async def begin_get_ledger_entry( + self, transaction_id: str, *, collection_id: Optional[str] = None, **kwargs: Any + ) -> AsyncLROPoller[JSON]: + """Returns a poller to fetch the ledger entry at the specified transaction id. + + A collection id may optionally be specified to indicate the collection from which to fetch + the value. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: An instance of LROPoller that returns a JSON object for the ledger entry. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + async def operation() -> JSON: + return await super(ConfidentialLedgerClientOperationsMixin, self).get_ledger_entry( + transaction_id, collection_id=collection_id, **kwargs + ) + + initial_response = await operation() + + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncStatePollingMethod(operation, "Ready", lro_delay, False)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + + return AsyncLROPoller(self._client, initial_response, None, polling_method) + + async def begin_get_receipt(self, transaction_id: str, **kwargs: Any) -> AsyncLROPoller[JSON]: + """Returns a poller for getting a receipt certifying ledger contents at a particular + transaction id. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: An instance of LROPoller that returns a JSON object for the receipt. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + async def operation() -> JSON: + return await super(ConfidentialLedgerClientOperationsMixin, self).get_receipt( + transaction_id=transaction_id, **kwargs + ) + + initial_response = await operation() + + if polling is True: + polling_method = cast(AsyncPollingMethod, AsyncStatePollingMethod(operation, "Ready", lro_delay, False)) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + + return AsyncLROPoller(self._client, initial_response, None, polling_method) + + async def begin_create_ledger_entry( + self, + entry: Union[JSON, IO], + *, + collection_id: Optional[str] = None, + **kwargs: Any, + ) -> AsyncLROPoller[JSON]: + """Writes a ledger entry and returns a poller to wait for it to be durably committed. The + poller returns the result for the initial call to create the ledger entry. + + A collection id may optionally be specified. + + :param entry: Ledger entry. + :type entry: Union[JSON, IO] + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: An instance of LROPoller that returns a JSON object + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises: ~azure.core.exceptions.HttpResponseError + """ + + # Pop arguments that are unexpected in the pipeline. + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + # Pop the custom deserializer, if any, so we know the format of the response and can + # retrieve the transactionId. Serialize the response later. + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + kwargs["cls"] = lambda pipeline_response, json_response, headers: ( + pipeline_response, + { + **json_response, + "transactionId": headers["x-ms-ccf-transaction-id"], + }, + headers, + ) + + post_pipeline_response, post_result, post_headers = await self.create_ledger_entry( + entry, collection_id=collection_id, **kwargs + ) + + # Delete the cls because it should only apply to the create_ledger_entry response, not the + # wait_for_commit call. + del kwargs["cls"] + + transaction_id = post_result["transactionId"] # type: ignore + + kwargs["polling"] = polling + kwargs["polling_interval"] = lro_delay + + if cls: + kwargs["_create_ledger_entry_response"] = cls( + post_pipeline_response, cast(JSON, post_result), post_headers # type: ignore + ) + else: + kwargs["_create_ledger_entry_response"] = post_result + + return await self.begin_wait_for_commit(transaction_id, **kwargs) + + async def begin_wait_for_commit( + self, + transaction_id, # type: str + **kwargs, # type: Any + ) -> AsyncLROPoller[JSON]: + """Creates a poller that queries the state of the specified transaction until it is + Committed, a state that indicates the transaction is durably stored in the Confidential + Ledger. + + :param transaction_id: Identifies a write transaction. Required. + :type transaction_id: str + :return: An instance of LROPoller returning a JSON object describing the transaction status. + :rtype: ~azure.core.polling.LROPoller[JSON] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] + lro_delay = kwargs.pop("polling_interval", 0.5) + + # If this poller was called from begin_create_ledger_entry, we should return the + # create_ledger_entry response, not the transaction status. + post_result = kwargs.pop("_create_ledger_entry_response", None) + deserialization_callback = lambda x: x if post_result is None else post_result + + async def operation() -> JSON: + return await super(ConfidentialLedgerClientOperationsMixin, self).get_transaction_status( + transaction_id=transaction_id, **kwargs + ) + + initial_response = await operation() + + if polling is True: + polling_method = cast( + AsyncPollingMethod, + AsyncStatePollingMethod(operation, "Committed", lro_delay, True), + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + + return AsyncLROPoller(self._client, initial_response, deserialization_callback, polling_method) + + async def create_ledger_entry( + self, + entry: Union[JSON, IO], + *, + collection_id: Optional[str] = None, + **kwargs: Any, + ) -> JSON: + """Writes a ledger entry. + + The result is the expected JSON response with an additional field + 'transactionId' which represents the transaction identifier for this write operation. + + A collection id may optionally be specified. + + :param entry: Ledger entry. + :type entry: Union[JSON, IO] + :keyword collection_id: The collection id. Default value is None. + :paramtype collection_id: str + :return: JSON object + :rtype: JSON + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + entry = { + "collectionId": { + "collectionId": "str" # Required. + }, + "contents": "str", # Required. Contents of the ledger entry. + "transactionId": "str" # 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. + } + """ + + kwargs["cls"] = kwargs.get( + "cls", + lambda _, json_response, headers: { + **json_response, + "transactionId": headers["x-ms-ccf-transaction-id"], + }, + ) + return await super().create_ledger_entry(entry, collection_id=collection_id, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py new file mode 100644 index 000000000000..fe0fefe6c4db --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_patch.py @@ -0,0 +1,97 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +import os +from typing import Any, List, Union + +from azure.core.credentials_async import AsyncTokenCredential +from azure.core.pipeline import policies + +from azure.confidentialledger.aio._client import ( + ConfidentialLedgerClient as GeneratedClient, +) + +# Since we can't `await` in __init__, use the sync client for the Identity Service. +from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient +from azure.confidentialledger._patch import ConfidentialLedgerCertificateCredential + +__all__: List[str] = [ + "ConfidentialLedgerClient", +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class ConfidentialLedgerClient(GeneratedClient): + """The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential + Ledger service. + + :param endpoint: The Confidential Ledger URL, for example + https://contoso.confidentialledger.azure.com. + :type endpoint: str + :param credential: A credential object for authenticating with the Confidential Ledger. + :type credential: Union[ + ~azure.confidentialledger.ConfidentialLedgerCertificateCredential, + ~azure.core.credentials_async.AsyncTokenCredential] + :keyword ledger_certificate_path: The path to the Confidential Ledger's TLS certificate. If this + file does not exist yet, the Confidential Ledger's TLS certificate will be fetched and saved + to this file. + :paramtype ledger_certificate_path: Union[bytes, str, os.PathLike] + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + endpoint: str, + credential: Union[ConfidentialLedgerCertificateCredential, AsyncTokenCredential], + *, + ledger_certificate_path: Union[bytes, str, os.PathLike], + **kwargs: Any, + ) -> None: + if os.path.isfile(ledger_certificate_path) is False: + # We'll need to fetch the TLS certificate. + identity_service_client = ConfidentialLedgerCertificateClient(**kwargs) + + # Ledger URIs are of the form https://.confidential-ledger.azure.com. + ledger_id = endpoint.replace("https://", "").split(".")[0] + ledger_cert = identity_service_client.get_ledger_identity(ledger_id, **kwargs) + + with open(ledger_certificate_path, "w", encoding="utf-8") as outfile: + outfile.write(ledger_cert["ledgerTlsCertificate"]) + + # For ConfidentialLedgerCertificateCredential, pass the path to the certificate down to the + # PipelineCLient. + if isinstance(credential, ConfidentialLedgerCertificateCredential): + # The async version of the client seems to expect a sequence of filenames. + # azure/core/pipeline/transport/_aiohttp.py:163 + # > ssl_ctx.load_cert_chain(*cert) + kwargs["connection_cert"] = (credential.certificate_path,) + + # The auto-generated client has authentication disabled so we can customize authentication. + # If the credential is the typical TokenCredential, then construct the authentication policy + # the normal way. + else: + credential_scopes = kwargs.pop("credential_scopes", ["https://confidential-ledger.azure.com/.default"]) + kwargs["authentication_policy"] = kwargs.get( + "authentication_policy", + policies.AsyncBearerTokenCredentialPolicy(credential, *credential_scopes, **kwargs), + ) + + # Customize the underlying client to use a self-signed TLS certificate. + kwargs["connection_verify"] = kwargs.get("connection_verify", ledger_certificate_path) + + super().__init__(endpoint, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_vendor.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_vendor.py new file mode 100644 index 000000000000..48480a9bf1b4 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/aio/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ConfidentialLedgerClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import AsyncPipelineClient + + from .._serialization import Deserializer, Serializer + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "AsyncPipelineClient" + _config: ConfidentialLedgerClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/__init__.py similarity index 59% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/__init__.py index 6f88624cf976..c5f6e3cde7b1 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/__init__.py @@ -6,14 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_identity_service_client import ConfidentialLedgerIdentityServiceClient +from ._client import ConfidentialLedgerCertificateClient from ._version import VERSION __version__ = VERSION -__all__ = ['ConfidentialLedgerIdentityServiceClient'] try: - from ._patch import patch_sdk # type: ignore - patch_sdk() + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import except ImportError: - pass + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["ConfidentialLedgerCertificateClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_client.py new file mode 100644 index 000000000000..be5a85104e18 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_client.py @@ -0,0 +1,90 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, TYPE_CHECKING + +from azure.core import PipelineClient +from azure.core.rest import HttpRequest, HttpResponse + +from ._configuration import ConfidentialLedgerCertificateClientConfiguration +from ._operations import ConfidentialLedgerCertificateClientOperationsMixin +from ._serialization import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + +class ConfidentialLedgerCertificateClient( + ConfidentialLedgerCertificateClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """The ConfidentialLedgerCertificateClient is used to retrieve the TLS certificate required for + connecting to a Confidential Ledger. + + :param certificate_endpoint: The certificate endpoint (or "Identity Service Endpoint" in the + Azure portal), for example https://identity.confidential-ledger.core.azure.com. Required. + :type certificate_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, certificate_endpoint: str, **kwargs: Any + ) -> None: + _endpoint = "{certificateEndpoint}" + self._config = ConfidentialLedgerCertificateClientConfiguration( + certificate_endpoint=certificate_endpoint, **kwargs + ) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "certificateEndpoint": self._serialize.url( + "self._config.certificate_endpoint", self._config.certificate_endpoint, "str", skip_quote=True + ), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ConfidentialLedgerCertificateClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_configuration.py new file mode 100644 index 000000000000..38a719911f7a --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_configuration.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + + +class ConfidentialLedgerCertificateClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ConfidentialLedgerCertificateClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param certificate_endpoint: The certificate endpoint (or "Identity Service Endpoint" in the + Azure portal), for example https://identity.confidential-ledger.core.azure.com. Required. + :type certificate_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, certificate_endpoint: str, **kwargs: Any) -> None: + super(ConfidentialLedgerCertificateClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop("api_version", "2022-05-13") # type: str + + if certificate_endpoint is None: + raise ValueError("Parameter 'certificate_endpoint' must not be None.") + + self.certificate_endpoint = certificate_endpoint + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "confidentialledger-certificate/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/__init__.py similarity index 56% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/__init__.py index 512ae8a4c347..d52f4bc0bbb3 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/operations/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/__init__.py @@ -6,8 +6,14 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_identity_service_operations import ConfidentialLedgerIdentityServiceOperations +from ._operations import ConfidentialLedgerCertificateClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ - 'ConfidentialLedgerIdentityServiceOperations', + "ConfidentialLedgerCertificateClientOperationsMixin", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_operations.py new file mode 100644 index 000000000000..af8d04b47afe --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_operations.py @@ -0,0 +1,126 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar, cast + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict + +from .._serialization import Serializer +from .._vendor import MixinABC, _format_url_section + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_get_ledger_identity_request(ledger_id: str, **kwargs: Any) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-13")) # type: str + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/ledgerIdentity/{ledgerId}" + path_format_arguments = { + "ledgerId": _SERIALIZER.url("ledger_id", ledger_id, "str"), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +class ConfidentialLedgerCertificateClientOperationsMixin(MixinABC): + @distributed_trace + def get_ledger_identity(self, ledger_id: str, **kwargs: Any) -> JSON: + """Gets identity information for a Confidential Ledger instance. + + Gets identity information for a Confidential Ledger instance. + + :param ledger_id: Id of the Confidential Ledger instance to get information for. Required. + :type ledger_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "ledgerId": "str", # Optional. Id for the ledger. + "ledgerTlsCertificate": "str" # PEM-encoded certificate used for TLS by the + Confidential Ledger. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_ledger_identity_request( + ledger_id=ledger_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "certificateEndpoint": self._serialize.url( + "self._config.certificate_endpoint", self._config.certificate_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_patch.py new file mode 100644 index 000000000000..84a65981a6ad --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_patch.py @@ -0,0 +1,46 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import Any, List, Optional + +from azure.confidentialledger.certificate._client import ( + ConfidentialLedgerCertificateClient as GeneratedClient, +) + +__all__: List[str] = [ + "ConfidentialLedgerCertificateClient" +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class ConfidentialLedgerCertificateClient(GeneratedClient): + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, certificate_endpoint: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :param certificate_endpoint: The Identity Service URL, for example + https://identity.confidential-ledger.core.azure.com, defaults to None. If not provided, + "https://identity.confidential-ledger.core.azure.com" will be used. + :type certificate_endpoint: Optional[str], optional + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + if not certificate_endpoint: + certificate_endpoint = "https://identity.confidential-ledger.core.azure.com" + + super().__init__(certificate_endpoint, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_serialization.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_serialization.py new file mode 100644 index 000000000000..648f84cc4e65 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_serialization.py @@ -0,0 +1,1970 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# pylint: skip-file + +from base64 import b64decode, b64encode +import calendar +import datetime +import decimal +import email +from enum import Enum +import json +import logging +import re +import sys +import codecs + +try: + from urllib import quote # type: ignore +except ImportError: + from urllib.parse import quote # type: ignore +import xml.etree.ElementTree as ET + +import isodate + +from typing import Dict, Any, cast, TYPE_CHECKING + +from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback + +_BOM = codecs.BOM_UTF8.decode(encoding="utf-8") + +if TYPE_CHECKING: + from typing import Optional, Union, AnyStr, IO, Mapping + + +class RawDeserializer: + + # Accept "text" because we're open minded people... + JSON_REGEXP = re.compile(r"^(application|text)/([a-z+.]+\+)?json$") + + # Name used in context + CONTEXT_NAME = "deserialized_data" + + @classmethod + def deserialize_from_text(cls, data, content_type=None): + # type: (Optional[Union[AnyStr, IO]], Optional[str]) -> Any + """Decode data according to content-type. + + Accept a stream of data as well, but will be load at once in memory for now. + + If no content-type, will return the string version (not bytes, not stream) + + :param data: Input, could be bytes or stream (will be decoded with UTF8) or text + :type data: str or bytes or IO + :param str content_type: The content type. + """ + if hasattr(data, "read"): + # Assume a stream + data = cast(IO, data).read() + + if isinstance(data, bytes): + data_as_str = data.decode(encoding="utf-8-sig") + else: + # Explain to mypy the correct type. + data_as_str = cast(str, data) + + # Remove Byte Order Mark if present in string + data_as_str = data_as_str.lstrip(_BOM) + + if content_type is None: + return data + + if cls.JSON_REGEXP.match(content_type): + try: + return json.loads(data_as_str) + except ValueError as err: + raise DeserializationError("JSON is invalid: {}".format(err), err) + elif "xml" in (content_type or []): + try: + + try: + if isinstance(data, unicode): # type: ignore + # If I'm Python 2.7 and unicode XML will scream if I try a "fromstring" on unicode string + data_as_str = data_as_str.encode(encoding="utf-8") # type: ignore + except NameError: + pass + + return ET.fromstring(data_as_str) # nosec + except ET.ParseError: + # It might be because the server has an issue, and returned JSON with + # content-type XML.... + # So let's try a JSON load, and if it's still broken + # let's flow the initial exception + def _json_attemp(data): + try: + return True, json.loads(data) + except ValueError: + return False, None # Don't care about this one + + success, json_result = _json_attemp(data) + if success: + return json_result + # If i'm here, it's not JSON, it's not XML, let's scream + # and raise the last context in this block (the XML exception) + # The function hack is because Py2.7 messes up with exception + # context otherwise. + _LOGGER.critical("Wasn't XML not JSON, failing") + raise_with_traceback(DeserializationError, "XML is invalid") + raise DeserializationError("Cannot deserialize content-type: {}".format(content_type)) + + @classmethod + def deserialize_from_http_generics(cls, body_bytes, headers): + # type: (Optional[Union[AnyStr, IO]], Mapping) -> Any + """Deserialize from HTTP response. + + Use bytes and headers to NOT use any requests/aiohttp or whatever + specific implementation. + Headers will tested for "content-type" + """ + # Try to use content-type from headers if available + content_type = None + if "content-type" in headers: + content_type = headers["content-type"].split(";")[0].strip().lower() + # Ouch, this server did not declare what it sent... + # Let's guess it's JSON... + # Also, since Autorest was considering that an empty body was a valid JSON, + # need that test as well.... + else: + content_type = "application/json" + + if body_bytes: + return cls.deserialize_from_text(body_bytes, content_type) + return None + + +try: + basestring # type: ignore + unicode_str = unicode # type: ignore +except NameError: + basestring = str # type: ignore + unicode_str = str # type: ignore + +_LOGGER = logging.getLogger(__name__) + +try: + _long_type = long # type: ignore +except NameError: + _long_type = int + + +class UTC(datetime.tzinfo): + """Time Zone info for handling UTC""" + + def utcoffset(self, dt): + """UTF offset for UTC is 0.""" + return datetime.timedelta(0) + + def tzname(self, dt): + """Timestamp representation.""" + return "Z" + + def dst(self, dt): + """No daylight saving for UTC.""" + return datetime.timedelta(hours=1) + + +try: + from datetime import timezone as _FixedOffset +except ImportError: # Python 2.7 + + class _FixedOffset(datetime.tzinfo): # type: ignore + """Fixed offset in minutes east from UTC. + Copy/pasted from Python doc + :param datetime.timedelta offset: offset in timedelta format + """ + + def __init__(self, offset): + self.__offset = offset + + def utcoffset(self, dt): + return self.__offset + + def tzname(self, dt): + return str(self.__offset.total_seconds() / 3600) + + def __repr__(self): + return "".format(self.tzname(None)) + + def dst(self, dt): + return datetime.timedelta(0) + + def __getinitargs__(self): + return (self.__offset,) + + +try: + from datetime import timezone + + TZ_UTC = timezone.utc # type: ignore +except ImportError: + TZ_UTC = UTC() # type: ignore + +_FLATTEN = re.compile(r"(? y, + "minimum": lambda x, y: x < y, + "maximum": lambda x, y: x > y, + "minimum_ex": lambda x, y: x <= y, + "maximum_ex": lambda x, y: x >= y, + "min_items": lambda x, y: len(x) < y, + "max_items": lambda x, y: len(x) > y, + "pattern": lambda x, y: not re.match(y, x, re.UNICODE), + "unique": lambda x, y: len(x) != len(set(x)), + "multiple": lambda x, y: x % y != 0, + } + + def __init__(self, classes=None): + self.serialize_type = { + "iso-8601": Serializer.serialize_iso, + "rfc-1123": Serializer.serialize_rfc, + "unix-time": Serializer.serialize_unix, + "duration": Serializer.serialize_duration, + "date": Serializer.serialize_date, + "time": Serializer.serialize_time, + "decimal": Serializer.serialize_decimal, + "long": Serializer.serialize_long, + "bytearray": Serializer.serialize_bytearray, + "base64": Serializer.serialize_base64, + "object": self.serialize_object, + "[]": self.serialize_iter, + "{}": self.serialize_dict, + } + self.dependencies = dict(classes) if classes else {} + self.key_transformer = full_restapi_key_transformer + self.client_side_validation = True + + def _serialize(self, target_obj, data_type=None, **kwargs): + """Serialize data into a string according to type. + + :param target_obj: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str, dict + :raises: SerializationError if serialization fails. + """ + key_transformer = kwargs.get("key_transformer", self.key_transformer) + keep_readonly = kwargs.get("keep_readonly", False) + if target_obj is None: + return None + + attr_name = None + class_name = target_obj.__class__.__name__ + + if data_type: + return self.serialize_data(target_obj, data_type, **kwargs) + + if not hasattr(target_obj, "_attribute_map"): + data_type = type(target_obj).__name__ + if data_type in self.basic_types.values(): + return self.serialize_data(target_obj, data_type, **kwargs) + + # Force "is_xml" kwargs if we detect a XML model + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + is_xml_model_serialization = kwargs.setdefault("is_xml", target_obj.is_xml_model()) + + serialized = {} + if is_xml_model_serialization: + serialized = target_obj._create_xml_node() + try: + attributes = target_obj._attribute_map + for attr, attr_desc in attributes.items(): + attr_name = attr + if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + continue + + if attr_name == "additional_properties" and attr_desc["key"] == "": + if target_obj.additional_properties is not None: + serialized.update(target_obj.additional_properties) + continue + try: + + orig_attr = getattr(target_obj, attr) + if is_xml_model_serialization: + pass # Don't provide "transformer" for XML for now. Keep "orig_attr" + else: # JSON + keys, orig_attr = key_transformer(attr, attr_desc.copy(), orig_attr) + keys = keys if isinstance(keys, list) else [keys] + + kwargs["serialization_ctxt"] = attr_desc + new_attr = self.serialize_data(orig_attr, attr_desc["type"], **kwargs) + + if is_xml_model_serialization: + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + xml_prefix = xml_desc.get("prefix", None) + xml_ns = xml_desc.get("ns", None) + if xml_desc.get("attr", False): + if xml_ns: + ET.register_namespace(xml_prefix, xml_ns) + xml_name = "{}{}".format(xml_ns, xml_name) + serialized.set(xml_name, new_attr) + continue + if xml_desc.get("text", False): + serialized.text = new_attr + continue + if isinstance(new_attr, list): + serialized.extend(new_attr) + elif isinstance(new_attr, ET.Element): + # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + if "name" not in getattr(orig_attr, "_xml_map", {}): + splitted_tag = new_attr.tag.split("}") + if len(splitted_tag) == 2: # Namespace + new_attr.tag = "}".join([splitted_tag[0], xml_name]) + else: + new_attr.tag = xml_name + serialized.append(new_attr) + else: # That's a basic type + # Integrate namespace if necessary + local_node = _create_xml_node(xml_name, xml_prefix, xml_ns) + local_node.text = unicode_str(new_attr) + serialized.append(local_node) + else: # JSON + for k in reversed(keys): + unflattened = {k: new_attr} + new_attr = unflattened + + _new_attr = new_attr + _serialized = serialized + for k in keys: + if k not in _serialized: + _serialized.update(_new_attr) + _new_attr = _new_attr[k] + _serialized = _serialized[k] + except ValueError: + continue + + except (AttributeError, KeyError, TypeError) as err: + msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) + raise_with_traceback(SerializationError, msg, err) + else: + return serialized + + def body(self, data, data_type, **kwargs): + """Serialize data intended for a request body. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: dict + :raises: SerializationError if serialization fails. + :raises: ValueError if data is None + """ + + # Just in case this is a dict + internal_data_type = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type, None) + try: + is_xml_model_serialization = kwargs["is_xml"] + except KeyError: + if internal_data_type and issubclass(internal_data_type, Model): + is_xml_model_serialization = kwargs.setdefault("is_xml", internal_data_type.is_xml_model()) + else: + is_xml_model_serialization = False + if internal_data_type and not isinstance(internal_data_type, Enum): + try: + deserializer = Deserializer(self.dependencies) + # Since it's on serialization, it's almost sure that format is not JSON REST + # We're not able to deal with additional properties for now. + deserializer.additional_properties_detection = False + if is_xml_model_serialization: + deserializer.key_extractors = [ + attribute_key_case_insensitive_extractor, + ] + else: + deserializer.key_extractors = [ + rest_key_case_insensitive_extractor, + attribute_key_case_insensitive_extractor, + last_rest_key_case_insensitive_extractor, + ] + data = deserializer._deserialize(data_type, data) + except DeserializationError as err: + raise_with_traceback(SerializationError, "Unable to build a model: " + str(err), err) + + return self._serialize(data, data_type, **kwargs) + + def url(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL path. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return output + + def query(self, name, data, data_type, **kwargs): + """Serialize data intended for a URL query. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + # Treat the list aside, since we don't want to encode the div separator + if data_type.startswith("["): + internal_data_type = data_type[1:-1] + data = [self.serialize_data(d, internal_data_type, **kwargs) if d is not None else "" for d in data] + if not kwargs.get("skip_quote", False): + data = [quote(str(d), safe="") for d in data] + return str(self.serialize_iter(data, internal_data_type, **kwargs)) + + # Not a list, regular serialization + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + if kwargs.get("skip_quote") is True: + output = str(output) + else: + output = quote(str(output), safe="") + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def header(self, name, data, data_type, **kwargs): + """Serialize data intended for a request header. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :rtype: str + :raises: TypeError if serialization fails. + :raises: ValueError if data is None + """ + try: + if data_type in ["[str]"]: + data = ["" if d is None else d for d in data] + + output = self.serialize_data(data, data_type, **kwargs) + if data_type == "bool": + output = json.dumps(output) + except SerializationError: + raise TypeError("{} must be type {}.".format(name, data_type)) + else: + return str(output) + + def serialize_data(self, data, data_type, **kwargs): + """Serialize generic data according to supplied data type. + + :param data: The data to be serialized. + :param str data_type: The type to be serialized from. + :param bool required: Whether it's essential that the data not be + empty or None + :raises: AttributeError if required data is None. + :raises: ValueError if data is None + :raises: SerializationError if serialization fails. + """ + if data is None: + raise ValueError("No value for given attribute") + + try: + if data_type in self.basic_types.values(): + return self.serialize_basic(data, data_type, **kwargs) + + elif data_type in self.serialize_type: + return self.serialize_type[data_type](data, **kwargs) + + # If dependencies is empty, try with current data class + # It has to be a subclass of Enum anyway + enum_type = self.dependencies.get(data_type, data.__class__) + if issubclass(enum_type, Enum): + return Serializer.serialize_enum(data, enum_obj=enum_type) + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.serialize_type: + return self.serialize_type[iter_type](data, data_type[1:-1], **kwargs) + + except (ValueError, TypeError) as err: + msg = "Unable to serialize value: {!r} as type: {!r}." + raise_with_traceback(SerializationError, msg.format(data, data_type), err) + else: + return self._serialize(data, **kwargs) + + @classmethod + def _get_custom_serializers(cls, data_type, **kwargs): + custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) + if custom_serializer: + return custom_serializer + if kwargs.get("is_xml", False): + return cls._xml_basic_types_serializers.get(data_type) + + @classmethod + def serialize_basic(cls, data, data_type, **kwargs): + """Serialize basic builting data type. + Serializes objects to str, int, float or bool. + + Possible kwargs: + - basic_types_serializers dict[str, callable] : If set, use the callable as serializer + - is_xml bool : If set, use xml_basic_types_serializers + + :param data: Object to be serialized. + :param str data_type: Type of object in the iterable. + """ + custom_serializer = cls._get_custom_serializers(data_type, **kwargs) + if custom_serializer: + return custom_serializer(data) + if data_type == "str": + return cls.serialize_unicode(data) + return eval(data_type)(data) # nosec + + @classmethod + def serialize_unicode(cls, data): + """Special handling for serializing unicode strings in Py2. + Encode to UTF-8 if unicode, otherwise handle as a str. + + :param data: Object to be serialized. + :rtype: str + """ + try: # If I received an enum, return its value + return data.value + except AttributeError: + pass + + try: + if isinstance(data, unicode): + # Don't change it, JSON and XML ElementTree are totally able + # to serialize correctly u'' strings + return data + except NameError: + return str(data) + else: + return str(data) + + def serialize_iter(self, data, iter_type, div=None, **kwargs): + """Serialize iterable. + + Supported kwargs: + - serialization_ctxt dict : The current entry of _attribute_map, or same format. + serialization_ctxt['type'] should be same as data_type. + - is_xml bool : If set, serialize as XML + + :param list attr: Object to be serialized. + :param str iter_type: Type of object in the iterable. + :param bool required: Whether the objects in the iterable must + not be None or empty. + :param str div: If set, this str will be used to combine the elements + in the iterable into a combined string. Default is 'None'. + :rtype: list, str + """ + if isinstance(data, str): + raise SerializationError("Refuse str type as a valid iter type.") + + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + is_xml = kwargs.get("is_xml", False) + + serialized = [] + for d in data: + try: + serialized.append(self.serialize_data(d, iter_type, **kwargs)) + except ValueError: + serialized.append(None) + + if div: + serialized = ["" if s is None else str(s) for s in serialized] + serialized = div.join(serialized) + + if "xml" in serialization_ctxt or is_xml: + # XML serialization is more complicated + xml_desc = serialization_ctxt.get("xml", {}) + xml_name = xml_desc.get("name") + if not xml_name: + xml_name = serialization_ctxt["key"] + + # Create a wrap node if necessary (use the fact that Element and list have "append") + is_wrapped = xml_desc.get("wrapped", False) + node_name = xml_desc.get("itemsName", xml_name) + if is_wrapped: + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + else: + final_result = [] + # All list elements to "local_node" + for el in serialized: + if isinstance(el, ET.Element): + el_node = el + else: + el_node = _create_xml_node(node_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + if el is not None: # Otherwise it writes "None" :-p + el_node.text = str(el) + final_result.append(el_node) + return final_result + return serialized + + def serialize_dict(self, attr, dict_type, **kwargs): + """Serialize a dictionary of objects. + + :param dict attr: Object to be serialized. + :param str dict_type: Type of object in the dictionary. + :param bool required: Whether the objects in the dictionary must + not be None or empty. + :rtype: dict + """ + serialization_ctxt = kwargs.get("serialization_ctxt", {}) + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_data(value, dict_type, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + + if "xml" in serialization_ctxt: + # XML serialization is more complicated + xml_desc = serialization_ctxt["xml"] + xml_name = xml_desc["name"] + + final_result = _create_xml_node(xml_name, xml_desc.get("prefix", None), xml_desc.get("ns", None)) + for key, value in serialized.items(): + ET.SubElement(final_result, key).text = value + return final_result + + return serialized + + def serialize_object(self, attr, **kwargs): + """Serialize a generic object. + This will be handled as a dictionary. If object passed in is not + a basic type (str, int, float, dict, list) it will simply be + cast to str. + + :param dict attr: Object to be serialized. + :rtype: dict or str + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + return attr + obj_type = type(attr) + if obj_type in self.basic_types: + return self.serialize_basic(attr, self.basic_types[obj_type], **kwargs) + if obj_type is _long_type: + return self.serialize_long(attr) + if obj_type is unicode_str: + return self.serialize_unicode(attr) + if obj_type is datetime.datetime: + return self.serialize_iso(attr) + if obj_type is datetime.date: + return self.serialize_date(attr) + if obj_type is datetime.time: + return self.serialize_time(attr) + if obj_type is datetime.timedelta: + return self.serialize_duration(attr) + if obj_type is decimal.Decimal: + return self.serialize_decimal(attr) + + # If it's a model or I know this dependency, serialize as a Model + elif obj_type in self.dependencies.values() or isinstance(attr, Model): + return self._serialize(attr) + + if obj_type == dict: + serialized = {} + for key, value in attr.items(): + try: + serialized[self.serialize_unicode(key)] = self.serialize_object(value, **kwargs) + except ValueError: + serialized[self.serialize_unicode(key)] = None + return serialized + + if obj_type == list: + serialized = [] + for obj in attr: + try: + serialized.append(self.serialize_object(obj, **kwargs)) + except ValueError: + pass + return serialized + return str(attr) + + @staticmethod + def serialize_enum(attr, enum_obj=None): + try: + result = attr.value + except AttributeError: + result = attr + try: + enum_obj(result) + return result + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(attr).lower(): + return enum_value.value + error = "{!r} is not valid value for enum {!r}" + raise SerializationError(error.format(attr, enum_obj)) + + @staticmethod + def serialize_bytearray(attr, **kwargs): + """Serialize bytearray into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + return b64encode(attr).decode() + + @staticmethod + def serialize_base64(attr, **kwargs): + """Serialize str into base-64 string. + + :param attr: Object to be serialized. + :rtype: str + """ + encoded = b64encode(attr).decode("ascii") + return encoded.strip("=").replace("+", "-").replace("/", "_") + + @staticmethod + def serialize_decimal(attr, **kwargs): + """Serialize Decimal object to float. + + :param attr: Object to be serialized. + :rtype: float + """ + return float(attr) + + @staticmethod + def serialize_long(attr, **kwargs): + """Serialize long (Py2) or int (Py3). + + :param attr: Object to be serialized. + :rtype: int/long + """ + return _long_type(attr) + + @staticmethod + def serialize_date(attr, **kwargs): + """Serialize Date object into ISO-8601 formatted string. + + :param Date attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_date(attr) + t = "{:04}-{:02}-{:02}".format(attr.year, attr.month, attr.day) + return t + + @staticmethod + def serialize_time(attr, **kwargs): + """Serialize Time object into ISO-8601 formatted string. + + :param datetime.time attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_time(attr) + t = "{:02}:{:02}:{:02}".format(attr.hour, attr.minute, attr.second) + if attr.microsecond: + t += ".{:02}".format(attr.microsecond) + return t + + @staticmethod + def serialize_duration(attr, **kwargs): + """Serialize TimeDelta object into ISO-8601 formatted string. + + :param TimeDelta attr: Object to be serialized. + :rtype: str + """ + if isinstance(attr, str): + attr = isodate.parse_duration(attr) + return isodate.duration_isoformat(attr) + + @staticmethod + def serialize_rfc(attr, **kwargs): + """Serialize Datetime object into RFC-1123 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: TypeError if format invalid. + """ + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + except AttributeError: + raise TypeError("RFC1123 object must be valid Datetime object.") + + return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( + Serializer.days[utc.tm_wday], + utc.tm_mday, + Serializer.months[utc.tm_mon], + utc.tm_year, + utc.tm_hour, + utc.tm_min, + utc.tm_sec, + ) + + @staticmethod + def serialize_iso(attr, **kwargs): + """Serialize Datetime object into ISO-8601 formatted string. + + :param Datetime attr: Object to be serialized. + :rtype: str + :raises: SerializationError if format invalid. + """ + if isinstance(attr, str): + attr = isodate.parse_datetime(attr) + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + utc = attr.utctimetuple() + if utc.tm_year > 9999 or utc.tm_year < 1: + raise OverflowError("Hit max or min date") + + microseconds = str(attr.microsecond).rjust(6, "0").rstrip("0").ljust(3, "0") + if microseconds: + microseconds = "." + microseconds + date = "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}".format( + utc.tm_year, utc.tm_mon, utc.tm_mday, utc.tm_hour, utc.tm_min, utc.tm_sec + ) + return date + microseconds + "Z" + except (ValueError, OverflowError) as err: + msg = "Unable to serialize datetime object." + raise_with_traceback(SerializationError, msg, err) + except AttributeError as err: + msg = "ISO-8601 object must be valid Datetime object." + raise_with_traceback(TypeError, msg, err) + + @staticmethod + def serialize_unix(attr, **kwargs): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param Datetime attr: Object to be serialized. + :rtype: int + :raises: SerializationError if format invalid + """ + if isinstance(attr, int): + return attr + try: + if not attr.tzinfo: + _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") + return int(calendar.timegm(attr.utctimetuple())) + except AttributeError: + raise TypeError("Unix time object must be valid Datetime object.") + + +def rest_key_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = working_data.get(working_key, data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + return working_data.get(key) + + +def rest_key_case_insensitive_extractor(attr, attr_desc, data): + key = attr_desc["key"] + working_data = data + + while "." in key: + dict_keys = _FLATTEN.split(key) + if len(dict_keys) == 1: + key = _decode_attribute_map_key(dict_keys[0]) + break + working_key = _decode_attribute_map_key(dict_keys[0]) + working_data = attribute_key_case_insensitive_extractor(working_key, None, working_data) + if working_data is None: + # If at any point while following flatten JSON path see None, it means + # that all properties under are None as well + # https://github.com/Azure/msrest-for-python/issues/197 + return None + key = ".".join(dict_keys[1:]) + + if working_data: + return attribute_key_case_insensitive_extractor(key, None, working_data) + + +def last_rest_key_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key.""" + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_extractor(dict_keys[-1], None, data) + + +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): + """Extract the attribute in "data" based on the last part of the JSON path key. + + This is the case insensitive version of "last_rest_key_extractor" + """ + key = attr_desc["key"] + dict_keys = _FLATTEN.split(key) + return attribute_key_case_insensitive_extractor(dict_keys[-1], None, data) + + +def attribute_key_extractor(attr, _, data): + return data.get(attr) + + +def attribute_key_case_insensitive_extractor(attr, _, data): + found_key = None + lower_attr = attr.lower() + for key in data: + if lower_attr == key.lower(): + found_key = key + break + + return data.get(found_key) + + +def _extract_name_from_internal_type(internal_type): + """Given an internal type XML description, extract correct XML name with namespace. + + :param dict internal_type: An model type + :rtype: tuple + :returns: A tuple XML name + namespace dict + """ + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + xml_name = internal_type_xml_map.get("name", internal_type.__name__) + xml_ns = internal_type_xml_map.get("ns", None) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + return xml_name + + +def xml_key_extractor(attr, attr_desc, data): + if isinstance(data, dict): + return None + + # Test if this model is XML ready first + if not isinstance(data, ET.Element): + return None + + xml_desc = attr_desc.get("xml", {}) + xml_name = xml_desc.get("name", attr_desc["key"]) + + # Look for a children + is_iter_type = attr_desc["type"].startswith("[") + is_wrapped = xml_desc.get("wrapped", False) + internal_type = attr_desc.get("internalType", None) + internal_type_xml_map = getattr(internal_type, "_xml_map", {}) + + # Integrate namespace if necessary + xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) + if xml_ns: + xml_name = "{}{}".format(xml_ns, xml_name) + + # If it's an attribute, that's simple + if xml_desc.get("attr", False): + return data.get(xml_name) + + # If it's x-ms-text, that's simple too + if xml_desc.get("text", False): + return data.text + + # Scenario where I take the local name: + # - Wrapped node + # - Internal type is an enum (considered basic types) + # - Internal type has no XML/Name node + if is_wrapped or (internal_type and (issubclass(internal_type, Enum) or "name" not in internal_type_xml_map)): + children = data.findall(xml_name) + # If internal type has a local name and it's not a list, I use that name + elif not is_iter_type and internal_type and "name" in internal_type_xml_map: + xml_name = _extract_name_from_internal_type(internal_type) + children = data.findall(xml_name) + # That's an array + else: + if internal_type: # Complex type, ignore itemsName and use the complex type name + items_name = _extract_name_from_internal_type(internal_type) + else: + items_name = xml_desc.get("itemsName", xml_name) + children = data.findall(items_name) + + if len(children) == 0: + if is_iter_type: + if is_wrapped: + return None # is_wrapped no node, we want None + else: + return [] # not wrapped, assume empty list + return None # Assume it's not there, maybe an optional node. + + # If is_iter_type and not wrapped, return all found children + if is_iter_type: + if not is_wrapped: + return children + else: # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name + ) + ) + return list(children[0]) # Might be empty list and that's ok. + + # Here it's not a itertype, we should have found one element only or empty + if len(children) > 1: + raise DeserializationError("Find several XML '{}' where it was not expected".format(xml_name)) + return children[0] + + +class Deserializer(object): + """Response object model deserializer. + + :param dict classes: Class type dictionary for deserializing complex types. + :ivar list key_extractors: Ordered list of extractors to be used by this deserializer. + """ + + basic_types = {str: "str", int: "int", bool: "bool", float: "float"} + + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + + def __init__(self, classes=None): + self.deserialize_type = { + "iso-8601": Deserializer.deserialize_iso, + "rfc-1123": Deserializer.deserialize_rfc, + "unix-time": Deserializer.deserialize_unix, + "duration": Deserializer.deserialize_duration, + "date": Deserializer.deserialize_date, + "time": Deserializer.deserialize_time, + "decimal": Deserializer.deserialize_decimal, + "long": Deserializer.deserialize_long, + "bytearray": Deserializer.deserialize_bytearray, + "base64": Deserializer.deserialize_base64, + "object": self.deserialize_object, + "[]": self.deserialize_iter, + "{}": self.deserialize_dict, + } + self.deserialize_expected_types = { + "duration": (isodate.Duration, datetime.timedelta), + "iso-8601": (datetime.datetime), + } + self.dependencies = dict(classes) if classes else {} + self.key_extractors = [rest_key_extractor, xml_key_extractor] + # Additional properties only works if the "rest_key_extractor" is used to + # extract the keys. Making it to work whatever the key extractor is too much + # complicated, with no real scenario for now. + # So adding a flag to disable additional properties detection. This flag should be + # used if your expect the deserialization to NOT come from a JSON REST syntax. + # Otherwise, result are unexpected + self.additional_properties_detection = True + + def __call__(self, target_obj, response_data, content_type=None): + """Call the deserializer to process a REST response. + + :param str target_obj: Target data type to deserialize to. + :param requests.Response response_data: REST response object. + :param str content_type: Swagger "produces" if available. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + data = self._unpack_content(response_data, content_type) + return self._deserialize(target_obj, data) + + def _deserialize(self, target_obj, data): + """Call the deserializer on a model. + + Data needs to be already deserialized as JSON or XML ElementTree + + :param str target_obj: Target data type to deserialize to. + :param object data: Object to deserialize. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + # This is already a model, go recursive just in case + if hasattr(data, "_attribute_map"): + constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] + try: + for attr, mapconfig in data._attribute_map.items(): + if attr in constants: + continue + value = getattr(data, attr) + if value is None: + continue + local_type = mapconfig["type"] + internal_data_type = local_type.strip("[]{}") + if internal_data_type not in self.dependencies or isinstance(internal_data_type, Enum): + continue + setattr(data, attr, self._deserialize(local_type, value)) + return data + except AttributeError: + return + + response, class_name = self._classify_target(target_obj, data) + + if isinstance(response, basestring): + return self.deserialize_data(data, response) + elif isinstance(response, type) and issubclass(response, Enum): + return self.deserialize_enum(data, response) + + if data is None: + return data + try: + attributes = response._attribute_map + d_attrs = {} + for attr, attr_desc in attributes.items(): + # Check empty string. If it's not empty, someone has a real "additionalProperties"... + if attr == "additional_properties" and attr_desc["key"] == "": + continue + raw_value = None + # Enhance attr_desc with some dynamic data + attr_desc = attr_desc.copy() # Do a copy, do not change the real one + internal_data_type = attr_desc["type"].strip("[]{}") + if internal_data_type in self.dependencies: + attr_desc["internalType"] = self.dependencies[internal_data_type] + + for key_extractor in self.key_extractors: + found_value = key_extractor(attr, attr_desc, data) + if found_value is not None: + if raw_value is not None and raw_value != found_value: + msg = ( + "Ignoring extracted value '%s' from %s for key '%s'" + " (duplicate extraction, follow extractors order)" + ) + _LOGGER.warning(msg, found_value, key_extractor, attr) + continue + raw_value = found_value + + value = self.deserialize_data(raw_value, attr_desc["type"]) + d_attrs[attr] = value + except (AttributeError, TypeError, KeyError) as err: + msg = "Unable to deserialize to object: " + class_name + raise_with_traceback(DeserializationError, msg, err) + else: + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) + + def _build_additional_properties(self, attribute_map, data): + if not self.additional_properties_detection: + return None + if "additional_properties" in attribute_map and attribute_map.get("additional_properties", {}).get("key") != "": + # Check empty string. If it's not empty, someone has a real "additionalProperties" + return None + if isinstance(data, ET.Element): + data = {el.tag: el.text for el in data} + + known_keys = { + _decode_attribute_map_key(_FLATTEN.split(desc["key"])[0]) + for desc in attribute_map.values() + if desc["key"] != "" + } + present_keys = set(data.keys()) + missing_keys = present_keys - known_keys + return {key: data[key] for key in missing_keys} + + def _classify_target(self, target, data): + """Check to see whether the deserialization target object can + be classified into a subclass. + Once classification has been determined, initialize object. + + :param str target: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + """ + if target is None: + return None, None + + if isinstance(target, basestring): + try: + target = self.dependencies[target] + except KeyError: + return target, target + + try: + target = target._classify(data, self.dependencies) + except AttributeError: + pass # Target is not a Model, no classify + return target, target.__class__.__name__ + + def failsafe_deserialize(self, target_obj, data, content_type=None): + """Ignores any errors encountered in deserialization, + and falls back to not deserializing the object. Recommended + for use in error deserialization, as we want to return the + HttpResponseError to users, and not have them deal with + a deserialization error. + + :param str target_obj: The target object type to deserialize to. + :param str/dict data: The response data to deseralize. + :param str content_type: Swagger "produces" if available. + """ + try: + return self(target_obj, data, content_type=content_type) + except: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + @staticmethod + def _unpack_content(raw_data, content_type=None): + """Extract the correct structure for deserialization. + + If raw_data is a PipelineResponse, try to extract the result of RawDeserializer. + if we can't, raise. Your Pipeline should have a RawDeserializer. + + If not a pipeline response and raw_data is bytes or string, use content-type + to decode it. If no content-type, try JSON. + + If raw_data is something else, bypass all logic and return it directly. + + :param raw_data: Data to be processed. + :param content_type: How to parse if raw_data is a string/bytes. + :raises JSONDecodeError: If JSON is requested and parsing is impossible. + :raises UnicodeDecodeError: If bytes is not UTF8 + """ + # Assume this is enough to detect a Pipeline Response without importing it + context = getattr(raw_data, "context", {}) + if context: + if RawDeserializer.CONTEXT_NAME in context: + return context[RawDeserializer.CONTEXT_NAME] + raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize") + + # Assume this is enough to recognize universal_http.ClientResponse without importing it + if hasattr(raw_data, "body"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text(), raw_data.headers) + + # Assume this enough to recognize requests.Response without importing it. + if hasattr(raw_data, "_content_consumed"): + return RawDeserializer.deserialize_from_http_generics(raw_data.text, raw_data.headers) + + if isinstance(raw_data, (basestring, bytes)) or hasattr(raw_data, "read"): + return RawDeserializer.deserialize_from_text(raw_data, content_type) + return raw_data + + def _instantiate_model(self, response, attrs, additional_properties=None): + """Instantiate a response model passing in deserialized args. + + :param response: The response model class. + :param d_attrs: The deserialized response attributes. + """ + if callable(response): + subtype = getattr(response, "_subtype_map", {}) + try: + readonly = [k for k, v in response._validation.items() if v.get("readonly")] + const = [k for k, v in response._validation.items() if v.get("constant")] + kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} + response_obj = response(**kwargs) + for attr in readonly: + setattr(response_obj, attr, attrs.get(attr)) + if additional_properties: + response_obj.additional_properties = additional_properties + return response_obj + except TypeError as err: + msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) + raise DeserializationError(msg + str(err)) + else: + try: + for attr, value in attrs.items(): + setattr(response, attr, value) + return response + except Exception as exp: + msg = "Unable to populate response model. " + msg += "Type: {}, Error: {}".format(type(response), exp) + raise DeserializationError(msg) + + def deserialize_data(self, data, data_type): + """Process data for deserialization according to data type. + + :param str data: The response string to be deserialized. + :param str data_type: The type to deserialize to. + :raises: DeserializationError if deserialization fails. + :return: Deserialized object. + """ + if data is None: + return data + + try: + if not data_type: + return data + if data_type in self.basic_types.values(): + return self.deserialize_basic(data, data_type) + if data_type in self.deserialize_type: + if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): + return data + + is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: + return None + data_val = self.deserialize_type[data_type](data) + return data_val + + iter_type = data_type[0] + data_type[-1] + if iter_type in self.deserialize_type: + return self.deserialize_type[iter_type](data, data_type[1:-1]) + + obj_type = self.dependencies[data_type] + if issubclass(obj_type, Enum): + if isinstance(data, ET.Element): + data = data.text + return self.deserialize_enum(data, obj_type) + + except (ValueError, TypeError, AttributeError) as err: + msg = "Unable to deserialize response data." + msg += " Data: {}, {}".format(data, data_type) + raise_with_traceback(DeserializationError, msg, err) + else: + return self._deserialize(obj_type, data) + + def deserialize_iter(self, attr, iter_type): + """Deserialize an iterable. + + :param list attr: Iterable to be deserialized. + :param str iter_type: The type of object in the iterable. + :rtype: list + """ + if attr is None: + return None + if isinstance(attr, ET.Element): # If I receive an element here, get the children + attr = list(attr) + if not isinstance(attr, (list, set)): + raise DeserializationError("Cannot deserialize as [{}] an object of type {}".format(iter_type, type(attr))) + return [self.deserialize_data(a, iter_type) for a in attr] + + def deserialize_dict(self, attr, dict_type): + """Deserialize a dictionary. + + :param dict/list attr: Dictionary to be deserialized. Also accepts + a list of key, value pairs. + :param str dict_type: The object type of the items in the dictionary. + :rtype: dict + """ + if isinstance(attr, list): + return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr} + + if isinstance(attr, ET.Element): + # Transform value into {"Key": "value"} + attr = {el.tag: el.text for el in attr} + return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} + + def deserialize_object(self, attr, **kwargs): + """Deserialize a generic object. + This will be handled as a dictionary. + + :param dict attr: Dictionary to be deserialized. + :rtype: dict + :raises: TypeError if non-builtin datatype encountered. + """ + if attr is None: + return None + if isinstance(attr, ET.Element): + # Do no recurse on XML, just return the tree as-is + return attr + if isinstance(attr, basestring): + return self.deserialize_basic(attr, "str") + obj_type = type(attr) + if obj_type in self.basic_types: + return self.deserialize_basic(attr, self.basic_types[obj_type]) + if obj_type is _long_type: + return self.deserialize_long(attr) + + if obj_type == dict: + deserialized = {} + for key, value in attr.items(): + try: + deserialized[key] = self.deserialize_object(value, **kwargs) + except ValueError: + deserialized[key] = None + return deserialized + + if obj_type == list: + deserialized = [] + for obj in attr: + try: + deserialized.append(self.deserialize_object(obj, **kwargs)) + except ValueError: + pass + return deserialized + + else: + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) + + def deserialize_basic(self, attr, data_type): + """Deserialize basic builtin data type from string. + Will attempt to convert to str, int, float and bool. + This function will also accept '1', '0', 'true' and 'false' as + valid bool values. + + :param str attr: response string to be deserialized. + :param str data_type: deserialization data type. + :rtype: str, int, float or bool + :raises: TypeError if string format is not valid. + """ + # If we're here, data is supposed to be a basic type. + # If it's still an XML node, take the text + if isinstance(attr, ET.Element): + attr = attr.text + if not attr: + if data_type == "str": + # None or '', node is empty string. + return "" + else: + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None + + if data_type == "bool": + if attr in [True, False, 1, 0]: + return bool(attr) + elif isinstance(attr, basestring): + if attr.lower() in ["true", "1"]: + return True + elif attr.lower() in ["false", "0"]: + return False + raise TypeError("Invalid boolean value: {}".format(attr)) + + if data_type == "str": + return self.deserialize_unicode(attr) + return eval(data_type)(attr) # nosec + + @staticmethod + def deserialize_unicode(data): + """Preserve unicode objects in Python 2, otherwise return data + as a string. + + :param str data: response string to be deserialized. + :rtype: str or unicode + """ + # We might be here because we have an enum modeled as string, + # and we try to deserialize a partial dict with enum inside + if isinstance(data, Enum): + return data + + # Consider this is real string + try: + if isinstance(data, unicode): + return data + except NameError: + return str(data) + else: + return str(data) + + @staticmethod + def deserialize_enum(data, enum_obj): + """Deserialize string into enum object. + + If the string is not a valid enum value it will be returned as-is + and a warning will be logged. + + :param str data: Response string to be deserialized. If this value is + None or invalid it will be returned as-is. + :param Enum enum_obj: Enum object to deserialize to. + :rtype: Enum + """ + if isinstance(data, enum_obj) or data is None: + return data + if isinstance(data, Enum): + data = data.value + if isinstance(data, int): + # Workaround. We might consider remove it in the future. + # https://github.com/Azure/azure-rest-api-specs/issues/141 + try: + return list(enum_obj.__members__.values())[data] + except IndexError: + error = "{!r} is not a valid index for enum {!r}" + raise DeserializationError(error.format(data, enum_obj)) + try: + return enum_obj(str(data)) + except ValueError: + for enum_value in enum_obj: + if enum_value.value.lower() == str(data).lower(): + return enum_value + # We don't fail anymore for unknown value, we deserialize as a string + _LOGGER.warning("Deserializer is not able to find %s as valid enum in %s", data, enum_obj) + return Deserializer.deserialize_unicode(data) + + @staticmethod + def deserialize_bytearray(attr): + """Deserialize string into bytearray. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return bytearray(b64decode(attr)) + + @staticmethod + def deserialize_base64(attr): + """Deserialize base64 encoded string into string. + + :param str attr: response string to be deserialized. + :rtype: bytearray + :raises: TypeError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + padding = "=" * (3 - (len(attr) + 3) % 4) + attr = attr + padding + encoded = attr.replace("-", "+").replace("_", "/") + return b64decode(encoded) + + @staticmethod + def deserialize_decimal(attr): + """Deserialize string into Decimal object. + + :param str attr: response string to be deserialized. + :rtype: Decimal + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + return decimal.Decimal(attr) + except decimal.DecimalException as err: + msg = "Invalid decimal {}".format(attr) + raise_with_traceback(DeserializationError, msg, err) + + @staticmethod + def deserialize_long(attr): + """Deserialize string into long (Py2) or int (Py3). + + :param str attr: response string to be deserialized. + :rtype: long or int + :raises: ValueError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + return _long_type(attr) + + @staticmethod + def deserialize_duration(attr): + """Deserialize ISO-8601 formatted string into TimeDelta object. + + :param str attr: response string to be deserialized. + :rtype: TimeDelta + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + duration = isodate.parse_duration(attr) + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize duration object." + raise_with_traceback(DeserializationError, msg, err) + else: + return duration + + @staticmethod + def deserialize_date(attr): + """Deserialize ISO-8601 formatted string into Date object. + + :param str attr: response string to be deserialized. + :rtype: Date + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + # This must NOT use defaultmonth/defaultday. Using None ensure this raises an exception. + return isodate.parse_date(attr, defaultmonth=None, defaultday=None) + + @staticmethod + def deserialize_time(attr): + """Deserialize ISO-8601 formatted string into time object. + + :param str attr: response string to be deserialized. + :rtype: datetime.time + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + if re.search(r"[^\W\d_]", attr, re.I + re.U): + raise DeserializationError("Date must have only digits and -. Received: %s" % attr) + return isodate.parse_time(attr) + + @staticmethod + def deserialize_rfc(attr): + """Deserialize RFC-1123 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + parsed_date = email.utils.parsedate_tz(attr) + date_obj = datetime.datetime( + *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + ) + if not date_obj.tzinfo: + date_obj = date_obj.astimezone(tz=TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to rfc datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_iso(attr): + """Deserialize ISO-8601 formatted string into Datetime object. + + :param str attr: response string to be deserialized. + :rtype: Datetime + :raises: DeserializationError if string format invalid. + """ + if isinstance(attr, ET.Element): + attr = attr.text + try: + attr = attr.upper() + match = Deserializer.valid_date.match(attr) + if not match: + raise ValueError("Invalid datetime string: " + attr) + + check_decimal = attr.split(".") + if len(check_decimal) > 1: + decimal_str = "" + for digit in check_decimal[1]: + if digit.isdigit(): + decimal_str += digit + else: + break + if len(decimal_str) > 6: + attr = attr.replace(decimal_str, decimal_str[0:6]) + + date_obj = isodate.parse_datetime(attr) + test_utc = date_obj.utctimetuple() + if test_utc.tm_year > 9999 or test_utc.tm_year < 1: + raise OverflowError("Hit max or min date") + except (ValueError, OverflowError, AttributeError) as err: + msg = "Cannot deserialize datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj + + @staticmethod + def deserialize_unix(attr): + """Serialize Datetime object into IntTime format. + This is represented as seconds. + + :param int attr: Object to be serialized. + :rtype: Datetime + :raises: DeserializationError if format invalid + """ + if isinstance(attr, ET.Element): + attr = int(attr.text) + try: + date_obj = datetime.datetime.fromtimestamp(attr, TZ_UTC) + except ValueError as err: + msg = "Cannot deserialize to unix datetime object." + raise_with_traceback(DeserializationError, msg, err) + else: + return date_obj diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_vendor.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_vendor.py new file mode 100644 index 000000000000..b7194a32adf2 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_vendor.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ConfidentialLedgerCertificateClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import PipelineClient + + from ._serialization import Deserializer, Serializer + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] + template = "/".join(components) + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "PipelineClient" + _config: ConfidentialLedgerCertificateClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_version.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_version.py similarity index 96% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_version.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_version.py index b88f651c36ac..c47f66669f1b 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/_version.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1" +VERSION = "1.0.0" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/__init__.py similarity index 56% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/__init__.py index 1b83f1d822b9..b0ac5248f088 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/__init__.py @@ -6,14 +6,16 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_client import ConfidentialLedgerClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['ConfidentialLedgerClient'] +from ._client import ConfidentialLedgerCertificateClient try: - from ._patch import patch_sdk # type: ignore - patch_sdk() + from ._patch import __all__ as _patch_all + from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import except ImportError: - pass + _patch_all = [] +from ._patch import patch_sdk as _patch_sdk + +__all__ = ["ConfidentialLedgerCertificateClient"] +__all__.extend([p for p in _patch_all if p not in __all__]) + +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_client.py new file mode 100644 index 000000000000..271c161d1d74 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_client.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest + +from .._serialization import Deserializer, Serializer +from ._configuration import ConfidentialLedgerCertificateClientConfiguration +from ._operations import ConfidentialLedgerCertificateClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + +class ConfidentialLedgerCertificateClient( + ConfidentialLedgerCertificateClientOperationsMixin +): # pylint: disable=client-accepts-api-version-keyword + """The ConfidentialLedgerCertificateClient is used to retrieve the TLS certificate required for + connecting to a Confidential Ledger. + + :param certificate_endpoint: The certificate endpoint (or "Identity Service Endpoint" in the + Azure portal), for example https://identity.confidential-ledger.core.azure.com. Required. + :type certificate_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, certificate_endpoint: str, **kwargs: Any + ) -> None: + _endpoint = "{certificateEndpoint}" + self._config = ConfidentialLedgerCertificateClientConfiguration( + certificate_endpoint=certificate_endpoint, **kwargs + ) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + def send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "certificateEndpoint": self._serialize.url( + "self._config.certificate_endpoint", self._config.certificate_endpoint, "str", skip_quote=True + ), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ConfidentialLedgerCertificateClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_configuration.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_configuration.py new file mode 100644 index 000000000000..5447e6063ba9 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_configuration.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + + +class ConfidentialLedgerCertificateClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes + """Configuration for ConfidentialLedgerCertificateClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param certificate_endpoint: The certificate endpoint (or "Identity Service Endpoint" in the + Azure portal), for example https://identity.confidential-ledger.core.azure.com. Required. + :type certificate_endpoint: str + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__(self, certificate_endpoint: str, **kwargs: Any) -> None: + super(ConfidentialLedgerCertificateClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop("api_version", "2022-05-13") # type: str + + if certificate_endpoint is None: + raise ValueError("Parameter 'certificate_endpoint' must not be None.") + + self.certificate_endpoint = certificate_endpoint + self.api_version = api_version + kwargs.setdefault("sdk_moniker", "confidentialledger-certificate/{}".format(VERSION)) + self._configure(**kwargs) + + def _configure(self, **kwargs: Any) -> None: + self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get("authentication_policy") diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/__init__.py similarity index 56% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/__init__.py rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/__init__.py index 8afa2547b234..d52f4bc0bbb3 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_ledger/v0_1_preview/operations/__init__.py +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/__init__.py @@ -6,8 +6,14 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._confidential_ledger_operations import ConfidentialLedgerOperations +from ._operations import ConfidentialLedgerCertificateClientOperationsMixin + +from ._patch import __all__ as _patch_all +from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import +from ._patch import patch_sdk as _patch_sdk __all__ = [ - 'ConfidentialLedgerOperations', + "ConfidentialLedgerCertificateClientOperationsMixin", ] +__all__.extend([p for p in _patch_all if p not in __all__]) +_patch_sdk() diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_operations.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_operations.py new file mode 100644 index 000000000000..16464589b435 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_operations.py @@ -0,0 +1,98 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import sys +from typing import Any, Callable, Dict, Optional, TypeVar, cast + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._operations._operations import build_get_ledger_identity_request +from .._vendor import MixinABC + +if sys.version_info >= (3, 9): + from collections.abc import MutableMapping +else: + from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports +JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ConfidentialLedgerCertificateClientOperationsMixin(MixinABC): + @distributed_trace_async + async def get_ledger_identity(self, ledger_id: str, **kwargs: Any) -> JSON: + """Gets identity information for a Confidential Ledger instance. + + Gets identity information for a Confidential Ledger instance. + + :param ledger_id: Id of the Confidential Ledger instance to get information for. Required. + :type ledger_id: str + :return: JSON object + :rtype: JSON + :raises ~azure.core.exceptions.HttpResponseError: + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response == { + "ledgerId": "str", # Optional. Id for the ledger. + "ledgerTlsCertificate": "str" # PEM-encoded certificate used for TLS by the + Confidential Ledger. Required. + } + """ + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls = kwargs.pop("cls", None) # type: ClsType[JSON] + + request = build_get_ledger_identity_request( + ledger_id=ledger_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "certificateEndpoint": self._serialize.url( + "self._config.certificate_endpoint", self._config.certificate_endpoint, "str", skip_quote=True + ), + } + request.url = self._client.format_url(request.url, **path_format_arguments) # type: ignore + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, cast(JSON, deserialized), {}) + + return cast(JSON, deserialized) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_patch.py new file mode 100644 index 000000000000..f7dd32510333 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_operations/_patch.py @@ -0,0 +1,20 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_patch.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_patch.py new file mode 100644 index 000000000000..6cd04af07e86 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_patch.py @@ -0,0 +1,46 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import Any, List, Optional + +from azure.confidentialledger.certificate.aio._client import ( + ConfidentialLedgerCertificateClient as GeneratedClient, +) + +__all__: List[str] = [ + "ConfidentialLedgerCertificateClient" +] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ + + +class ConfidentialLedgerCertificateClient(GeneratedClient): + def __init__( # pylint: disable=missing-client-constructor-parameter-credential + self, certificate_endpoint: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :param certificate_endpoint: The Identity Service URL, for example + https://identity.confidential-ledger.core.azure.com, defaults to None. If not provided, + "https://identity.confidential-ledger.core.azure.com" will be used. + :type certificate_endpoint: Optional[str], optional + :keyword api_version: Api Version. Default value is "2022-05-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + if not certificate_endpoint: + certificate_endpoint = "https://identity.confidential-ledger.core.azure.com" + + super().__init__(certificate_endpoint, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_vendor.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_vendor.py new file mode 100644 index 000000000000..32fc1057e7db --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/aio/_vendor.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from abc import ABC +from typing import TYPE_CHECKING + +from ._configuration import ConfidentialLedgerCertificateClientConfiguration + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core import AsyncPipelineClient + + from .._serialization import Deserializer, Serializer + + +class MixinABC(ABC): + """DO NOT use this class. It is for internal typing use only.""" + + _client: "AsyncPipelineClient" + _config: ConfidentialLedgerCertificateClientConfiguration + _serialize: "Serializer" + _deserialize: "Deserializer" diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/py.typed b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/py.typed similarity index 100% rename from sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/_generated/_generated_identity/v0_1_preview/py.typed rename to sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/certificate/py.typed diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/__init__.py deleted file mode 100644 index b81a12158ac5..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -# pylint: disable=unused-import - - -from ._client import ConfidentialLedgerIdentityServiceClient -from ._models import LedgerIdentity - -__all__ = [ - "ConfidentialLedgerIdentityServiceClient", - # Models - "LedgerIdentity", -] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_client.py deleted file mode 100644 index 5ae9e2dd4e51..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_client.py +++ /dev/null @@ -1,111 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from azure.core.pipeline.policies import HttpLoggingPolicy -from azure.core.pipeline.transport import RequestsTransport -from azure.core.tracing.decorator import distributed_trace - -from ._models import LedgerIdentity - -from .._generated._generated_identity.v0_1_preview import ( - ConfidentialLedgerIdentityServiceClient as _ConfidentialLedgerIdentityServiceClient, -) -from .._shared import DEFAULT_VERSION -from .._user_agent import USER_AGENT - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - # pylint:disable=unused-import - from typing import Any - - -class ConfidentialLedgerIdentityServiceClient(object): # pylint: disable=client-accepts-api-version-keyword - """Client for communicating with the Confidential Ledger Identity Service, - which is used for retrieving identity information about a particular Confidential - Ledger instance. - - :param identity_service_url: Base URL for the Identity Service. - :type identity_service_url: str - :param credential: Credential for connecting to the service. May be None, because no credential - is currently required. - :type credential: ~azure.core.credentials.TokenCredential - """ - - def __init__(self, identity_service_url, **kwargs): # pylint: disable=missing-client-constructor-parameter-credential - # type: (str, Any) -> None - client = kwargs.get("generated_client") - if client: - # caller provided a configured client -> nothing left to initialize - self._client = client - return - - try: - identity_service_url = identity_service_url.strip(" /") - if not identity_service_url.lower().startswith("https://"): - self._identity_service_url = "https://" + identity_service_url - else: - self._identity_service_url = identity_service_url - except AttributeError: - raise ValueError("Identity Service URL must be a string.") - - self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) - - pipeline = kwargs.pop("pipeline", None) - transport = kwargs.pop("transport", RequestsTransport(**kwargs)) - http_logging_policy = HttpLoggingPolicy(**kwargs) - http_logging_policy.allowed_header_names.update( - { - "x-ms-keyvault-network-info", - "x-ms-keyvault-region", - "x-ms-keyvault-service-version", - } - ) - - authentication_policy = None - - self._client = _ConfidentialLedgerIdentityServiceClient( - self._identity_service_url, - api_version=self.api_version, - pipeline=pipeline, - transport=transport, - authentication_policy=authentication_policy, - http_logging_policy=http_logging_policy, - sdk_moniker=USER_AGENT, - **kwargs - ) - - @property - def identity_service_url(self): - # type: () -> str - """The URL this client is connected to.""" - return self._identity_service_url - - @distributed_trace - def get_ledger_identity(self, ledger_id, **kwargs): - # type: (str, Any) -> LedgerIdentity - """Gets the network information for a Confidential Ledger instance. - - :param ledger_id: Id for the Confidential Ledger instance to get information for. - :type ledger_id: str - :return: The ledger identity. - :rtype: ~azure.confidentialledger.LedgerIdentity - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if not ledger_id: - raise ValueError("ledger_id must be a non-empty string") - - result = self._client.confidential_ledger_identity_service.get_ledger_identity( - ledger_id=ledger_id, - **kwargs - ) - return LedgerIdentity( - ledger_id=result.ledger_id, - ledger_tls_certificate=result.ledger_tls_certificate, - ) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_models.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_models.py deleted file mode 100644 index 9a8f0e03daa2..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/_models.py +++ /dev/null @@ -1,40 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - # pylint:disable=unused-import - pass - - -class LedgerIdentity(object): - """Contains identification information about a Confidential Ledger. - - :param ledger_id: The id of the Confidential Ledger this object identifies. - :type ledger_id: str - :param ledger_tls_certificate: PEM-encoded certificate used for TLS by the Confidential Ledger. - :type ledger_tls_certificate: str - """ - - def __init__(self, ledger_id, ledger_tls_certificate): - self._ledger_id = ledger_id - self._ledger_tls_certificate = ledger_tls_certificate.strip("\n\u0000") - - @property - def ledger_id(self): - # type: () -> str - """ "The id for this Confidential Ledger.""" - return self._ledger_id - - @property - def ledger_tls_certificate(self): - # type: () -> str - """The certificate used for TLS by this network.""" - return self._ledger_tls_certificate diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/__init__.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/__init__.py deleted file mode 100644 index d8afd6745f15..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -# pylint: disable=unused-import - - -from ._client import ConfidentialLedgerIdentityServiceClient - -__all__ = [ - "ConfidentialLedgerIdentityServiceClient", -] diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/_client.py b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/_client.py deleted file mode 100644 index 87800f2b4d54..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/identity_service/aio/_client.py +++ /dev/null @@ -1,126 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ - -from typing import Any - -from azure.core.pipeline.policies import HttpLoggingPolicy -from azure.core.pipeline.transport import AsyncioRequestsTransport -from azure.core.tracing.decorator_async import distributed_trace_async - -from .. import LedgerIdentity -from ..._generated._generated_identity.v0_1_preview.aio import ( - ConfidentialLedgerIdentityServiceClient as _ConfidentialLedgerIdentityServiceClient, -) -from ..._shared import DEFAULT_VERSION -from ..._user_agent import USER_AGENT - -try: - from typing import TYPE_CHECKING -except ImportError: - TYPE_CHECKING = False - -if TYPE_CHECKING: - # pylint:disable=unused-import - pass - - -class ConfidentialLedgerIdentityServiceClient(object): # pylint: disable=client-accepts-api-version-keyword - """Client for communicating with the Confidential Ledger Identity Service, - which is used for retrieving identity information about a particular Confidential - Ledger instance. - - :param identity_service_url: Base URL for the Identity Service. - :type identity_service_url: str - :param credential: Credential for connecting to the service. May be None, because no credential - is currently required. - :type credential: ~azure.core.credentials.TokenCredential - """ - - def __init__(self, identity_service_url: str, **kwargs: Any) -> None: # pylint: disable=missing-client-constructor-parameter-credential - client = kwargs.get("generated_client") - if client: - # caller provided a configured client -> nothing left to initialize - self._client = client - return - - try: - identity_service_url = identity_service_url.strip(" /") - if not identity_service_url.lower().startswith("https://"): - self._identity_service_url = "https://" + identity_service_url - else: - self._identity_service_url = identity_service_url - except AttributeError: - raise ValueError("Identity Service URL must be a string.") - - self.api_version = kwargs.pop("api_version", DEFAULT_VERSION) - - pipeline = kwargs.pop("pipeline", None) - transport = kwargs.pop("transport", AsyncioRequestsTransport(**kwargs)) - http_logging_policy = HttpLoggingPolicy(**kwargs) - http_logging_policy.allowed_header_names.update( - { - "x-ms-keyvault-network-info", - "x-ms-keyvault-region", - "x-ms-keyvault-service-version", - } - ) - - authentication_policy = None - - self._client = _ConfidentialLedgerIdentityServiceClient( - self._identity_service_url, - api_version=self.api_version, - pipeline=pipeline, - transport=transport, - authentication_policy=authentication_policy, - http_logging_policy=http_logging_policy, - sdk_moniker=USER_AGENT, - **kwargs - ) - - @property - def identity_service_url(self): - # type: () -> str - """The URL this client is connected to.""" - return self._identity_service_url - - async def __aenter__(self) -> "ConfidentialLedgerIdentityServiceClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *args: Any) -> None: - await self._client.__aexit__(*args) - - async def close(self) -> None: - """Close sockets opened by the client. - - Calling this method is unnecessary when using the client as a context manager. - """ - await self._client.close() - - @distributed_trace_async - async def get_ledger_identity( - self, ledger_id: str, **kwargs: Any - ) -> LedgerIdentity: - """Gets the network information for a Confidential Ledger instance. - - :param ledger_id: Id for the Confidential Ledger instance to get information for. - :type ledger_id: str - :return: The ledger identity. - :rtype: ~azure.confidentialledger.LedgerIdentity - :raises: ~azure.core.exceptions.HttpResponseError - """ - - if not ledger_id: - raise ValueError("ledger_id must be a non-empty string") - - result = await self._client.confidential_ledger_identity_service.get_ledger_identity( - ledger_id=ledger_id, - **kwargs - ) - return LedgerIdentity( - ledger_id=result.ledger_id, - ledger_tls_certificate=result.ledger_tls_certificate, - ) diff --git a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/py.typed b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/py.typed index e69de29bb2d1..e5aff4f83af8 100644 --- a/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/py.typed +++ b/sdk/confidentialledger/azure-confidentialledger/azure/confidentialledger/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/confidentialledger/azure-confidentialledger/dev_requirements.txt b/sdk/confidentialledger/azure-confidentialledger/dev_requirements.txt index 269c61b9ffb0..984030d9fac2 100644 --- a/sdk/confidentialledger/azure-confidentialledger/dev_requirements.txt +++ b/sdk/confidentialledger/azure-confidentialledger/dev_requirements.txt @@ -1,4 +1,5 @@ -e ../../../tools/azure-sdk-tools ../../core/azure-core -e ../../../tools/azure-devtools -aiohttp>=3.0 \ No newline at end of file +../../identity/azure-identity +aiohttp \ No newline at end of file diff --git a/sdk/confidentialledger/azure-confidentialledger/pytest.ini b/sdk/confidentialledger/azure-confidentialledger/pytest.ini new file mode 100644 index 000000000000..2f4c80e30750 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +asyncio_mode = auto diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/README.md b/sdk/confidentialledger/azure-confidentialledger/samples/README.md new file mode 100644 index 000000000000..b8b691e51897 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/README.md @@ -0,0 +1,46 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-confidentialledger +urlFragment: azure-confidentialledger-samples +--- + +# Azure Confidential Ledger service client library for Python Samples + +These are code samples that show common scenario operations with the Azure Confidential Ledger client library. +The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations. + +## Prerequisites + +* Python 3.6 or later is required to use this package +* You need an [Azure subscription][azure_sub], and a [Azure Confidential Ledger service instance][confidential_ledger_docs] to use this package. + +## Setup + +1. Install the Azure Confidential Ledger service client library for Python with [pip](https://pypi.org/project/pip/): + +```bash +pip install azure-confidentialledger +``` + +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file. + +## Next Steps + +Take a look at our [API Documentation][reference_docs] for more information about the APIs that are available in the clients. + + + +[azure_sub]: https://azure.microsoft.com/free/ +[confidential_ledger_docs]: https://aka.ms/confidentialledger-servicedocs +[reference_docs]: https://aka.ms/azsdk/python/confidentialledger/ref-docs \ No newline at end of file diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py new file mode 100644 index 000000000000..a0887ef932f2 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt.py @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: get_receipt.py +DESCRIPTION: + This sample demonstrates how to retrieve Confidential Ledger receipts. In this sample, we write + a ledger entry and retrieve a receipt certifying that it was written correctly. +USAGE: + python get_receipt.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import logging +import os +import sys +import tempfile + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.core.exceptions import HttpResponseError +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + # Write a ledger entry. + try: + entry_contents = "Hello world!" + post_poller = ledger_client.begin_create_ledger_entry( + {"contents": entry_contents} + ) + post_entry_result = post_poller.result() + transaction_id = post_entry_result["transactionId"] + print(f"Wrote '{entry_contents}' to the ledger at transaction {transaction_id}.") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get a receipt for a ledger entry. + # A receipt can be retrieved for any transaction id to provide cryptographic proof of the + # contents of the transaction. + try: + print( + f"Retrieving a receipt for {transaction_id}. The receipt may be used to " + "cryptographically verify the contents of the transaction." + ) + print( + "For more information about receipts, please see " + "https://microsoft.github.io/CCF/main/audit/receipts.html#receipts" + ) + get_receipt_poller = ledger_client.begin_get_receipt(transaction_id) + get_receipt_result = get_receipt_poller.result() + print( + f'Receipt for transaction id {transaction_id}: {get_receipt_result}' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py new file mode 100644 index 000000000000..e8aa542e7ace --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/get_receipt_async.py @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: get_receipt_async.py +DESCRIPTION: + This sample demonstrates how to retrieve Confidential Ledger receipts. In this sample, we write + a ledger entry and retrieve a receipt certifying that it was written correctly. +USAGE: + python get_receipt_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.core.exceptions import HttpResponseError +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + # Write a ledger entry. + try: + entry_contents = "Hello world!" + post_poller = await ledger_client.begin_create_ledger_entry( + {"contents": entry_contents} + ) + post_entry_result = await post_poller.result() + transaction_id = post_entry_result["transactionId"] + print(f"Wrote '{entry_contents}' to the ledger at transaction {transaction_id}.") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get a receipt for a ledger entry. + # A receipt can be retrieved for any transaction id to provide cryptographic proof + # of the contents of the transaction. + try: + print( + f"Retrieving a receipt for {transaction_id}. The receipt may be used to " + "cryptographically verify the contents of the transaction." + ) + print( + "For more information about receipts, please see " + "https://microsoft.github.io/CCF/main/audit/receipts.html#receipts" + ) + get_receipt_poller = await ledger_client.begin_get_receipt(transaction_id) + get_receipt_result = await get_receipt_poller.result() + print( + f'Receipt for transaction id {transaction_id}: {get_receipt_result}' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py new file mode 100644 index 000000000000..164888332a2a --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries.py @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: list_ledger_entries.py +DESCRIPTION: + This sample demonstrates how to iteratively retrieve a batch of ledger entries. In this sample, + we write many ledger entries before retrieving them at once. +USAGE: + python list_ledger_entries.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import logging +import os +import sys +import tempfile + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + post_poller = ledger_client.begin_create_ledger_entry({"contents": "First message"}) + first_transaction_id = post_poller.result()["transactionId"] + + print( + "Wrote 'First message' to the ledger. It is recorded at transaction id " + f"{first_transaction_id}." + ) + + for i in range(10): + entry_contents = f"Message {i}" + print( + f"Writing '{entry_contents}' to the ledger." + ) + + ledger_client.create_ledger_entry({"contents": entry_contents}) + + post_poller = ledger_client.begin_create_ledger_entry({"contents": "Last message"}) + last_transaction_id = post_poller.result()["transactionId"] + + print( + "Wrote 'Last message' to the ledger. It is recorded at transaction id " + f"{last_transaction_id}." + ) + + ranged_result = ledger_client.list_ledger_entries( + from_transaction_id=first_transaction_id, + to_transaction_id=last_transaction_id, + ) + for entry in ranged_result: + print(f'Contents at {entry["transactionId"]}: {entry["contents"]}') + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py new file mode 100644 index 000000000000..6cd711a6ae7a --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/list_ledger_entries_async.py @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: list_ledger_entries_async.py +DESCRIPTION: + This sample demonstrates how to iteratively retrieve a batch of ledger entries. In this sample, + we write many ledger entries before retrieving them at once. +USAGE: + python list_ledger_entries_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + post_poller = await ledger_client.begin_create_ledger_entry( + {"contents": "First message"} + ) + poller_result = await post_poller.result() + first_transaction_id = poller_result["transactionId"] + + print( + "Wrote 'First message' to the ledger. It is recorded at transaction id " + f"{first_transaction_id}." + ) + + for i in range(10): + entry_contents = f"Message {i}" + print( + f"Writing '{entry_contents}' to the ledger." + ) + await ledger_client.create_ledger_entry({"contents": entry_contents}) + + post_poller = await ledger_client.begin_create_ledger_entry( + {"contents": "Last message"} + ) + poller_result = await post_poller.result() + last_transaction_id = poller_result["transactionId"] + + print( + "Wrote 'Last message' to the ledger. It is recorded at transaction id " + f"{last_transaction_id}." + ) + + ranged_result = ledger_client.list_ledger_entries( + from_transaction_id=first_transaction_id, + to_transaction_id=last_transaction_id, + ) + async for entry in ranged_result: + print(f'Contents at {entry["transactionId"]}: {entry["contents"]}') + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py new file mode 100644 index 000000000000..c9e32ad6546b --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users.py @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: manage_users.py +DESCRIPTION: + This sample demonstrates how to manage users using Confidential Ledger's native role-based + access control. In this sample, we add two test users - one using a random AAD-object-id-like + identifier, and one using the thumbprint of a test certificate. +USAGE: + python manage_users.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import logging +import os +import sys +import tempfile +import time + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Example values identifying users. + # This is an example thumbprint for certificate identifying a certificate-based user. + cert_thumbprint = "4F:E1:61:D8:6E:5A:7B:E6:00:25:A6:D8:5D:EC:2C:71:E5:86:C3:E4:70:BE:D0:3C:73:7E:69:00:87:98:B0:25" + # This is an example AAD object id identifying an AAD-based user. + aad_object_id = "0" * 36 # AAD Object Ids have length 36 + + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + try: + role = "Reader" + ledger_client.create_or_update_user(aad_object_id, {"assignedRole": role}) + print(f"User {aad_object_id} has been added as a {role}") + + role = "Contributor" + ledger_client.create_or_update_user(cert_thumbprint, {"assignedRole": role}) + print(f"User {cert_thumbprint} has been added as a {role}") + + print( + "Sleeping 3 seconds before getting user details. Due to replication lag, " + "it may not immediately be available." + ) + time.sleep(3) + + aad_user_details = ledger_client.get_user(aad_object_id) + print(f"Details about user {aad_object_id}: {aad_user_details}") + + cert_user_details = ledger_client.get_user(cert_thumbprint) + print(f"Details about user {cert_thumbprint}: {cert_user_details}") + + # Always delete the user in case an exception is raised. + finally: + try: + ledger_client.delete_user(aad_object_id) + print(f"User {aad_object_id} deleted") + finally: + ledger_client.delete_user(cert_thumbprint) + print(f"User {cert_thumbprint} deleted") + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py new file mode 100644 index 000000000000..80277195dbe8 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/manage_users_async.py @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: manage_users_async.py +DESCRIPTION: + This sample demonstrates how to manage users using Confidential Ledger's native role-based + access control. In this sample, we add two test users - one using a random AAD-object-id-like + identifier, and one using the thumbprint of a test certificate. +USAGE: + python manage_users_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Example values identifying users. + # This is an example thumbprint for certificate identifying a certificate-based user. + cert_thumbprint = "4F:E1:61:D8:6E:5A:7B:E6:00:25:A6:D8:5D:EC:2C:71:E5:86:C3:E4:70:BE:D0:3C:73:7E:69:00:87:98:B0:25" + # This is an example AAD object id identifying an AAD-based user. + aad_object_id = "0" * 36 # AAD Object Ids have length 36 + + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + try: + role = "Reader" + await ledger_client.create_or_update_user( + aad_object_id, {"assignedRole": role} + ) + print(f"User {aad_object_id} has been added as a {role}") + + role = "Contributor" + await ledger_client.create_or_update_user( + cert_thumbprint, {"assignedRole": role} + ) + print(f"User {cert_thumbprint} has been added as a {role}") + + print( + "Sleeping 3 seconds before getting user details. Due to replication lag, " + "it may not immediately be available." + ) + await asyncio.sleep(3) + + aad_user_details = await ledger_client.get_user(aad_object_id) + print(f"Details about user {aad_object_id}: {aad_user_details}") + + cert_user_details = await ledger_client.get_user(cert_thumbprint) + print(f"Details about user {cert_thumbprint}: {cert_user_details}") + + # Always delete the user in case an exception is raised. + finally: + try: + await ledger_client.delete_user(aad_object_id) + print(f"User {aad_object_id} deleted") + finally: + await ledger_client.delete_user(cert_thumbprint) + print(f"User {cert_thumbprint} deleted") + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py new file mode 100644 index 000000000000..3a92a8c852b9 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections.py @@ -0,0 +1,166 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: use_collections.py +DESCRIPTION: + This sample demonstrates how to use collections in Confidential Ledger. In this sample, we write + ledger entries to different collections. Collections may be used to group semantically or + logically related ledger entries. +USAGE: + python use_collections.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import logging +import os +import sys +import tempfile + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + print("This Confidential Ledger will contain messages from different senders.") + print( + "We will group ledger entries by the sender of the message. For all client methods " + "that take an optional 'collection_id' parameter, if none is provided, a " + "service-assigned, default collection id will be assigned." + ) + + tids = {} + senders = [None, "Alice", "Bob"] + for msg_idx in range(3): + for sender in senders: + if sender is None: + msg = f"My message {msg_idx}" + else: + msg = f"{sender}'s message {msg_idx}" + + post_poller = ledger_client.begin_create_ledger_entry( + entry={"contents": msg}, collection_id=sender, + ) + post_result = post_poller.result() + + if sender is None: + print( + f"Wrote '{msg}' to the default collection at {post_result['transactionId']}" + ) + else: + print(f"Wrote '{msg}' to collection {sender} at {post_result['transactionId']}") + + if sender not in tids: + tids[sender] = {} + tids[sender]["first"] = post_result["transactionId"] + + tids[sender]["last"] = post_result["transactionId"] + + print("Let's retrieve the latest entry in each collection") + for sender in senders: + current_entry = ledger_client.get_current_ledger_entry() + + output = "Current entry in {0} is {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s collection", + current_entry["contents"], + ) + ) + + print("Let's retrieve the first entry in each collection") + for sender in senders: + get_poller = ledger_client.begin_get_ledger_entry( + tids[sender]["first"], + collection_id=sender + ) + first_entry = get_poller.result() + + output = "First entry in {0} is {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s collection", + first_entry["entry"]["contents"], + ) + ) + + print("Let's retrieve get all the entries in each collection") + for sender in senders: + entries_list = ledger_client.list_ledger_entries( + collection_id=sender, + from_transaction_id=tids[sender]["first"], + to_transaction_id=tids[sender]["last"], + ) + + for entry in entries_list: + output = "Entry in {0}: {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s collection", + entry, + ) + ) + + collection_ids = [] + collections = ledger_client.list_collections() + for collection in collections: + collection_ids.append(collection["collectionId"]) + + print( + "In conclusion, these are all the collections in the Confidential Ledger:\n" + + "\n\t".join(collection_ids) + ) + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py new file mode 100644 index 000000000000..203edf06029a --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/use_collections_async.py @@ -0,0 +1,180 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: use_collections_async.py +DESCRIPTION: + This sample demonstrates how to use collections in Confidential Ledger. In this sample, we write + ledger entries to different collections. Collections may be used to group semantically or + logically related ledger entries. +USAGE: + python use_collections_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + print("This Confidential Ledger will contain messages from different senders.") + print( + "We will group ledger entries by the sender of the message. For all client " + "methods that take an optional 'collection_id' parameter, if none is provided, " + "a service-assigned, default collection id will be assigned." + ) + + tids = {} + senders = [None, "Alice", "Bob"] + for msg_idx in range(3): + for sender in senders: + if sender is None: + msg = f"My message {msg_idx}" + else: + msg = f"{sender}'s message {msg_idx}" + + post_poller = await ledger_client.begin_create_ledger_entry( + entry={"contents": msg}, collection_id=sender, + ) + post_result = await post_poller.result() + + if sender is None: + print( + f"Wrote '{msg}' to the default collection at " + f"{post_result['transactionId']}" + ) + else: + print( + f"Wrote '{msg}' to collection {sender} at " + f"{post_result['transactionId']}" + ) + + if sender not in tids: + tids[sender] = {} + tids[sender]["first"] = post_result["transactionId"] + + tids[sender]["last"] = post_result["transactionId"] + + print("Let's retrieve the latest entry in each collection") + for sender in senders: + current_entry = await ledger_client.get_current_ledger_entry() + + output = "Current entry in {0} is {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s collection", + current_entry["contents"], + ) + ) + + print("Let's retrieve the first entry in each collection") + for sender in senders: + get_poller = await ledger_client.begin_get_ledger_entry( + tids[sender]["first"], + collection_id=sender + ) + first_entry = await get_poller.result() + + output = "First entry in {0} is {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s collection", + first_entry["entry"]["contents"], + ) + ) + + print("Let's retrieve get all the entries in each collection") + for sender in senders: + entries_list = ledger_client.list_ledger_entries( + collection_id=sender, + from_transaction_id=tids[sender]["first"], + to_transaction_id=tids[sender]["last"], + ) + + async for entry in entries_list: + output = "Entry in {0}: {1}" + print( + output.format( + "default collection" if sender is None else f"{sender}'s " + "collection", + entry, + ) + ) + + collection_ids = [] + collections = ledger_client.list_collections() + async for collection in collections: + collection_ids.append(collection["collectionId"]) + + print( + "In conclusion, these are all the collections in the Confidential Ledger:\n" + + "\n\t".join(collection_ids) + ) + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py new file mode 100644 index 000000000000..05994774f0a6 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service.py @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: verify_service.py +DESCRIPTION: + This sample demonstrates methods that may be used to check conditions about the Confidential + Ledger service. This sample will print the results of verification methods. +USAGE: + python verify_service.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import hashlib +import logging +import os +import sys +import tempfile + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + print("Retrieving information that can be used to validate a Confidential Ledger.") + + print( + "Consortium members can manage and alter the " + "Confidential Ledger. Microsoft participates in the consortium to maintain the " + "Confidential Ledger instance." + ) + consortium = ledger_client.list_consortium_members() + for member in consortium: + print( + f'\tMember {member["id"]} has certificate (truncated) ' + f'{member["certificate"][:24]}...' + ) + + print( + "The constitution is a collection of JavaScript code that defines actions available to " + "members and vets proposals by members to execute those actions." + ) + + constitution = ledger_client.get_constitution() + assert ( + constitution["digest"].lower() == + hashlib.sha256(constitution["script"].encode()).hexdigest().lower() + ) + print(f'\tConstitution (truncated): {constitution["script"][:24]}...') + print(f'\tConstitution digest: {constitution["digest"]}') + + print( + "Enclave quotes contain material that can be used to cryptographically verify the " + "validity and contents of an enclave." + ) + ledger_enclaves = ledger_client.get_enclave_quotes() + for node_id, quote in ledger_enclaves["enclaveQuotes"].items(): + print( + f"\tMRENCLAVE for node {node_id}: {quote['mrenclave']}" + ) + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py new file mode 100644 index 000000000000..4eaa88fbc3f4 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/verify_service_async.py @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: verify_service_async.py +DESCRIPTION: + This sample demonstrates methods that may be used to check conditions about the Confidential + Ledger service. This sample will print the results of verification methods. +USAGE: + python verify_service_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import hashlib +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + print("Retrieving information that can be used to validate a Confidential Ledger.") + print( + "Consortium members can manage and alter the " + "Confidential Ledger. Microsoft participates in the consortium to maintain the " + "Confidential Ledger instance." + ) + consortium = ledger_client.list_consortium_members() + async for member in consortium: + print( + f'\tMember {member["id"]} has certificate (truncated) ' + f'{member["certificate"][:24]}...' + ) + + print( + "The constitution is a collection of JavaScript code that defines actions " + "available to members and vets proposals by members to execute those actions." + ) + + constitution = await ledger_client.get_constitution() + assert ( + constitution["digest"].lower() == + hashlib.sha256(constitution["script"].encode()).hexdigest().lower() + ) + print(f'\tConstitution (truncated): {constitution["script"][:24]}...') + print(f'\tConstitution digest: {constitution["digest"]}') + + print( + "Enclave quotes contain material that can be used to cryptographically verify " + "the validity and contents of an enclave." + ) + ledger_enclaves = await ledger_client.get_enclave_quotes() + for node_id, quote in ledger_enclaves["enclaveQuotes"].items(): + print( + f"\tMRENCLAVE for node {node_id}: {quote['mrenclave']}" + ) + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py new file mode 100644 index 000000000000..37a43ed5a5b8 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger.py @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: write_to_ledger.py +DESCRIPTION: + This sample demonstrates how to write to a Confidential Ledger. In this sample, we write some + ledger entries and perform common retrieval operations. +USAGE: + python write_to_ledger.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import logging +import os +import sys +import tempfile + +from azure.confidentialledger import ConfidentialLedgerClient +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) +from azure.core.exceptions import HttpResponseError +from azure.identity import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + ledger_certificate = identity_service_client.get_ledger_identity(ledger_id) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=DefaultAzureCredential(), + ledger_certificate_path=ledger_cert_file, + ) + + # Write a ledger entry. + try: + post_entry_result = ledger_client.create_ledger_entry( + {"contents": "Hello world!"} + ) + transaction_id = post_entry_result["transactionId"] + print( + f"Successfully sent a ledger entry to be written. It will become durable at " + f"transaction id {transaction_id}" + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # For some scenarios, users may want to eventually ensure the written entry is durably + # committed. + try: + print( + f"Waiting for {transaction_id} to become durable. This may be skipped for when " + "writing less important entries where client throughput is prioritized." + ) + wait_poller = ledger_client.begin_wait_for_commit(transaction_id) + wait_poller.wait() + print( + f"Ledger entry at transaction id {transaction_id} has been committed successfully" + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get the latest ledger entry. + try: + current_ledger_entry = ledger_client.get_current_ledger_entry()["contents"] + print(f"The current ledger entry is {current_ledger_entry}") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Users may wait for a durable commit when writing a ledger entry though this will reduce + # client throughput. + try: + print( + f"Writing another entry. This time, we'll have the client method wait for commit." + ) + post_poller = ledger_client.begin_create_ledger_entry( + {"contents": "Hello world again!"} + ) + new_post_result = post_poller.result() + print( + "The new ledger entry has been committed successfully at transaction id " + f'{new_post_result["transactionId"]}' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get the latest ledger entry. + try: + current_ledger_entry = ledger_client.get_current_ledger_entry()["contents"] + print(f"The current ledger entry is {current_ledger_entry}") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Make a query for a prior ledger entry. The service may take some time to load the result, + # so a poller is provided. + try: + get_entry_poller = ledger_client.begin_get_ledger_entry(transaction_id) + get_entry_result = get_entry_poller.result() + print( + f'At transaction id {get_entry_result["entry"]["transactionId"]}, the ledger entry ' + f'contains \'{get_entry_result["entry"]["contents"]}\'' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + +if __name__ == "__main__": + main() diff --git a/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py new file mode 100644 index 000000000000..b8e8702f8e91 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/samples/write_to_ledger_async.py @@ -0,0 +1,168 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: write_to_ledger_async.py +DESCRIPTION: + This sample demonstrates how to write to a Confidential Ledger. In this sample, we write some + ledger entries and perform common retrieval operations. +USAGE: + python write_to_ledger_async.py + Set the environment variables with your own values before running the sample: + 1) CONFIDENTIALLEDGER_ENDPOINT - the endpoint of the Confidential Ledger. +""" + +import asyncio +import logging +import os +import sys +import tempfile + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, +) +from azure.core.exceptions import HttpResponseError +from azure.identity.aio import DefaultAzureCredential + + +logging.basicConfig(level=logging.ERROR) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as + # environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, CONFIDENTIALLEDGER_ENDPOINT + try: + ledger_endpoint = os.environ["CONFIDENTIALLEDGER_ENDPOINT"] + except KeyError: + LOG.error( + "Missing environment variable 'CONFIDENTIALLEDGER_ENDPOINT' - " + "please set it before running the example" + ) + sys.exit(1) + + # Under the current URI format, the ledger id is the first part of the ledger endpoint. + # i.e. https://.confidential-ledger.azure.com + ledger_id = ledger_endpoint.replace("https://", "").split(".")[0] + + identity_service_client = ConfidentialLedgerCertificateClient() + async with identity_service_client: + ledger_certificate = await identity_service_client.get_ledger_identity( + ledger_id + ) + + # The Confidential Ledger's TLS certificate must be written to a file to be used by the + # ConfidentialLedgerClient. Here, we write it to a temporary file so that is is cleaned up + # automatically when the program exits. + with tempfile.TemporaryDirectory() as tempdir: + ledger_cert_file = os.path.join(tempdir, f"{ledger_id}.pem") + with open(ledger_cert_file, "w") as outfile: + outfile.write(ledger_certificate["ledgerTlsCertificate"]) + + print( + f"Ledger certificate has been written to {ledger_cert_file}. " + "It will be deleted when the script completes." + ) + + # Build a client through AAD + credential = DefaultAzureCredential() + ledger_client = ConfidentialLedgerClient( + ledger_endpoint, + credential=credential, + ledger_certificate_path=ledger_cert_file, + ) + + # Using the async objects as a context manager ensures they are properly closed after use. + async with credential: + async with ledger_client: + # Write a ledger entry. + try: + post_entry_result = await ledger_client.create_ledger_entry( + {"contents": "Hello world!"} + ) + transaction_id = post_entry_result["transactionId"] + print( + f"Successfully sent a ledger entry to be written. It will become durable " + f"at transaction id {transaction_id}" + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # For some scenarios, users may want to eventually ensure the written entry is + # durably committed. + try: + print( + f"Waiting for {transaction_id} to become durable. This may be skipped for " + "when writing less important entries where client throughput is " + "prioritized." + ) + wait_poller = await ledger_client.begin_wait_for_commit(transaction_id) + await wait_poller.wait() + print( + f"Ledger entry at transaction id {transaction_id} has been committed " + "successfully" + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get the latest ledger entry. + try: + current_ledger_entry = await ledger_client.get_current_ledger_entry() + current_ledger_entry = current_ledger_entry["contents"] + print(f"The current ledger entry is {current_ledger_entry}") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Users may wait for a durable commit when writing a ledger entry though this will + # reduce client throughput. + try: + print( + f"Writing another entry. This time, we'll have the client method wait for " + "commit." + ) + post_poller = await ledger_client.begin_create_ledger_entry( + {"contents": "Hello world again!"} + ) + new_post_result = await post_poller.result() + print( + "The new ledger entry has been committed successfully at transaction id " + f'{new_post_result["transactionId"]}' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Get the latest ledger entry. + try: + current_ledger_entry = await ledger_client.get_current_ledger_entry() + current_ledger_entry = current_ledger_entry["contents"] + print(f"The current ledger entry is {current_ledger_entry}") + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + # Make a query for a prior ledger entry. The service may take some time to load the + # result, so a poller is provided. + try: + get_entry_poller = await ledger_client.begin_get_ledger_entry(transaction_id) + get_entry_result = await get_entry_poller.result() + print( + f'At transaction id {get_entry_result["entry"]["transactionId"]}, the ' + f'ledger entry contains \'{get_entry_result["entry"]["contents"]}\'' + ) + except HttpResponseError as e: + print("Request failed: {}".format(e.response.json())) + raise + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/confidentialledger/azure-confidentialledger/setup.py b/sdk/confidentialledger/azure-confidentialledger/setup.py index 60b3556ed7ed..438272b50cc7 100644 --- a/sdk/confidentialledger/azure-confidentialledger/setup.py +++ b/sdk/confidentialledger/azure-confidentialledger/setup.py @@ -25,7 +25,9 @@ # Version extraction inspired from 'requests' with open(os.path.join(PACKAGE_FOLDER_PATH, "_version.py"), "r") as fd: - VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) + VERSION = re.search( + r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE + ).group(1) if not VERSION: raise RuntimeError("Cannot find version information") @@ -39,8 +41,9 @@ name=PACKAGE_NAME, version=VERSION, include_package_data=True, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - + description="Microsoft Azure {} Client Library for Python".format( + PACKAGE_PPRINT_NAME + ), # ensure that these are updated to reflect the package owners' information long_description=README + "\n\n" + CHANGELOG, long_description_content_type="text/markdown", @@ -50,26 +53,32 @@ url="https://github.com/Azure/azure-sdk-for-python", classifiers=[ "Development Status :: 4 - Beta", - "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "License :: OSI Approved :: MIT License", ], - zip_safe=False, - packages=find_packages(exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure" - ]), python_requires=">=3.6", + zip_safe=False, + packages=find_packages( + exclude=[ + "tests", + # Exclude packages that will be covered by PEP420 or nspkg + "azure", + ] + ), + package_data={ + 'pytyped': ['py.typed'], + }, install_requires=[ - "azure-common~=1.1", - "azure-core<2.0.0,>=1.2.2", - "msrest>=0.6.21", + "azure-core<2.0.0,>=1.24.0", + "isodate<1.0.0,>=0.6.1", ], + project_urls={ + 'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues', + 'Source': 'https://github.com/Azure/azure-sdk-python', + } ) diff --git a/sdk/confidentialledger/azure-confidentialledger/swagger/README.md b/sdk/confidentialledger/azure-confidentialledger/swagger/README.md new file mode 100644 index 000000000000..16cb916340b7 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/swagger/README.md @@ -0,0 +1,45 @@ +# Azure Confidential Ledger + +> see https://aka.ms/autorest + +### Settings + +#### Tag: confidential-ledger +These settings apply only when `--tag=confidential-ledger` is specified on the command line. +```yaml $(tag) == 'confidential-ledger' +input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/confidentialledger.json +output-folder: ../azure/confidentialledger +namespace: azure.confidentialledger +package-name: azure-confidentialledger +license-header: MICROSOFT_MIT_NO_VERSION +clear-output-folder: true +no-namespace-folders: true +title: ConfidentialLedgerClient +version-tolerant: true +package-version: 1.0.0 +python: true +``` + +#### Tag: identity-service +These settings apply only when `--tag=identity-service` is specified on the command line. +```yaml $(tag) == 'identity-service' +input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/stable/2022-05-13/identityservice.json +output-folder: ../azure/confidentialledger/certificate +namespace: azure.confidentialledger.certificate +package-name: azure-confidentialledger-certificate +license-header: MICROSOFT_MIT_NO_VERSION +clear-output-folder: true +no-namespace-folders: true +title: ConfidentialLedgerCertificateClient +version-tolerant: true +package-version: 1.0.0 +python: true +``` + +#### Batch execution +Batch execution allows nested generation without the parent module overwriting the child. +```yaml +batch: + - tag: confidential-ledger + - tag: identity-service +``` \ No newline at end of file diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common.py deleted file mode 100644 index bede3f24bfa3..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common.py +++ /dev/null @@ -1,243 +0,0 @@ -import hashlib -import os -import tempfile - -from azure.confidentialledger import ( - LedgerUserRole, - TransactionState, -) - -from .constants import NETWORK_CERTIFICATE, USER_CERTIFICATE -from .testcase import ConfidentialLedgerTestCase - -CONFIDENTIAL_LEDGER_URL = "https://fake-confidential-ledger.azure.com" - - -class ConfidentialLedgerClientTestMixin: - class BaseTest(ConfidentialLedgerTestCase): - def setUp(self): - super(ConfidentialLedgerClientTestMixin.BaseTest, self).setUp() - - self.confidential_ledger_url = self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_URL", CONFIDENTIAL_LEDGER_URL - ) - - with tempfile.NamedTemporaryFile( - "w", suffix=".pem", delete=False - ) as tls_cert_file: - tls_cert_file.write(NETWORK_CERTIFICATE) - self.network_certificate_path = tls_cert_file.name - - with tempfile.NamedTemporaryFile( - "w", suffix=".pem", delete=False - ) as user_cert_file: - user_cert_file.write( - self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_USER_CERTIFICATE", USER_CERTIFICATE - ) - ) - self.user_certificate_path = user_cert_file.name - - def tearDown(self): - os.remove(self.user_certificate_path) - os.remove(self.network_certificate_path) - return super(ConfidentialLedgerClientTestMixin.BaseTest, self).tearDown() - - def test_append_entry_flow(self): - entry_contents = "Test entry from Python SDK" - append_result = self.client.append_to_ledger(entry_contents=entry_contents) - self.assertTrue(append_result.transaction_id) - self.assertTrue(append_result.sub_ledger_id) - - # Test unpacking - append_result_sub_ledger_id, append_result_transaction_id = append_result - - self.client.wait_until_durable(transaction_id=append_result_transaction_id) - - transaction_status = self.client.get_transaction_status( - transaction_id=append_result_transaction_id - ) - self.assertIsNotNone(transaction_status) - self.assertIs(transaction_status.state, TransactionState.COMMITTED) - self.assertEqual( - transaction_status.transaction_id, append_result_transaction_id - ) - - receipt = self.client.get_transaction_receipt( - transaction_id=append_result_transaction_id - ) - self.assertEqual(receipt.transaction_id, append_result_transaction_id) - self.assertTrue(receipt.contents) - - latest_entry = self.client.get_ledger_entry() - # The transaction ids may not be equal in the unfortunate edge case where a governance - # operation occurs after the ledger append (e.g. because a node was restarted). Then, - # the latest id will be higher. - self.assertGreaterEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - self.client.append_to_ledger( - "Test entry 2 from Python SDK", wait_for_commit=True - ) - - latest_entry = self.client.get_ledger_entry() - self.assertNotEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertNotEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - original_entry = self.client.get_ledger_entry( - transaction_id=append_result_transaction_id - ) - self.assertEqual( - original_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(original_entry.contents, entry_contents) - self.assertEqual(original_entry.sub_ledger_id, append_result_sub_ledger_id) - - def test_append_entry_flow_with_sub_ledger_id(self): - sub_ledger_id = "132" - entry_contents = "Test sub-ledger entry from Python SDK" - append_result = self.client.append_to_ledger( - entry_contents=entry_contents, sub_ledger_id=sub_ledger_id - ) - self.assertTrue(append_result.transaction_id) - self.assertEqual(append_result.sub_ledger_id, sub_ledger_id) - - # Test unpacking - append_result_sub_ledger_id, append_result_transaction_id = append_result - - self.client.wait_until_durable(transaction_id=append_result_transaction_id) - - transaction_status = self.client.get_transaction_status( - transaction_id=append_result_transaction_id - ) - self.assertIsNotNone(transaction_status) - self.assertIs(transaction_status.state, TransactionState.COMMITTED) - self.assertEqual( - transaction_status.transaction_id, append_result_transaction_id - ) - - receipt = self.client.get_transaction_receipt( - transaction_id=append_result_transaction_id - ) - self.assertEqual(receipt.transaction_id, append_result_transaction_id) - self.assertTrue(receipt.contents) - - latest_entry = self.client.get_ledger_entry(sub_ledger_id=sub_ledger_id) - # The transaction ids may not be equal in the unfortunate edge case where a governance - # operation occurs after the ledger append (e.g. because a node was restarted). Then, - # the latest id will be higher. - self.assertGreaterEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - self.client.append_to_ledger( - "Test sub-ledger entry 2 from Python SDK", - sub_ledger_id=sub_ledger_id, - wait_for_commit=True, - ) - - latest_entry = self.client.get_ledger_entry(sub_ledger_id=sub_ledger_id) - self.assertNotEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertNotEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, sub_ledger_id) - - original_entry = self.client.get_ledger_entry( - transaction_id=append_result_transaction_id, sub_ledger_id=sub_ledger_id - ) - self.assertEqual( - original_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(original_entry.contents, entry_contents) - self.assertEqual(original_entry.sub_ledger_id, append_result_sub_ledger_id) - - def test_range_query(self): - modulus = 5 - num_messages_sent = 201 # Should result in 2 pages. - - messages = {m: [] for m in range(modulus)} - for i in range(num_messages_sent): - message = "message-{0}".format(i) - kwargs = ( - {} if modulus == 0 else {"sub_ledger_id": "{0}".format(i % modulus)} - ) - append_result = self.client.append_to_ledger( - entry_contents=message, **kwargs - ) - - messages[i % modulus].append( - (append_result.transaction_id, message, kwargs) - ) - - num_matched = 0 - for i in range(modulus): - query_result = self.client.get_ledger_entries( - from_transaction_id=messages[i][0][0], **messages[i][0][2] - ) - for index, historical_entry in enumerate(query_result): - self.assertEqual( - historical_entry.transaction_id, messages[i][index][0] - ) - self.assertEqual(historical_entry.contents, messages[i][index][1]) - num_matched += 1 - - # Due to replication delay, it's possible not all messages are matched. - self.assertGreaterEqual(num_matched, 0.9 * num_messages_sent) - - def test_user_management(self): - user_id = "0" * 36 # AAD Object Ids have length 36 - user = self.client.create_or_update_user( - user_id, LedgerUserRole.CONTRIBUTOR - ) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.CONTRIBUTOR) - - user = self.client.get_user(user_id) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.CONTRIBUTOR) - - self.client.delete_user(user_id) - - user = self.client.create_or_update_user(user_id, LedgerUserRole.READER) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.READER) - - user = self.client.get_user(user_id) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.READER) - - self.client.delete_user(user_id) - - def test_verification_methods(self): - consortium = self.client.get_consortium() - self.assertEqual(len(consortium.members), 1) - for member in consortium.members: - self.assertTrue(member.certificate) - self.assertTrue(member.id) - - constitution = self.client.get_constitution() - self.assertTrue(constitution.contents) - self.assertTrue(constitution.digest) - self.assertEqual( - constitution.digest.lower(), - hashlib.sha256(constitution.contents.encode()).hexdigest().lower(), - ) - - ledger_enclaves = self.client.get_enclave_quotes() - self.assertEqual(len(ledger_enclaves.quotes), 3) - self.assertIn(ledger_enclaves.source_node, ledger_enclaves.quotes) - for node_id, quote in ledger_enclaves.quotes.items(): - self.assertEqual(node_id, quote.node_id) - self.assertTrue(quote.node_id) - self.assertTrue(quote.mrenclave) - self.assertTrue(quote.raw_quote) - self.assertTrue(quote.version) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common_async.py deleted file mode 100644 index 55f83cba4259..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/client_test_common_async.py +++ /dev/null @@ -1,272 +0,0 @@ -import asyncio -import hashlib -import os -import tempfile -import time - -from devtools_testutils import AzureTestCase - -from azure.confidentialledger import ( - LedgerUserRole, - TransactionState, -) - -from .constants import NETWORK_CERTIFICATE, USER_CERTIFICATE -from .testcase_async import AsyncConfidentialLedgerTestCase - -CONFIDENTIAL_LEDGER_URL = "https://fake-confidential-ledger.azure.com" - - -class AsyncConfidentialLedgerClientTestMixin: - class AsyncBaseTest(AsyncConfidentialLedgerTestCase): - def setUp(self): - super().setUp() - - self.confidential_ledger_url = self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_URL", CONFIDENTIAL_LEDGER_URL - ) - - with tempfile.NamedTemporaryFile( - "w", suffix=".pem", delete=False - ) as tls_cert_file: - tls_cert_file.write(NETWORK_CERTIFICATE) - self.network_certificate_path = tls_cert_file.name - - with tempfile.NamedTemporaryFile( - "w", suffix=".pem", delete=False - ) as user_cert_file: - user_cert_file.write( - self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_USER_CERTIFICATE", USER_CERTIFICATE - ) - ) - self.user_certificate_path = user_cert_file.name - - def tearDown(self): - os.remove(self.user_certificate_path) - os.remove(self.network_certificate_path) - - # Since tearDown cannot be async - task = asyncio.ensure_future(self.client.close()) - while not task.done: - time.sleep(0.5) - - return super().tearDown() - - @AzureTestCase.await_prepared_test - async def test_append_entry_flow(self): - entry_contents = "Test entry from Python SDK" - append_result = await self.client.append_to_ledger( - entry_contents=entry_contents - ) - self.assertTrue(append_result.transaction_id) - self.assertTrue(append_result.sub_ledger_id) - - # Test unpacking - append_result_sub_ledger_id, append_result_transaction_id = append_result - - await self.client.wait_until_durable( - transaction_id=append_result_transaction_id - ) - - transaction_status = await self.client.get_transaction_status( - transaction_id=append_result_transaction_id - ) - self.assertIsNotNone(transaction_status) - self.assertIs(transaction_status.state, TransactionState.COMMITTED) - self.assertEqual( - transaction_status.transaction_id, append_result_transaction_id - ) - - receipt = await self.client.get_transaction_receipt( - transaction_id=append_result_transaction_id - ) - self.assertEqual(receipt.transaction_id, append_result_transaction_id) - self.assertTrue(receipt.contents) - - latest_entry = await self.client.get_ledger_entry() - # The transaction ids may not be equal in the unfortunate edge case where a governance - # operation occurs after the ledger append (e.g. because a node was restarted). Then, - # the latest id will be higher. - self.assertGreaterEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - await self.client.append_to_ledger( - "Test entry 2 from Python SDK", wait_for_commit=True - ) - - latest_entry = await self.client.get_ledger_entry() - self.assertNotEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertNotEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - original_entry = await self.client.get_ledger_entry( - transaction_id=append_result_transaction_id - ) - self.assertEqual( - original_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(original_entry.contents, entry_contents) - self.assertEqual(original_entry.sub_ledger_id, append_result_sub_ledger_id) - - @AzureTestCase.await_prepared_test - async def test_append_entry_flow_with_sub_ledger_id(self): - sub_ledger_id = "132" - entry_contents = "Test sub-ledger entry from Python SDK" - append_result = await self.client.append_to_ledger( - entry_contents=entry_contents, sub_ledger_id=sub_ledger_id - ) - self.assertTrue(append_result.transaction_id) - self.assertEqual(append_result.sub_ledger_id, sub_ledger_id) - - # Test unpacking - append_result_sub_ledger_id, append_result_transaction_id = append_result - - await self.client.wait_until_durable( - transaction_id=append_result_transaction_id - ) - - transaction_status = await self.client.get_transaction_status( - transaction_id=append_result_transaction_id - ) - self.assertIsNotNone(transaction_status) - self.assertIs(transaction_status.state, TransactionState.COMMITTED) - self.assertEqual( - transaction_status.transaction_id, append_result_transaction_id - ) - - receipt = await self.client.get_transaction_receipt( - transaction_id=append_result_transaction_id - ) - self.assertEqual(receipt.transaction_id, append_result_transaction_id) - self.assertTrue(receipt.contents) - - latest_entry = await self.client.get_ledger_entry( - sub_ledger_id=sub_ledger_id - ) - # The transaction ids may not be equal in the unfortunate edge case where a governance - # operation occurs after the ledger append (e.g. because a node was restarted). Then, - # the latest id will be higher. - self.assertGreaterEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, append_result_sub_ledger_id) - - await self.client.append_to_ledger( - "Test sub-ledger entry 2 from Python SDK", - sub_ledger_id=sub_ledger_id, - wait_for_commit=True, - ) - - latest_entry = await self.client.get_ledger_entry( - sub_ledger_id=sub_ledger_id - ) - self.assertNotEqual( - latest_entry.transaction_id, append_result_transaction_id - ) - self.assertNotEqual(latest_entry.contents, entry_contents) - self.assertEqual(latest_entry.sub_ledger_id, sub_ledger_id) - - original_entry = await self.client.get_ledger_entry( - transaction_id=append_result_transaction_id, sub_ledger_id=sub_ledger_id - ) - self.assertEqual( - original_entry.transaction_id, append_result_transaction_id - ) - self.assertEqual(original_entry.contents, entry_contents) - self.assertEqual(original_entry.sub_ledger_id, append_result_sub_ledger_id) - - @AzureTestCase.await_prepared_test - async def test_range_query(self): - modulus = 5 - num_messages_sent = 201 # Should result in 2 pages. - - messages = {m: [] for m in range(modulus)} - for i in range(num_messages_sent): - message = "message-{0}".format(i) - kwargs = ( - {} if modulus == 0 else {"sub_ledger_id": "{0}".format(i % modulus)} - ) - append_result = await self.client.append_to_ledger( - entry_contents=message, **kwargs - ) - - messages[i % modulus].append( - (append_result.transaction_id, message, kwargs) - ) - - num_matched = 0 - for i in range(modulus): - query_result = self.client.get_ledger_entries( - from_transaction_id=messages[i][0][0], **messages[i][0][2] - ) - index = 0 - async for historical_entry in query_result: - self.assertEqual( - historical_entry.transaction_id, messages[i][index][0] - ) - self.assertEqual(historical_entry.contents, messages[i][index][1]) - index += 1 - num_matched += 1 - - # Due to replication delay, it's possible not all messages are matched. - self.assertGreaterEqual(num_matched, 0.9 * num_messages_sent) - - @AzureTestCase.await_prepared_test - async def test_user_management(self): - user_id = "0" * 36 # AAD Object Ids have length 36 - user = await self.client.create_or_update_user( - user_id, LedgerUserRole.CONTRIBUTOR - ) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.CONTRIBUTOR) - - user = await self.client.get_user(user_id) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.CONTRIBUTOR) - - await self.client.delete_user(user_id) - - user = await self.client.create_or_update_user( - user_id, LedgerUserRole.READER - ) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.READER) - - user = await self.client.get_user(user_id) - self.assertEqual(user.id, user_id) - self.assertEqual(user.role, LedgerUserRole.READER) - - await self.client.delete_user(user_id) - - @AzureTestCase.await_prepared_test - async def test_verification_methods(self): - consortium = await self.client.get_consortium() - self.assertEqual(len(consortium.members), 1) - for member in consortium.members: - self.assertTrue(member.certificate) - self.assertTrue(member.id) - - constitution = await self.client.get_constitution() - self.assertTrue(constitution.contents) - self.assertTrue(constitution.digest) - self.assertEqual( - constitution.digest.lower(), - hashlib.sha256(constitution.contents.encode()).hexdigest().lower(), - ) - - ledger_enclaves = await self.client.get_enclave_quotes() - self.assertEqual(len(ledger_enclaves.quotes), 3) - self.assertIn(ledger_enclaves.source_node, ledger_enclaves.quotes) - for node_id, quote in ledger_enclaves.quotes.items(): - self.assertEqual(node_id, quote.node_id) - self.assertTrue(quote.node_id) - self.assertTrue(quote.mrenclave) - self.assertTrue(quote.raw_quote) - self.assertTrue(quote.version) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/constants.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/constants.py index e7947dd20aa8..8a4dc3ddb35c 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/constants.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/constants.py @@ -3,21 +3,10 @@ # Licensed under the MIT License. # ------------------------------------ -NETWORK_CERTIFICATE = """-----BEGIN CERTIFICATE----- -MIIBezCCASGgAwIBAgIRAL/+TT7iOY+UWa5Uh484vRYwCgYIKoZIzj0EAwIwFjEU -MBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1 -OTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49 -AwEHA0IABG4t5blH9yUsJB4Ywm0VcsxxiFTdiWffd4w+m8r3GRfV0i6qaHT44dVK -rMQH7ymSGCtz5PHqUQhy8ZJWAepDDKijUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O -BBYEFD+OVuRiS6dJICYtesS2Shx/KIEEMB8GA1UdIwQYMBaAFD+OVuRiS6dJICYt -esS2Shx/KIEEMAoGCCqGSM49BAMCA0gAMEUCICrLXfKPC1DmKdcTKnZwhiEoPvMi -RboMeODv/0hlL67gAiEA5gvNwskSiYefETGihWTouTqL+uyhDb4s3/R5XcIHaQQ= ------END CERTIFICATE-----""" - # Duplicate certificate from KeyVault. # https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-certificates/tests/ca.crt # https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/keyvault/azure-keyvault-certificates/tests/ca.key -USER_CERTIFICATE = """-----BEGIN CERTIFICATE----- +USER_CERTIFICATE = ("""-----BEGIN CERTIFICATE----- MIIDazCCAlOgAwIBAgIUYju9zymmCCF7rCaROzfZs0pNgmkwDQYJKoZIhvcNAQEL BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xOTA4MjgyMjU0MTNaFw0xOTA5 @@ -37,9 +26,9 @@ qO/I+6FjXuBpNomTqM897MY3Qzg43rpoCilpOpkRtMHknfhFxt05p+Fn73Fb60ru ZsFRA52lsEBxGmI0QmXGjwkUZFwQTXEDUWwId3VJxoHRZwv1gmHfwhkYt+mNWJDa mU7AMDzlQRwGC8hpWJRT ------END CERTIFICATE----- ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA9GKzM+WraD5k08S7QjuvZDNxPe23YyYMgFWSUvZj9x0Mh5BT +-----END CERTIFICATE-----\n""" +"-----BEGIN RSA PRIVATE KEY-----\n" #[SuppressMessage("Microsoft.Security", "CS001:SecretInline", Justification="Test secret that is found elsewhere in this repo")] +"""MIIEpQIBAAKCAQEA9GKzM+WraD5k08S7QjuvZDNxPe23YyYMgFWSUvZj9x0Mh5BT W9PXg3gAM3GS0eZ2F1+8sHqME1lXCHt5Pfmf7VHlawJTlXtgjmiBwFGSIYxC6v7v Nue//DKqmyl4bMq1jQFQ8ip3Q4L224MTbFE2zKAHvQQi/+X86MLJzy2giDAmEWkC VMkmyKE5iotdYRdPQhRUpC/Z730DgxchHXuiRz1q1UbHtpYqDyyXgvS6FBjTWZ26 @@ -64,4 +53,6 @@ VCVbHXkCgYEA4+FD1q6iwl9wsAOKFVo+W044/MhKHDsyIED3YOzeRTAWRl2w/KX0 c5ty2KecGu0cVXoAv2YUttHsuMZfm/QdosZr9UB4CR2lmzRys3LSx6QzCkZeMb/s QOMs6SYCPXggdXCAu9EVf5+TtYQg7aQNTTuYErlyq2g/tk3un8bHTwI= ------END RSA PRIVATE KEY-----""" +-----END RSA PRIVATE KEY-----""") + +USER_CERTIFICATE_THUMBPRINT = "5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5" diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py index 8d8a1db2f6bb..471c6201c59f 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase.py @@ -1,6 +1,61 @@ -from devtools_testutils import AzureTestCase +import functools +import os +import tempfile + +from devtools_testutils import AzureTestCase, PowerShellPreparer + +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, +) + +from .constants import USER_CERTIFICATE + + +ConfidentialLedgerPreparer = functools.partial( + PowerShellPreparer, + "confidentialledger", + confidentialledger_id="fake", + confidentialledger_endpoint="https://fake.confidential-ledger.azure.com", + confidentialledger_resource_group="fakegroup", +) class ConfidentialLedgerTestCase(AzureTestCase): def __init__(self, *args, **kwargs): super(ConfidentialLedgerTestCase, self).__init__(*args, **kwargs) + + def setUp(self): + super().setUp() + + with tempfile.NamedTemporaryFile( + "w", suffix=".pem", delete=False + ) as tls_cert_file: + self.network_certificate_path = tls_cert_file.name + + with tempfile.NamedTemporaryFile( + "w", suffix=".pem", delete=False + ) as user_cert_file: + user_cert_file.write(USER_CERTIFICATE) + self.user_certificate_path = user_cert_file.name + + def tearDown(self): + os.remove(self.user_certificate_path) + if self.network_certificate_path: + os.remove(self.network_certificate_path) + + return super().tearDown() + + def set_ledger_identity(self, confidentialledger_id): + client = self.create_client_from_credential( + ConfidentialLedgerCertificateClient, + credential=None, + ) + + network_identity = ( + client.get_ledger_identity( + ledger_id=confidentialledger_id + ) + ) + + with open(self.network_certificate_path, "w", encoding="utf-8") as outfile: + outfile.write(network_identity["ledgerTlsCertificate"]) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase_async.py deleted file mode 100644 index 2d449c70b7c0..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/_shared/testcase_async.py +++ /dev/null @@ -1,6 +0,0 @@ -from devtools_testutils import AzureTestCase - - -class AsyncConfidentialLedgerTestCase(AzureTestCase): - def __init__(self, *args, **kwargs): - super(AsyncConfidentialLedgerTestCase, self).__init__(*args, **kwargs) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_aad_user.yaml new file mode 100644 index 000000000000..595524a4664d --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_aad_user.yaml @@ -0,0 +1,429 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:04:37 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: + - '30' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23837' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23837"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23837' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23837"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23837' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23837"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23838' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23837"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23838' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: + - '66' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23838' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23837:0140b1e54a32cb003c2f550b3df59eac0e039af02e1e64ea7040f2eee75545cd\",\n + \ \"write_set_digest\": \"28fa40fbcf3f3df53c40708d4f47699225ad0817f3a07c0e4c13865bdd93af85\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"7902300ef65e7ee225513ae8c1bfc42244a9258ff164d22632cd8e36e545f9c0\"\n + \ },\n {\n \"left\": \"5ccbca8fd5e1a93e0616aad7094666cb84bc2abbd35d6d4e29118f7e0c9e1af6\"\n + \ },\n {\n \"left\": \"ec2addaa8ae219bf4868fe7024b9d11414677acf345c1678d36bc2b18b27290f\"\n + \ },\n {\n \"left\": \"8824c64c1bfced0b1b62528e1787d3ca34e503e0b43ef551d16cf75637b86ffe\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIBFCi+wjsgDYjKcK+CQZsY0/xaIZx5i7wQfjE+cuNQuVAiEAkV6nVA2fpBhnWixBMBrgtlxzyk5lDM1BKcXR++O1ZyA=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23837\"\n}" + headers: + content-length: + - '2291' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23838' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry from Python SDK","transactionId":"4.23838"}' + headers: + content-length: + - '96' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23838' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry 2 from Python SDK"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: + - '30' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23839' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23839/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23839"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23839' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23839/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23839"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23839' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23839/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23839"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23840' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry 2 from Python + SDK","transactionId":"4.23840"}' + headers: + content-length: + - '98' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23840' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23837?api-version=2022-05-13 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"subledger:0\",\n \"contents\": + \"Test entry from Python SDK\",\n \"transactionId\": \"4.23837\"\n },\n + \ \"state\": \"Ready\"\n}" + headers: + content-length: + - '152' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23840' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_cert_user.yaml new file mode 100644 index 000000000000..6986a9f33f95 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_cert_user.yaml @@ -0,0 +1,432 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:04:43 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23841' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: + - '30' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23843' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23843"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23843"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23843"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: + - '66' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23843:b22336c73dc7017cfdfb0572e87f438cb06ec5a7bbadbf0f64fa02e97173cf97\",\n + \ \"write_set_digest\": \"b901d2f9a407312a1650f33f1ee4ea98f0375d5ebcfed3db6b947a6c19f783ae\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"c1823cef2fb8e4d7197fee29abea5700e92684c4d5f1ff85b065d6ac78405799\"\n + \ },\n {\n \"left\": \"3fb7cae394075307f306dda0881518608e7b798527b06407631fe006d547f032\"\n + \ },\n {\n \"left\": \"8615552dd67eac5ea012b00c495ae1200c66b35feb6afdd7cc12616fe177dd25\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEYCIQCAW7sYTctniwrSOUfJVJ7/yxhA7jP/Jk8uP4kV9K+crwIhANeNKu0o2Ve7pb+1MiN1YdUXDgZTewrubTX2fsMlu4Rz\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23843\"\n}" + headers: + content-length: + - '2191' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry from Python SDK","transactionId":"4.23844"}' + headers: + content-length: + - '96' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23844' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry 2 from Python SDK"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: + - '30' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23845' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23845/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23845"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23845' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23845/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23845"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23845' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23845/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23845"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23846' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry 2 from Python + SDK","transactionId":"4.23846"}' + headers: + content-length: + - '98' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23846' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23843?api-version=2022-05-13 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"subledger:0\",\n \"contents\": + \"Test entry from Python SDK\",\n \"transactionId\": \"4.23843\"\n },\n + \ \"state\": \"Ready\"\n}" + headers: + content-length: + - '152' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23846' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_aad_user.yaml new file mode 100644 index 000000000000..59988b9277fb --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_aad_user.yaml @@ -0,0 +1,457 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:04:51 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: + - '22' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23847' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23847"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23847' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23847"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23847"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23847"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: + - '66' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23847:0508922a003a496310a4ad5c83e48f79e786937ff71b73b0b54af2b39c8ce2c1\",\n + \ \"write_set_digest\": \"7c9c1178fc4dba1ff32447475228cdb00c741672ae094ed916571e7a6f1a364c\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"b96c4820faa5e05dce375318b9e1b0297534c6b6b3aa51209ccb4db2673b782d\"\n + \ },\n {\n \"left\": \"266fab802847b80413bcc7548f80538bae4b4a4237b631329e6da5bd42ab8556\"\n + \ },\n {\n \"left\": \"6e924c2b7a8f5a4c5c390f89ce1c1608a594508162dfcb60132bfbf39d515dba\"\n + \ },\n {\n \"left\": \"8615552dd67eac5ea012b00c495ae1200c66b35feb6afdd7cc12616fe177dd25\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEYCIQCOZ/AitwacxY3ciOnIJMxSwQAL2GAsmfoGPybuFFtNMQIhAP5f4qnN+sxv7eccQYwTTWzSK0zfn//dE7xvSTV0MfgP\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23847\"\n}" + headers: + content-length: + - '2291' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry from Python SDK. Collection: + 132","transactionId":"4.23848"}' + headers: + content-length: + - '105' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23848' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry 2 from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '61' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: + - '22' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23849' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23849/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23849"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23849' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23849/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23849"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23849' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23849/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23849"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23850' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry 2 from Python SDK. Collection: + 132","transactionId":"4.23850"}' + headers: + content-length: + - '107' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23850' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23847?api-version=2022-05-13&collectionId=132 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"132\",\n \"contents\": + \"Test entry from Python SDK. Collection: 132\",\n \"transactionId\": \"4.23847\"\n + \ },\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '161' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23850' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 + response: + body: + string: '{"collections":[{"collectionId":"3"},{"collectionId":"132"},{"collectionId":"0"},{"collectionId":"Alice"},{"collectionId":"subledger:0"},{"collectionId":"1"},{"collectionId":"2"},{"collectionId":"Bob"},{"collectionId":"Messages + from Alice"},{"collectionId":"4"}]}' + headers: + content-length: + - '263' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23850' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_cert_user.yaml new file mode 100644 index 000000000000..fcb8fe0f2ccc --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_append_entry_flow_with_collection_id_cert_user.yaml @@ -0,0 +1,461 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:04:57 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23851' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: + - '22' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23853' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23853/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23853"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23854' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23853/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23853"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23854' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23853/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: + - '66' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23854' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23853/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23853:b6803e56554bdbe19236271e0e48584bba87c2c02004d14291b0ca34b975342f\",\n + \ \"write_set_digest\": \"31e067cdbce6c7f7dc632d1a874c98033c3ec079ecf88f46f4558593bc928d39\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"1ceeef4c5433d8eb5171025716f6da498ad865f295443e5cdd1b4c2d8b7a279c\"\n + \ },\n {\n \"left\": \"bec85d1c930660794834753bbece80c16f9bc0cb94d8a2fa67cb356d8a05b92c\"\n + \ },\n {\n \"left\": \"544166649b2a73bce8159af5d5882b978d94d0bc0277983ec5ecb7a6f0dc9f09\"\n + \ },\n {\n \"left\": \"8615552dd67eac5ea012b00c495ae1200c66b35feb6afdd7cc12616fe177dd25\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIQDP6XlWH6GDVBbm7RYcYX0rqRQMMajvVjyQbTiyghDlggIgA4c1lvKZNS9fp4fYPpqaCtQ9QGJbB3EhgK/fjOE/Zbg=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23853\"\n}" + headers: + content-length: + - '2291' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23854' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry from Python SDK. Collection: + 132","transactionId":"4.23854"}' + headers: + content-length: + - '105' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23854' + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry 2 from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '61' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: + - '22' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23855' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23855/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23855"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23855' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23855/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23855"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23855' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23855/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23855"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23856' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23855/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23855"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23856' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry 2 from Python SDK. Collection: + 132","transactionId":"4.23856"}' + headers: + content-length: + - '107' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23856' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23853?api-version=2022-05-13&collectionId=132 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"132\",\n \"contents\": + \"Test entry from Python SDK. Collection: 132\",\n \"transactionId\": \"4.23853\"\n + \ },\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '161' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23856' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 + response: + body: + string: '{"collections":[{"collectionId":"3"},{"collectionId":"132"},{"collectionId":"0"},{"collectionId":"Alice"},{"collectionId":"subledger:0"},{"collectionId":"1"},{"collectionId":"2"},{"collectionId":"Bob"},{"collectionId":"Messages + from Alice"},{"collectionId":"4"}]}' + headers: + content-length: + - '263' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23856' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_aad_user.yaml new file mode 100644 index 000000000000..8b494f112ab0 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_aad_user.yaml @@ -0,0 +1,695 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:06 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-0"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23857' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-1"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23859' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23860' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-3"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23861' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-4"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23862' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-5"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23863' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-6"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23864' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-7"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23866' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-8"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23867' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-9"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23868' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23868/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23868"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23868' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23868/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23868"}' + headers: + content-length: + - '45' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23868' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23868/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23868"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23857&toTransactionId=4.23863 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23857&toTransactionId=4.23863\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23857&toTransactionId=4.23863 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"0\",\n \"contents\": + \"message-0\",\n \"transactionId\": \"4.23857\"\n },\n {\n \"collectionId\": + \"0\",\n \"contents\": \"message-5\",\n \"transactionId\": \"4.23863\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23859&toTransactionId=4.23864 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23859&toTransactionId=4.23864\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23859&toTransactionId=4.23864 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"1\",\n \"contents\": + \"message-1\",\n \"transactionId\": \"4.23859\"\n },\n {\n \"collectionId\": + \"1\",\n \"contents\": \"message-6\",\n \"transactionId\": \"4.23864\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23860&toTransactionId=4.23866 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23860&toTransactionId=4.23866\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23860&toTransactionId=4.23866 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"2\",\n \"contents\": + \"message-2\",\n \"transactionId\": \"4.23860\"\n },\n {\n \"collectionId\": + \"2\",\n \"contents\": \"message-7\",\n \"transactionId\": \"4.23866\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23861&toTransactionId=4.23867 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23861&toTransactionId=4.23867\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23861&toTransactionId=4.23867 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"3\",\n \"contents\": + \"message-3\",\n \"transactionId\": \"4.23861\"\n },\n {\n \"collectionId\": + \"3\",\n \"contents\": \"message-8\",\n \"transactionId\": \"4.23867\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23862&toTransactionId=4.23868 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23862&toTransactionId=4.23868\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23862&toTransactionId=4.23868 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"4\",\n \"contents\": + \"message-4\",\n \"transactionId\": \"4.23862\"\n },\n {\n \"collectionId\": + \"4\",\n \"contents\": \"message-9\",\n \"transactionId\": \"4.23868\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23869' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_cert_user.yaml new file mode 100644 index 000000000000..077f6b7950c4 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_range_query_cert_user.yaml @@ -0,0 +1,673 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:12 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23870' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-0"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23872' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-1"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23873' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-2"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23874' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-3"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23875' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-4"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23876' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-5"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23878' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-6"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23879' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-7"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23880' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-8"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23881' + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-9"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: + - '20' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23882' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23882/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23882"}' + headers: + content-length: + - '47' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23872&toTransactionId=4.23878 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23872&toTransactionId=4.23878\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23872&toTransactionId=4.23878 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"0\",\n \"contents\": + \"message-0\",\n \"transactionId\": \"4.23872\"\n },\n {\n \"collectionId\": + \"0\",\n \"contents\": \"message-5\",\n \"transactionId\": \"4.23878\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23873&toTransactionId=4.23879 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23873&toTransactionId=4.23879\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23873&toTransactionId=4.23879 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"1\",\n \"contents\": + \"message-1\",\n \"transactionId\": \"4.23873\"\n },\n {\n \"collectionId\": + \"1\",\n \"contents\": \"message-6\",\n \"transactionId\": \"4.23879\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23874&toTransactionId=4.23880 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23874&toTransactionId=4.23880\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23874&toTransactionId=4.23880 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"2\",\n \"contents\": + \"message-2\",\n \"transactionId\": \"4.23874\"\n },\n {\n \"collectionId\": + \"2\",\n \"contents\": \"message-7\",\n \"transactionId\": \"4.23880\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23875&toTransactionId=4.23881 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23875&toTransactionId=4.23881\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23875&toTransactionId=4.23881 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"3\",\n \"contents\": + \"message-3\",\n \"transactionId\": \"4.23875\"\n },\n {\n \"collectionId\": + \"3\",\n \"contents\": \"message-8\",\n \"transactionId\": \"4.23881\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23876&toTransactionId=4.23882 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23876&toTransactionId=4.23882\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: + - '164' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23876&toTransactionId=4.23882 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"4\",\n \"contents\": + \"message-4\",\n \"transactionId\": \"4.23876\"\n },\n {\n \"collectionId\": + \"4\",\n \"contents\": \"message-9\",\n \"transactionId\": \"4.23882\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: + - '249' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_aad_user.yaml new file mode 100644 index 000000000000..3dc9764838ce --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_aad_user.yaml @@ -0,0 +1,477 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:21 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: + - '45692' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23883' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_cert_user.yaml new file mode 100644 index 000000000000..d399b3e24a7b --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_tls_cert_convenience_cert_user.yaml @@ -0,0 +1,507 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:23 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23884' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: + - '45692' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23885' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_aad_user.yaml new file mode 100644 index 000000000000..a7cb641f33e6 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_aad_user.yaml @@ -0,0 +1,313 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:28 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '78' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23886' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '78' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23887' + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '73' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23888' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '73' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23889' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: + - '0' + x-ms-ccf-transaction-id: + - '4.23890' + status: + code: 204 + message: No Content +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '137' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23891' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '137' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23892' + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '132' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23893' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '132' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23894' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: + - '0' + x-ms-ccf-transaction-id: + - '4.23895' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_cert_user.yaml new file mode 100644 index 000000000000..e3110f2fbb27 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_user_management_cert_user.yaml @@ -0,0 +1,343 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:05:44 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23897' + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '78' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23899' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '78' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23900' + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '73' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23901' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: + - '73' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23902' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: + - '0' + x-ms-ccf-transaction-id: + - '4.23903' + status: + code: 204 + message: No Content +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '137' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23905' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '137' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23906' + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '132' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23907' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: + - '132' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23908' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: + - '0' + x-ms-ccf-transaction-id: + - '4.23909' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_aad_user.yaml new file mode 100644 index 000000000000..25e831d66f6c --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_aad_user.yaml @@ -0,0 +1,530 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:03 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 + response: + body: + string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQMAEeooXfQdW6giXYaafT1DAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjIwNjI3MTU1NjQxWhcN\nMjIwOTI3MTYwNjQxWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAASqtUAZVCcGm38thbsTyFz+wkUHNHixt5QF\ncr9Q095DywgBU9yUWXSHBjhVMtI8+HJzq9PTSPvkO6yhvacaBr3w7uWrwN+4yfpj\nwFwsl4GpDvnBa0PdHnRa03ayLcfjZEKjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBR6I6yFAZG9HMa6eJOorb+s5u0kADAdBgNVHQ4EFgQUeiOshQGRvRzGuniTqK2/\nrObtJAAwCgYIKoZIzj0EAwMDaAAwZQIwNZ63xMJXFHSuP9fYqpwaMN7IFBR/oihI\nBI/g/zdHJrpZ/WBflOu/h8NjOCJL/6gFAjEAttAEp5op+uEZGVsC12BD+3iSMbbU\nBCTbeRohXdmfrVh+R4HTjMEkMZGulxArXsgl\n-----END + CERTIFICATE-----","id":"93579f54afd1c33c6924ffa2c1ef0e5aaf449d2d532f6e88cfff8f718cd2e068"}]}' + headers: + content-length: + - '856' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23910' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: + - '45692' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23910' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 + response: + body: + string: '{"currentNodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","enclaveQuotes":{"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f0607991573a6956b8eb8a806f199b1662b7a0000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a412000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c19817c2525ef909efdcb3b068499b33dd40cdaa832b5b697f47abe4543c302000000000000000000000000000000000000000000000000000000000000000044100000b11e25a28b1e13588dbf1b2c4878955ec399be0b80f3fcff5ba0c74b4b3baa8f84f3f5c8c8cd054b4ca9054dd9f130e5c26955abcf99b0e654af0f1af7424112cf7312969e233e971d6cff8c1dfa26b23c5457770c92c16ffc520d0ea6de78042a871cc06ac8fa1a56ca6f939d6c8de966197b4ad639042c1f3a3fcb1a706f7d13130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e010d58849d96a5e8df387100bba0e54295525d8af63be4143a132ed71ab65060000000000000000000000000000000000000000000000000000000000000000f1d9007f37ae0e150c7caae3403d0ae789f3647d34c622e1a46354c85e37d20b0fc6d656f2f21389c752ad551c9e4e957976949868b831dbd07bdc2f795650102000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f6741774942416749555a435233597a6879752f4c35304f6d59576c304b5648427974794177436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e6a41784e5459304d566f58445449354d4455774e6a41784e5459300a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e434141536a0a616f334b504378685a7833316e4d39636649584c35716178384e62506c6a6d47674b4e576b58657833447353343769313975753641422b6c48515a2b4e2b44610a6272555641532b384b55554a647559794654434b6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554a6e42335a51626c3233376f6e447167616d536a0a4c454e343052497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424243467870513847455a4534664f55436c4f7051516a624d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434951446a0a61463955556a506d633853374561364f726344486157706d534b3176516a476645442b43442b647744674967666945766a4e5357436675573464746d733568490a36673968757449584d31366463677864686478617466383d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069"},"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f060736da9ce2321cee3355880f41a56573390000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a41200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7dc3053d08f86d78567b5b3e6b1276737f7b172943affa9ca6eb5df079b3a940000000000000000000000000000000000000000000000000000000000000000441000005c97af7df5ddfb377e7a4393c9474aa3e3e0010aeb62264f443fee13e5350c1b32a8315d60e78d8e11068a672b49bffaf4fb10067bc7b80ffc018d79ea1ecd2313fc13db498262c28fa23cd129d1a7a35acf590229bc0ac5fea7baa72a316492e1382f6de652b51395de97053f2b5d4dfac694abbf88ab2c36f5a6469c1e209213130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942ab091bbdba69f4eb00f5945561b0eeb57919f838c67a1cbbb2257021e1ae30000000000000000000000000000000000000000000000000000000000000000cb28ef2eb7e09fc8112a45c921dbdfa7b23dc1a323cb6aee33f5856ca733f644b68ab1c28ab76391331e053195dc7df353fe45a8a02931abb176bd4e9744197f2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a544343424453674177494241674956414e3435477035586a33644e4b36424f7345477462456c70776244324d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d6a41314d4459774d4449354d444a61467730794f5441314d4459774d4449350a4d444a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a70304e4166325a324759647147615851573434594a4e4a6665755862734567736363356f7346376e6f634278503362727a48634c44494a4e75485767315358520a6265493859704f4e4e45302f5254635a7364513371364f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f4242594546464b6f2b4969426b4f732f754f713130554e780a4439666c417664504d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151414b6e6d74444761714536694b72444549434d53367a4343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e48414442454169424e0a6336414b6b67575338745963763753677345494e6c574d526d752b504b76757853756b744f6a33534d7749674e77526e35785a4a56544751517068646c4865690a39694c522b4f3133706b394d77313467776d33736357303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461008fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f"},"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f06072fa0d2c36c34306f70a1dc88d59ad2c40000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a4120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055cc2178f6af43ca7eff3d5bde8fc761cf1abb330719aa16a1581f9d7c4375b3000000000000000000000000000000000000000000000000000000000000000044100000cbe398c2802d6d138d0e443d980d8334d309ec2263bbdfae9357f51ceea1ec244b0ff3f4c1f9aa6c9b6fb41793d44b69006888d2a234c7b34d916b030fa22df8dfa88c8fce6883e26e6a440f2ec0a01d689e0c30135a2c66b7c784c897bc755495b3329a058dd547d3a483e454673f5934fcc9ba73b38be3700924dccf455e3713130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae853068706466e0007aa229170ba44dfaa60f06b11f0eddd9ece932e63d5db400000000000000000000000000000000000000000000000000000000000000000e56496762f81fa526b69f30fd1c1978573bdf4a06fc80575faccd87533ccdbab4115a0c22f21b48c021f99e86a70e5061b70950164e5dab165ebe97ee26c5762000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f674177494241674955583367495779635930394552326f6679544e644a724a727245507777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e5449794d5441314d566f58445449354d4455774e5449794d5441310a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414151670a4a524b74683978634f6a376c525336494d716858346139466b3373535349524e4e507237374771764d376653513174356c6a41723674482b4f58645571764b690a576747715a2f6879424d4e434531634474336f786f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554c7a6378587631425645756e58694e436c76626e0a4353434c4a53597744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424244786467466b712f7256564c2f6a5477324d664b666a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543495144350a7150586948746d584f794f69364e694c71534c7154337269726b636d535052673630472b46485056495149674c794768736142416c4f5679527549694d552b460a422b45366652366e465135436c4f637662584d4564376b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811"}}}' + headers: + content-length: + - '28962' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23910' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_cert_user.yaml new file mode 100644 index 000000000000..c36350e11bbd --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client.test_verification_methods_cert_user.yaml @@ -0,0 +1,560 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:06 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: + - '139' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23911' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 + response: + body: + string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQMAEeooXfQdW6giXYaafT1DAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjIwNjI3MTU1NjQxWhcN\nMjIwOTI3MTYwNjQxWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAASqtUAZVCcGm38thbsTyFz+wkUHNHixt5QF\ncr9Q095DywgBU9yUWXSHBjhVMtI8+HJzq9PTSPvkO6yhvacaBr3w7uWrwN+4yfpj\nwFwsl4GpDvnBa0PdHnRa03ayLcfjZEKjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBR6I6yFAZG9HMa6eJOorb+s5u0kADAdBgNVHQ4EFgQUeiOshQGRvRzGuniTqK2/\nrObtJAAwCgYIKoZIzj0EAwMDaAAwZQIwNZ63xMJXFHSuP9fYqpwaMN7IFBR/oihI\nBI/g/zdHJrpZ/WBflOu/h8NjOCJL/6gFAjEAttAEp5op+uEZGVsC12BD+3iSMbbU\nBCTbeRohXdmfrVh+R4HTjMEkMZGulxArXsgl\n-----END + CERTIFICATE-----","id":"93579f54afd1c33c6924ffa2c1ef0e5aaf449d2d532f6e88cfff8f718cd2e068"}]}' + headers: + content-length: + - '856' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23912' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: + - '45692' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23912' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 + response: + body: + string: '{"currentNodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","enclaveQuotes":{"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f0607991573a6956b8eb8a806f199b1662b7a0000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a412000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c19817c2525ef909efdcb3b068499b33dd40cdaa832b5b697f47abe4543c302000000000000000000000000000000000000000000000000000000000000000044100000b11e25a28b1e13588dbf1b2c4878955ec399be0b80f3fcff5ba0c74b4b3baa8f84f3f5c8c8cd054b4ca9054dd9f130e5c26955abcf99b0e654af0f1af7424112cf7312969e233e971d6cff8c1dfa26b23c5457770c92c16ffc520d0ea6de78042a871cc06ac8fa1a56ca6f939d6c8de966197b4ad639042c1f3a3fcb1a706f7d13130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e010d58849d96a5e8df387100bba0e54295525d8af63be4143a132ed71ab65060000000000000000000000000000000000000000000000000000000000000000f1d9007f37ae0e150c7caae3403d0ae789f3647d34c622e1a46354c85e37d20b0fc6d656f2f21389c752ad551c9e4e957976949868b831dbd07bdc2f795650102000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f6741774942416749555a435233597a6879752f4c35304f6d59576c304b5648427974794177436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e6a41784e5459304d566f58445449354d4455774e6a41784e5459300a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e434141536a0a616f334b504378685a7833316e4d39636649584c35716178384e62506c6a6d47674b4e576b58657833447353343769313975753641422b6c48515a2b4e2b44610a6272555641532b384b55554a647559794654434b6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554a6e42335a51626c3233376f6e447167616d536a0a4c454e343052497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424243467870513847455a4534664f55436c4f7051516a624d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434951446a0a61463955556a506d633853374561364f726344486157706d534b3176516a476645442b43442b647744674967666945766a4e5357436675573464746d733568490a36673968757449584d31366463677864686478617466383d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069"},"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f060736da9ce2321cee3355880f41a56573390000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a41200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7dc3053d08f86d78567b5b3e6b1276737f7b172943affa9ca6eb5df079b3a940000000000000000000000000000000000000000000000000000000000000000441000005c97af7df5ddfb377e7a4393c9474aa3e3e0010aeb62264f443fee13e5350c1b32a8315d60e78d8e11068a672b49bffaf4fb10067bc7b80ffc018d79ea1ecd2313fc13db498262c28fa23cd129d1a7a35acf590229bc0ac5fea7baa72a316492e1382f6de652b51395de97053f2b5d4dfac694abbf88ab2c36f5a6469c1e209213130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942ab091bbdba69f4eb00f5945561b0eeb57919f838c67a1cbbb2257021e1ae30000000000000000000000000000000000000000000000000000000000000000cb28ef2eb7e09fc8112a45c921dbdfa7b23dc1a323cb6aee33f5856ca733f644b68ab1c28ab76391331e053195dc7df353fe45a8a02931abb176bd4e9744197f2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a544343424453674177494241674956414e3435477035586a33644e4b36424f7345477462456c70776244324d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d6a41314d4459774d4449354d444a61467730794f5441314d4459774d4449350a4d444a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a70304e4166325a324759647147615851573434594a4e4a6665755862734567736363356f7346376e6f634278503362727a48634c44494a4e75485767315358520a6265493859704f4e4e45302f5254635a7364513371364f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f4242594546464b6f2b4969426b4f732f754f713130554e780a4439666c417664504d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151414b6e6d74444761714536694b72444549434d53367a4343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e48414442454169424e0a6336414b6b67575338745963763753677345494e6c574d526d752b504b76757853756b744f6a33534d7749674e77526e35785a4a56544751517068646c4865690a39694c522b4f3133706b394d77313467776d33736357303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461008fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f"},"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f06072fa0d2c36c34306f70a1dc88d59ad2c40000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a4120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055cc2178f6af43ca7eff3d5bde8fc761cf1abb330719aa16a1581f9d7c4375b3000000000000000000000000000000000000000000000000000000000000000044100000cbe398c2802d6d138d0e443d980d8334d309ec2263bbdfae9357f51ceea1ec244b0ff3f4c1f9aa6c9b6fb41793d44b69006888d2a234c7b34d916b030fa22df8dfa88c8fce6883e26e6a440f2ec0a01d689e0c30135a2c66b7c784c897bc755495b3329a058dd547d3a483e454673f5934fcc9ba73b38be3700924dccf455e3713130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae853068706466e0007aa229170ba44dfaa60f06b11f0eddd9ece932e63d5db400000000000000000000000000000000000000000000000000000000000000000e56496762f81fa526b69f30fd1c1978573bdf4a06fc80575faccd87533ccdbab4115a0c22f21b48c021f99e86a70e5061b70950164e5dab165ebe97ee26c5762000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f674177494241674955583367495779635930394552326f6679544e644a724a727245507777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e5449794d5441314d566f58445449354d4455774e5449794d5441310a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414151670a4a524b74683978634f6a376c525336494d716858346139466b3373535349524e4e507237374771764d376653513174356c6a41723674482b4f58645571764b690a576747715a2f6879424d4e434531634474336f786f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554c7a6378587631425645756e58694e436c76626e0a4353434c4a53597744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424244786467466b712f7256564c2f6a5477324d664b666a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543495144350a7150586948746d584f794f69364e694c71534c7154337269726b636d535052673630472b46485056495149674c794768736142416c4f5679527549694d552b460a422b45366652366e465135436c4f637662584d4564376b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811"}}}' + headers: + content-length: + - '28962' + content-type: + - application/json + x-ms-ccf-transaction-id: + - '4.23912' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow.yaml deleted file mode 100644 index 00b4d963a6b6..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow.yaml +++ /dev/null @@ -1,415 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: - - '80' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.287' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test entry from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: - - '29' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.289' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.289"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.289' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.289"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.289' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.289"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.290' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.289"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.290' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: - - '155' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.290' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"77c3a439a9f5979130f83c58e3ca5dfff91a7806c875be668bf3852e2a6ab0e5\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"95a1ff3ba7dc0bbc48671487f29e1fcd9cfa6907ff629bedec759ce6ebcfb2e7\"\n - \ },\n {\n \"left\": \"808159bf397bed48a84af2676f44ad3394a7d9249a3ad4e082b116694f8e91b0\"\n - \ },\n {\n \"left\": \"1e507b6d1af4c8e93b367bc1bc4dfb3831bb53d280fdda243d7f61bbe077d38c\"\n - \ }\n ],\n \"root\": \"adf2afd04f2ee7d2adb0dd497e749278c3e78d15f072fe7d1991c5ac5dfd0fdb\",\n - \ \"signature\": \"MEUCIEqEtlks35UJDd9C7Kg1m85Vm2tgNVUSP22mvjESlJhLAiEA1IzJVSTRaXQD2nEDDfta6TVQe8ztfQekbEkNmbHQ0g0=\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.289\"\n}" - headers: - content-length: - - '750' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.290' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry from Python SDK","subLedgerId":"subledger:0","transactionId":"2.290"}' - headers: - content-length: - - '93' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.290' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: - - '29' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.291' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.291/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.291"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.291' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.291/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.291"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.291' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.291/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.291"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.292' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry 2 from Python SDK","subLedgerId":"subledger:0","transactionId":"2.292"}' - headers: - content-length: - - '95' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.292' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.289?api-version=0.1-preview - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test entry from Python SDK\",\n - \ \"subLedgerId\": \"subledger:0\",\n \"transactionId\": \"2.289\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '149' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.292' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow_with_sub_ledger_id.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow_with_sub_ledger_id.yaml deleted file mode 100644 index 4f2d2b400df8..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_append_entry_flow_with_sub_ledger_id.yaml +++ /dev/null @@ -1,391 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: - - '80' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.293' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test sub-ledger entry from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '53' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: - - '21' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.295' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.295"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.295' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.295"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.295"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.295"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: - - '155' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"c3a4395fb7670c5c769957015a46c432b9705dd60ab0f1104bb4d8f35e256484\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"e30b3eb304bb219ca53f4db77ba8522fec2126f2509cd24d497745f53e925ba8\"\n - \ },\n {\n \"left\": \"16f9170325a9ea80677e65101a0d09100b1a027083440a73b77ab3010f3f0754\"\n - \ },\n {\n \"left\": \"64190d8653622f6ef1348c483da5081e5595b1e8eec08eb2e21bfa28ca48224e\"\n - \ },\n {\n \"left\": \"808159bf397bed48a84af2676f44ad3394a7d9249a3ad4e082b116694f8e91b0\"\n - \ },\n {\n \"left\": \"1e507b6d1af4c8e93b367bc1bc4dfb3831bb53d280fdda243d7f61bbe077d38c\"\n - \ }\n ],\n \"root\": \"4b07069dc5028335b62288132d7d17dbe8f62756e0051217dccb1b43a97158d3\",\n - \ \"signature\": \"MEUCIEe8s9VVJwZTd1PYkmokqDRDc1MrIHvYd6J7CAb9QLUcAiEAkK3XLinbCx+7MWYWH9Sq4jXsM9jlU/f84aVCmiIanNM=\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.295\"\n}" - headers: - content-length: - - '950' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry from Python SDK","subLedgerId":"132","transactionId":"2.296"}' - headers: - content-length: - - '96' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.296' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test sub-ledger entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: - - '21' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.297' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.297/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.297"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.297' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.297/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.297"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.298' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry 2 from Python SDK","subLedgerId":"132","transactionId":"2.298"}' - headers: - content-length: - - '98' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.298' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.295?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test sub-ledger entry from Python - SDK\",\n \"subLedgerId\": \"132\",\n \"transactionId\": \"2.295\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '152' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.298' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_range_query.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_range_query.yaml deleted file mode 100644 index f99fb781cfeb..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_range_query.yaml +++ /dev/null @@ -1,7055 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: - - '80' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.299' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-0"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.300' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-1"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.301' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-2"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.302' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-3"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.303' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-4"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.304' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-5"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.305' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-6"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.307' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-7"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.308' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-8"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.309' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-9"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.310' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-10"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.311' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-11"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.312' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-12"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.313' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-13"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.314' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-14"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.315' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-15"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.316' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-16"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.317' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-17"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.318' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-18"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.319' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-19"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.320' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-20"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.321' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-21"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.322' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-22"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.323' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-23"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.325' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-24"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.326' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-25"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.327' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-26"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.328' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-27"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.329' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-28"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.330' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-29"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.331' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-30"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.332' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-31"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.333' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-32"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.334' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-33"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.335' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-34"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.336' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-35"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.337' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-36"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.338' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-37"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.339' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-38"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.340' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-39"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.341' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-40"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.343' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-41"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.344' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-42"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.345' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-43"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.346' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-44"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.347' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-45"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.348' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-46"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.349' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-47"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.350' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-48"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.351' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-49"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.352' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-50"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.353' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-51"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.354' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-52"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.355' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-53"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.356' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-54"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.357' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-55"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.358' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-56"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.359' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-57"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.361' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-58"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.362' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-59"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.363' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-60"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.364' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-61"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.365' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-62"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.366' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-63"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.367' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-64"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.368' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-65"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.369' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-66"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.370' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-67"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.371' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-68"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.372' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-69"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.373' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-70"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.374' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-71"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.375' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-72"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.376' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-73"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.377' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-74"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.378' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-75"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.380' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-76"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.381' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-77"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.382' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-78"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.383' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-79"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.384' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-80"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.385' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-81"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.386' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-82"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.387' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-83"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.388' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-84"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.389' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-85"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.390' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-86"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.391' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-87"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.392' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-88"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.393' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-89"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.394' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-90"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.395' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-91"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.396' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-92"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.398' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-93"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.399' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-94"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.400' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-95"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.401' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-96"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.402' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-97"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.403' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-98"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.404' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-99"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.405' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-100"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.406' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-101"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.407' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-102"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.408' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-103"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.409' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-104"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.410' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-105"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.411' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-106"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.412' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-107"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.413' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-108"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.414' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-109"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.415' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-110"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.416' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-111"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.418' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-112"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.419' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-113"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.420' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-114"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.421' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-115"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.422' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-116"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.423' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-117"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.424' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-118"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.425' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-119"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.426' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-120"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.427' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-121"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.428' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-122"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.429' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-123"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.430' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-124"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.431' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-125"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.432' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-126"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.433' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-127"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.434' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-128"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.436' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-129"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.437' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-130"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.438' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-131"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.439' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-132"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.440' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-133"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.441' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-134"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.442' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-135"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.443' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-136"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.444' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-137"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.445' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-138"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.446' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-139"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.447' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-140"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.448' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-141"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.449' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-142"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.450' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-143"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.451' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-144"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.452' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-145"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.454' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-146"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.455' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-147"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.456' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-148"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.457' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-149"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.458' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-150"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.459' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-151"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.460' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-152"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.461' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-153"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.462' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-154"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.463' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-155"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.464' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-156"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.465' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-157"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.466' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-158"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.467' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-159"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.468' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-160"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.469' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-161"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.470' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-162"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.472' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-163"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.473' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-164"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.474' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-165"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.475' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-166"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.476' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-167"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.477' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-168"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.478' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-169"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.479' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-170"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.480' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-171"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.481' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-172"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.482' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-173"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.483' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-174"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.484' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-175"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.485' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-176"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.486' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-177"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.487' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-178"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.488' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-179"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.490' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-180"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.491' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-181"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.492' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-182"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.493' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-183"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.494' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-184"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.495' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-185"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.496' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-186"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.497' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-187"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.498' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-188"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.499' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-189"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.500' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-190"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.501' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-191"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.502' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-192"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.503' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-193"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.504' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-194"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.505' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-195"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.506' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-196"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.508' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-197"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.509' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-198"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.510' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-199"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.511' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-200"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.300 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.300\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.300 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.300\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.300 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.401\",\n - \ \"entries\": [\n {\n \"contents\": \"message-0\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.300\"\n },\n {\n \"contents\": - \"message-5\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.305\"\n - \ },\n {\n \"contents\": \"message-10\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.311\"\n },\n {\n \"contents\": - \"message-15\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.316\"\n - \ },\n {\n \"contents\": \"message-20\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.321\"\n },\n {\n \"contents\": - \"message-25\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.327\"\n - \ },\n {\n \"contents\": \"message-30\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.332\"\n },\n {\n \"contents\": - \"message-35\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.337\"\n - \ },\n {\n \"contents\": \"message-40\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.343\"\n },\n {\n \"contents\": - \"message-45\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.348\"\n - \ },\n {\n \"contents\": \"message-50\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.353\"\n },\n {\n \"contents\": - \"message-55\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.358\"\n - \ },\n {\n \"contents\": \"message-60\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.364\"\n },\n {\n \"contents\": - \"message-65\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.369\"\n - \ },\n {\n \"contents\": \"message-70\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.374\"\n },\n {\n \"contents\": - \"message-75\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.380\"\n - \ },\n {\n \"contents\": \"message-80\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.385\"\n },\n {\n \"contents\": - \"message-85\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.390\"\n - \ },\n {\n \"contents\": \"message-90\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.395\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.401 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.502\",\n - \ \"entries\": [\n {\n \"contents\": \"message-95\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.401\"\n },\n {\n \"contents\": - \"message-100\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.406\"\n },\n {\n \"contents\": \"message-105\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.411\"\n },\n {\n \"contents\": - \"message-110\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.416\"\n },\n {\n \"contents\": \"message-115\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.422\"\n },\n {\n \"contents\": - \"message-120\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.427\"\n },\n {\n \"contents\": \"message-125\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.432\"\n },\n {\n \"contents\": - \"message-130\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.438\"\n },\n {\n \"contents\": \"message-135\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.443\"\n },\n {\n \"contents\": - \"message-140\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.448\"\n },\n {\n \"contents\": \"message-145\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.454\"\n },\n {\n \"contents\": - \"message-150\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.459\"\n },\n {\n \"contents\": \"message-155\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.464\"\n },\n {\n \"contents\": - \"message-160\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.469\"\n },\n {\n \"contents\": \"message-165\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.475\"\n },\n {\n \"contents\": - \"message-170\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.480\"\n },\n {\n \"contents\": \"message-175\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.485\"\n },\n {\n \"contents\": - \"message-180\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.491\"\n },\n {\n \"contents\": \"message-185\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.496\"\n },\n {\n \"contents\": - \"message-190\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.501\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2198' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.502 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-195\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.506\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '144' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.301 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.301\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.301 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.301\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.301 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.402\",\n - \ \"entries\": [\n {\n \"contents\": \"message-1\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.301\"\n },\n {\n \"contents\": - \"message-6\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.307\"\n - \ },\n {\n \"contents\": \"message-11\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.312\"\n },\n {\n \"contents\": - \"message-16\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.317\"\n - \ },\n {\n \"contents\": \"message-21\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.322\"\n },\n {\n \"contents\": - \"message-26\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.328\"\n - \ },\n {\n \"contents\": \"message-31\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.333\"\n },\n {\n \"contents\": - \"message-36\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.338\"\n - \ },\n {\n \"contents\": \"message-41\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.344\"\n },\n {\n \"contents\": - \"message-46\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.349\"\n - \ },\n {\n \"contents\": \"message-51\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.354\"\n },\n {\n \"contents\": - \"message-56\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.359\"\n - \ },\n {\n \"contents\": \"message-61\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.365\"\n },\n {\n \"contents\": - \"message-66\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.370\"\n - \ },\n {\n \"contents\": \"message-71\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.375\"\n },\n {\n \"contents\": - \"message-76\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.381\"\n - \ },\n {\n \"contents\": \"message-81\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.386\"\n },\n {\n \"contents\": - \"message-86\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.391\"\n - \ },\n {\n \"contents\": \"message-91\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.396\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.402 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.503\",\n - \ \"entries\": [\n {\n \"contents\": \"message-96\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.402\"\n },\n {\n \"contents\": - \"message-101\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.407\"\n },\n {\n \"contents\": \"message-106\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.412\"\n },\n {\n \"contents\": - \"message-111\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.418\"\n },\n {\n \"contents\": \"message-116\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.423\"\n },\n {\n \"contents\": - \"message-121\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.428\"\n },\n {\n \"contents\": \"message-126\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.433\"\n },\n {\n \"contents\": - \"message-131\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.439\"\n },\n {\n \"contents\": \"message-136\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.444\"\n },\n {\n \"contents\": - \"message-141\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.449\"\n },\n {\n \"contents\": \"message-146\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.455\"\n },\n {\n \"contents\": - \"message-151\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.460\"\n },\n {\n \"contents\": \"message-156\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.465\"\n },\n {\n \"contents\": - \"message-161\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.470\"\n },\n {\n \"contents\": \"message-166\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.476\"\n },\n {\n \"contents\": - \"message-171\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.481\"\n },\n {\n \"contents\": \"message-176\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.486\"\n },\n {\n \"contents\": - \"message-181\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.492\"\n },\n {\n \"contents\": \"message-186\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.497\"\n },\n {\n \"contents\": - \"message-191\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.502\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2198' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.503 - response: - body: - string: "{\n \"entries\": [],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '39' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.302 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.302\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.302 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.302\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.302 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.403\",\n - \ \"entries\": [\n {\n \"contents\": \"message-2\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.302\"\n },\n {\n \"contents\": - \"message-7\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.308\"\n - \ },\n {\n \"contents\": \"message-12\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.313\"\n },\n {\n \"contents\": - \"message-17\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.318\"\n - \ },\n {\n \"contents\": \"message-22\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.323\"\n },\n {\n \"contents\": - \"message-27\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.329\"\n - \ },\n {\n \"contents\": \"message-32\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.334\"\n },\n {\n \"contents\": - \"message-37\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.339\"\n - \ },\n {\n \"contents\": \"message-42\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.345\"\n },\n {\n \"contents\": - \"message-47\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.350\"\n - \ },\n {\n \"contents\": \"message-52\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.355\"\n },\n {\n \"contents\": - \"message-57\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.361\"\n - \ },\n {\n \"contents\": \"message-62\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.366\"\n },\n {\n \"contents\": - \"message-67\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.371\"\n - \ },\n {\n \"contents\": \"message-72\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.376\"\n },\n {\n \"contents\": - \"message-77\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.382\"\n - \ },\n {\n \"contents\": \"message-82\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.387\"\n },\n {\n \"contents\": - \"message-87\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.392\"\n - \ },\n {\n \"contents\": \"message-92\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.398\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.403 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.504\",\n - \ \"entries\": [\n {\n \"contents\": \"message-97\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.403\"\n },\n {\n \"contents\": - \"message-102\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.408\"\n },\n {\n \"contents\": \"message-107\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.413\"\n },\n {\n \"contents\": - \"message-112\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.419\"\n },\n {\n \"contents\": \"message-117\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.424\"\n },\n {\n \"contents\": - \"message-122\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.429\"\n },\n {\n \"contents\": \"message-127\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.434\"\n },\n {\n \"contents\": - \"message-132\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.440\"\n },\n {\n \"contents\": \"message-137\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.445\"\n },\n {\n \"contents\": - \"message-142\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.450\"\n },\n {\n \"contents\": \"message-147\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.456\"\n },\n {\n \"contents\": - \"message-152\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.461\"\n },\n {\n \"contents\": \"message-157\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.466\"\n },\n {\n \"contents\": - \"message-162\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.472\"\n },\n {\n \"contents\": \"message-167\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.477\"\n },\n {\n \"contents\": - \"message-172\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.482\"\n },\n {\n \"contents\": \"message-177\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.487\"\n },\n {\n \"contents\": - \"message-182\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.493\"\n },\n {\n \"contents\": \"message-187\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.498\"\n },\n {\n \"contents\": - \"message-192\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.503\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2198' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.512' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.504 - response: - body: - string: "{\n \"entries\": [],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '39' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.303 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.303\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.303 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.303\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.303 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.404\",\n - \ \"entries\": [\n {\n \"contents\": \"message-3\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.303\"\n },\n {\n \"contents\": - \"message-8\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.309\"\n - \ },\n {\n \"contents\": \"message-13\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.314\"\n },\n {\n \"contents\": - \"message-18\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.319\"\n - \ },\n {\n \"contents\": \"message-23\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.325\"\n },\n {\n \"contents\": - \"message-28\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.330\"\n - \ },\n {\n \"contents\": \"message-33\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.335\"\n },\n {\n \"contents\": - \"message-38\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.340\"\n - \ },\n {\n \"contents\": \"message-43\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.346\"\n },\n {\n \"contents\": - \"message-48\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.351\"\n - \ },\n {\n \"contents\": \"message-53\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.356\"\n },\n {\n \"contents\": - \"message-58\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.362\"\n - \ },\n {\n \"contents\": \"message-63\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.367\"\n },\n {\n \"contents\": - \"message-68\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.372\"\n - \ },\n {\n \"contents\": \"message-73\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.377\"\n },\n {\n \"contents\": - \"message-78\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.383\"\n - \ },\n {\n \"contents\": \"message-83\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.388\"\n },\n {\n \"contents\": - \"message-88\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.393\"\n - \ },\n {\n \"contents\": \"message-93\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.399\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.404 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.404\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.404 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.505\",\n - \ \"entries\": [\n {\n \"contents\": \"message-98\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.404\"\n },\n {\n \"contents\": - \"message-103\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.409\"\n },\n {\n \"contents\": \"message-108\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.414\"\n },\n {\n \"contents\": - \"message-113\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.420\"\n },\n {\n \"contents\": \"message-118\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.425\"\n },\n {\n \"contents\": - \"message-123\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.430\"\n },\n {\n \"contents\": \"message-128\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.436\"\n },\n {\n \"contents\": - \"message-133\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.441\"\n },\n {\n \"contents\": \"message-138\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.446\"\n },\n {\n \"contents\": - \"message-143\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.451\"\n },\n {\n \"contents\": \"message-148\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.457\"\n },\n {\n \"contents\": - \"message-153\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.462\"\n },\n {\n \"contents\": \"message-158\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.467\"\n },\n {\n \"contents\": - \"message-163\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.473\"\n },\n {\n \"contents\": \"message-168\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.478\"\n },\n {\n \"contents\": - \"message-173\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.483\"\n },\n {\n \"contents\": \"message-178\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.488\"\n },\n {\n \"contents\": - \"message-183\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.494\"\n },\n {\n \"contents\": \"message-188\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.499\"\n },\n {\n \"contents\": - \"message-193\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.504\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2198' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.505 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-198\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.510\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '144' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.304 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.304\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.304 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.304\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.304 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.405\",\n - \ \"entries\": [\n {\n \"contents\": \"message-4\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.304\"\n },\n {\n \"contents\": - \"message-9\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.310\"\n - \ },\n {\n \"contents\": \"message-14\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.315\"\n },\n {\n \"contents\": - \"message-19\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.320\"\n - \ },\n {\n \"contents\": \"message-24\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.326\"\n },\n {\n \"contents\": - \"message-29\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.331\"\n - \ },\n {\n \"contents\": \"message-34\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.336\"\n },\n {\n \"contents\": - \"message-39\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.341\"\n - \ },\n {\n \"contents\": \"message-44\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.347\"\n },\n {\n \"contents\": - \"message-49\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.352\"\n - \ },\n {\n \"contents\": \"message-54\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.357\"\n },\n {\n \"contents\": - \"message-59\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.363\"\n - \ },\n {\n \"contents\": \"message-64\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.368\"\n },\n {\n \"contents\": - \"message-69\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.373\"\n - \ },\n {\n \"contents\": \"message-74\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.378\"\n },\n {\n \"contents\": - \"message-79\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.384\"\n - \ },\n {\n \"contents\": \"message-84\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.389\"\n },\n {\n \"contents\": - \"message-89\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.394\"\n - \ },\n {\n \"contents\": \"message-94\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.400\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.405 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.506\",\n - \ \"entries\": [\n {\n \"contents\": \"message-99\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.405\"\n },\n {\n \"contents\": - \"message-104\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.410\"\n },\n {\n \"contents\": \"message-109\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.415\"\n },\n {\n \"contents\": - \"message-114\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.421\"\n },\n {\n \"contents\": \"message-119\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.426\"\n },\n {\n \"contents\": - \"message-124\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.431\"\n },\n {\n \"contents\": \"message-129\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.437\"\n },\n {\n \"contents\": - \"message-134\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.442\"\n },\n {\n \"contents\": \"message-139\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.447\"\n },\n {\n \"contents\": - \"message-144\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.452\"\n },\n {\n \"contents\": \"message-149\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.458\"\n },\n {\n \"contents\": - \"message-154\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.463\"\n },\n {\n \"contents\": \"message-159\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.468\"\n },\n {\n \"contents\": - \"message-164\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.474\"\n },\n {\n \"contents\": \"message-169\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.479\"\n },\n {\n \"contents\": - \"message-174\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.484\"\n },\n {\n \"contents\": \"message-179\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.490\"\n },\n {\n \"contents\": - \"message-184\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.495\"\n },\n {\n \"contents\": \"message-189\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.500\"\n },\n {\n \"contents\": - \"message-194\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.505\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2198' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.506 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-199\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.511\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '144' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.513' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_user_management.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_user_management.yaml deleted file mode 100644 index 9722a094efcc..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_user_management.yaml +++ /dev/null @@ -1,196 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: - - '80' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.514' - status: - code: 200 - message: OK -- request: - body: '{"assignedRole": "Contributor"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '31' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '78' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.515' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '78' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.515' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: - - '0' - x-ms-ccf-transaction-id: - - '2.517' - status: - code: 204 - message: No Content -- request: - body: '{"assignedRole": "Reader"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '73' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.518' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '73' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.518' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: - - '0' - x-ms-ccf-transaction-id: - - '2.519' - status: - code: 204 - message: No Content -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_verification_methods.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_verification_methods.yaml deleted file mode 100644 index 207ca52ef795..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad.test_verification_methods.yaml +++ /dev/null @@ -1,401 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: - - '80' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.520' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview - response: - body: - string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB+DCCAX2gAwIBAgIQbqIwsiHHQlWkhweK0NbPODAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjAxMTExMjAyNDUwWhcN\nMjExMTExMjAzNDUwWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAATTFBoe5FRZTXSQn5ZGl7BV40FpF6fvK3mj\nuDbh3BpAFCC9eXIU9nrGEEoaWH2n++c0TXuaR9TlXEm1ms47YMGmvr/epdI2Qgd6\nBC6bwYfMoRFVH/+G+itRj70ywY+lqrmjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBQefKdvzGwngW5bffiMcfFhoBYtNzAdBgNVHQ4EFgQUHnynb8xsJ4FuW334jHHx\nYaAWLTcwCgYIKoZIzj0EAwMDaQAwZgIxAKb40n899np5eoAei4YatmJ9P2kdGyGP\nqQBslkobR/Gb++QAHbFoD4m2tANPtpmYJAIxANklOHFie1OSLVwzl3n8zBbt1+KX\naH1qYPDr3MzPfvSBq7ckBGem2C6EEX4ratWAGQ==\n-----END - CERTIFICATE-----","id":"eec5d23a0f376538a34cccb35705cad4850741dcf82cd9ec39d3972aabc58a72"}]}' - headers: - content-length: - - '860' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.521' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview - response: - body: - string: '{"digest":"f1167f64777c56b6e2d14615b6b2ada50a5db07b83ae724500f7a7313c9461da","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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const - groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} - is not a valid URL.`);\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(\"?\");\n if - (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type - = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) - {\n throw new Error(`${field} must be an array`);\n }\n } else if - (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw - new Error(`${field} must be an integer`);\n }\n } else if (typeof value - !== type) {\n throw new Error(`${field} must be of type ${type} but is - ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if - (!members.includes(value)) {\n throw new Error(`${field} must be one of - ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if - (low !== null && value < low) {\n throw new Error(`${field} must be greater - than ${low}`);\n }\n if (high !== null && value > high) {\n throw new - Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, - min, max, field) {\n if (min !== null && value.length < min) {\n throw - new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if - (max !== null && value.length > max) {\n throw new Error(`${field} must - be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) - {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal - does not accept any argument, found \"${args}\"`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, - k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if - (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} - has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if - (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return - activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, - \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for - (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", - `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, - \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, - `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) - {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const - pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END - CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction - checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) - {\n throw new Error(\n `${field} must be a valid X509 certificate - (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) - {\n let proposals = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n const - proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n proposalsMap.forEach((v, - k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) - {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === - \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, - ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions - = new Map([\n [\n \"set_constitution\",\n new Action(\n function - (args) {\n checkType(args.constitution, \"string\");\n },\n function - (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, - \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } - else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 - = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const - rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if - (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } - else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const - ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n },\n function (args) {\n const rawMemberId - = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if - (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const - memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember - = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 - && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const - activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) - {\n throw new Error(\n `Number of active recovery - members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold - (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if - (isActiveMember && 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 \"set_member_data\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function - (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let - members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info - = members_info.get(member_id);\n if (member_info === undefined) {\n throw - new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, - \"object?\", \"user_data\");\n },\n function (args) {\n let - userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n },\n function (args) {\n const user_id = - ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function - (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId - = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function - (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n let - userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new - Action(\n function (args) {\n checkType(args.recovery_threshold, - \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, - 1, 254, \"threshold\");\n },\n function (args) {\n const - rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\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[\"public:ccf.gov.service.info\"].get(\n getSingletonKvKey()\n );\n if - (rawService === undefined) {\n throw new Error(\"Service information - could not be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if - (service.status === \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot - set recovery threshold if service is ${service.status}`\n );\n } - else if (service.status === \"Open\") {\n let activeRecoveryMembersCount - = getActiveRecoveryMembersCount();\n if (args.recovery_threshold - > activeRecoveryMembersCount) {\n throw new Error(\n `Cannot - set recovery threshold to ${args.recovery_threshold}: recovery threshold would - be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n\n config.recovery_threshold - = args.recovery_threshold;\n ccf.kv[\"public:ccf.gov.service.config\"].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n function - (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \"set_js_app\",\n new - Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, - \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, - \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) - {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, - \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", - `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, - \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", - `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) - {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for - (const [method, info] of Object.entries(endpoint)) {\n const prefix2 - = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, - \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, - \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", - \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", - \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, - \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for - (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, - \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if - (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw - new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n },\n function - (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const - endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should - expose .clear()\n modulesMap.forEach((_, k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n\n const bundle - = args.bundle;\n for (const module of bundle.modules) {\n const - path = \"/\" + 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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module - = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, - infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new - Action(\n function (args) { },\n function (args) {\n const - modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const endpointsMap - = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should expose .clear()\n modulesMap.forEach((_, - k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, - bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n },\n function (args) {\n const name = args.name;\n const - nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, - \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, - [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", - \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, - \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, - \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) - {\n throw new Error(\n \"ca_cert_bundle_name is missing - but required if auto_refresh is true\"\n );\n }\n let - url;\n try {\n url = parseUrl(args.issuer);\n } - catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh - is true\");\n }\n if (url.scheme != \"https\") {\n throw - new Error(\n \"issuer must be a URL starting with https:// if - auto_refresh is true\"\n );\n }\n if (url.query - || url.fragment) {\n throw new Error(\n \"issuer must - be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) - {\n throw new Error(\n `No CA cert bundle found with - name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, - metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function - (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const - metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if - (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} - not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const - jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n },\n function (args) {\n const issuerBuf = - ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) - {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \"add_node_code\",\n new - Action(\n function (args) {\n checkType(args.new_code_id, \"string\", - \"new_code_id\");\n checkType(args.existing_code_id, \"string\", \"existing_code_id\");\n },\n function - (args, proposalId) {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if - (existingCode === undefined) {\n throw new Error(`Code required to - exist is not present: ${args.existing_code_id}`);\n }\n\n const - newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"transition_node_to_trusted\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const - nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === - \"Pending\") {\n nodeInfo.status = \"Trusted\";\n nodeInfo.ledger_secret_seqno - = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \"remove_node_code\",\n new - Action(\n function (args) {\n checkType(args.code_id_to_remove, - \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, - \"string\", \"remaining_code_id\");\n },\n function (args) {\n const - remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if - (remainingCode === undefined) {\n throw new Error(`Code required - to remain is not present: ${args.remaining_code_id}`);\n }\n\n const - codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status - = \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, - \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function - (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport - function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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[\"public:ccf.gov.members.info\"].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 // Some actions can always be called by operators.\n const allowedOperatorActions - = [\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 - === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if - (memberData && memberData.is_operator) {\n return true;\n }\n } else - if (action.name === \"remove_member\") {\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)[\"actions\"];\n\n // - Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote - && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding - operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, - key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if - (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // - A proposal is an operator change if it''s only applying operator actions.\n const - isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members - can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount - / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator - changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) - {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function - validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let - position = 0;\n for (const action of proposal[\"actions\"]) {\n const - definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } - catch (e) {\n errors.push(\n `${action.name} at position ${position} - failed validation: ${e}\\n${e.stack}`\n );\n }\n } else {\n errors.push(`${action.name}: - no such action`);\n }\n position++;\n }\n return { valid: errors.length - === 0, description: errors.join(\", \") };\n}\n"}' - headers: - content-length: - - '30912' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.521' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview - response: - body: - string: '{"currentNodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","enclaveQuotes":{"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074fca16e1b382cc4d9313fca5acbf408b0000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b29f6c95262f276c27d647ad544333f705abc0d492c1bb6c8c5e85cd5349cf800000000000000000000000000000000000000000000000000000000000000003410000061af278ff696604a85f21ef449253c0d0053cefafddc13716293cde909aa5258b6f21ed480e8411418632b768a16a790c4efee2b69278a2b72ccc8411a59fa6e8eb0721568eb8eefb5ffe48d4c0535ccbd637f6998f30d252334d093bfe489707cef9b5abbe51428ff6feb0d5590723896f7e3d8466e7c4c7f661f5588b1cbc011110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045566c39ee9249e7f197a87256fd7267ac67bec7f27e6133d95306656244366e00000000000000000000000000000000000000000000000000000000000000007d1cada36a9e54bde941973bd2de03d5304bffdd775474aec6d38207272d9226a3e9e0314555d3960507f3224cf7d2009d75c8b968071fc31094a3dfb999c1e42000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436167417749424167495545646d6b4833625131367152525856766e73307369596b3979495577436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4449784d4449794d5455774e466f58445449344d4449784d4449794d5455770a4e466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414152680a5247587236365079506673764a55444a666158563841575957586768454e6b784638614d6d3471396a5a543546356d2f4d446b466365724a735a486c6d2b58710a4471673138452f344f416e39622f70344e366d796f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d42304741315564446751574242537956634a3754335950586f383059535762493759504e514233506a414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e4151454545475a445038395a483248673435704f4f5337372b564d776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b45304244514543415149424554415142677371686b69472b45304244514543416749424554415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454245524167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445351417752674968414a497245793530694b564857596f70573844500a56525366306859546f7232535830674b4f517569354f644241694541354d6351674a7a615550497a456342714c7970554a646a6a5a6e694c77686458387a75520a496458303244593d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee"},"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074873041a31fa9e99c28726074c95f0110000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cbf1112f99fb6a724779ee53b9caf70408fa5408bb7f309ae29ce550b583b7a0000000000000000000000000000000000000000000000000000000000000000341000004d5c886623f85f5223e27226dd322449239a5c3cccc355503a18f85d62b7823d2d0bc53f9c631483f96a85a5b9c55a30bcfa90cdb697d7fee0d7dd41ed111917f90fc89d9b26a4f817549ca484f845ccdd2e7a58317ef86498dc72f884122fcb744c534915ab067517627d73b1984d14196a6cb2ecc8f86bf62a81b535213e0411110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f588dbf7520c9e3cc41fff530db8b42141a25b1f84f167963cb1305d0557d130000000000000000000000000000000000000000000000000000000000000000cc63294e9101303c80d2cf7b5ff71a272506220378e2f50331a69cbf1eab6b76fc4b70eb794e6650c41220f4dbb5c2ab583ec153d1eddf72f5b34fc82b8621542000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436567417749424167495641495a565a7a647836376f5348596b535a47696b2f7a764f715a4d554d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d5463774e5441304e444e61467730794f44417a4d5463774e5441300a4e444e614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4f63727649474473437751544e6535344135436c444d3864542f78627a4c476b50614932617352555a56392b3367712b5855626d486731724631462f534f6d700a6337576759624737747a70716e662b7a67324e4250614f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e564851344546675155685539616b6630615270427168507145587378754e736a2f6672457744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b453042445145424242435070554b3474472b5243415148592b7353395a76644d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434944644e6a44357953615a6f703678436f6344620a424f752f6976504550647663326b6a78356a744b79715a374169454135666c716a51596c5235435339746b2f3678777a7a4a514331794f34374f4556776950430a2f44306756384d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076"},"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f060754a876d8093c9425005f2e6815d530010000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cffd2506bd7388597f99ac20e4a744e498ff0ef505108c34368f1f731247e43000000000000000000000000000000000000000000000000000000000000000034100000c369dfe6412619ce5c1bf9026f7fcbfdd79ae58aa1053c2cad78356e614240701f60ba69220f9cbd8592d40cbf1f477a13a253dbb45bd242580ccb9f11f912ea06834e14e82c9982eb6cee7471e3b13721661ece0a68458b0948b26ed53322b58dbf3252283ce9fe4703d59aff2003d8f94c5b61722eefd439c735d7e40b0e9a11110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000751ade3621fe0e0e62fdfda76b32e7524bd87388a96e0a98ace244c95a8965b500000000000000000000000000000000000000000000000000000000000000000322ce315e71a60490bddf773f32b059f4cce7b435d550e2c1cd34aa7faf1cf4d06858ceb9ff5b8fa2aa9d3ba7a564c53853ca78ea6e1175e02b185f94ec4e852000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d49494567544343424365674177494241674956414c546d71796a394e4363724f414844654849486f6c754d565758464d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d6a4d774f544d304e546c61467730794f44417a4d6a4d774f544d300a4e546c614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a715165687944707854673273444b6849772b64454f2b42647536527039586f516e6c3359322f6a32497455566e524374704236484c707943325a45614d6853610a4b716c6f436476715674426872504f7364377374474b4f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e5648513445466751552f724673795665793276384e58594e354178754c766177586868347744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b4530424451454242424132346f6d696e7451356a58772f325543756237766b4d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543494252454b346b4c5559532b766149336436536d0a6668564f613642726d4c43316d50314b7265346f52456262416945416d78325a496f506f36584838303839576668746f6539356b6345733432507050343152370a643544467167513d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3"}}}' - headers: - content-length: - - '28866' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.521' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow.yaml deleted file mode 100644 index b05bb109caf7..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow.yaml +++ /dev/null @@ -1,308 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: '80' - content-type: application/json - x-ms-ccf-transaction-id: '2.522' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/e76336f1-cae2-492f-84bc-bfcbb6503c9b?api-version=0.1-preview -- request: - body: '{"contents": "Test entry from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: '29' - content-type: application/json - x-ms-ccf-transaction-id: '2.523' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.523"}' - headers: - content-length: '43' - content-type: application/json - x-ms-ccf-transaction-id: '2.523' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.523"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.523"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"ed4fc3e80c0800a4082074035175de8ba35ba0acf6cbb731c18ac92ed6d495c6\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"2fa646a9a1b32d88eafbb6f55719624d8e53f6fd3af35fa292fe5e37614adfb5\"\n - \ },\n {\n \"left\": \"fd4e193fe0da000288c244dd46d86864d7ef1c31cfcd37004c0130430feaa9af\"\n - \ },\n {\n \"left\": \"2d15aad9e53287b86dfb344475c33929836acbff845fd83406bbc0a443c843a6\"\n - \ },\n {\n \"left\": \"350d1ee3e0e7c1956d536f0ba67a81b793eefd5f6fba139f5a739fafeb5fa098\"\n - \ }\n ],\n \"root\": \"d5ab22acdb42f81899651a9a7e2fb9e5a5400580c57b02b65f111b8c7d51ab60\",\n - \ \"signature\": \"MEYCIQCGBWRXi+kiPaDUMN287muBSLMZ8IqnPIEm5HH/y62fgQIhAO77VJGOSXEneBl5Mk8hLj/oeWDPK0+fVP9Pl2kCVGiT\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.523\"\n}" - headers: - content-length: '850' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry from Python SDK","subLedgerId":"subledger:0","transactionId":"2.524"}' - headers: - content-length: '93' - content-type: application/json - x-ms-ccf-transaction-id: '2.524' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview -- request: - body: '{"contents": "Test entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: '29' - content-type: application/json - x-ms-ccf-transaction-id: '2.525' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.525/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.525"}' - headers: - content-length: '43' - content-type: application/json - x-ms-ccf-transaction-id: '2.525' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.525/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.525/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.525"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.526' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.525/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry 2 from Python SDK","subLedgerId":"subledger:0","transactionId":"2.526"}' - headers: - content-length: '95' - content-type: application/json - x-ms-ccf-transaction-id: '2.526' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.523?api-version=0.1-preview - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test entry from Python SDK\",\n - \ \"subLedgerId\": \"subledger:0\",\n \"transactionId\": \"2.523\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: '149' - content-type: application/json - x-ms-ccf-transaction-id: '2.526' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.523?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow_with_sub_ledger_id.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow_with_sub_ledger_id.yaml deleted file mode 100644 index 46d8520f0c2a..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_append_entry_flow_with_sub_ledger_id.yaml +++ /dev/null @@ -1,305 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: '80' - content-type: application/json - x-ms-ccf-transaction-id: '2.527' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/e76336f1-cae2-492f-84bc-bfcbb6503c9b?api-version=0.1-preview -- request: - body: '{"contents": "Test sub-ledger entry from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '53' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: '21' - content-type: application/json - x-ms-ccf-transaction-id: '2.529' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.529"}' - headers: - content-length: '43' - content-type: application/json - x-ms-ccf-transaction-id: '2.529' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.529"}' - headers: - content-length: '43' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.529"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.529"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"629feca0851ff3ae5005d9bd14be821332295d2b5ca4eeb57eae8f942aa6fb78\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"60882dd1f10c2b2a0edbee726654028b342c7eebfccf0990570c871f65f04f04\"\n - \ },\n {\n \"left\": \"b1fee9d1f605edc0605916d64688dd129f4a00c805dd4d2d81b50f78c0272293\"\n - \ },\n {\n \"left\": \"350d1ee3e0e7c1956d536f0ba67a81b793eefd5f6fba139f5a739fafeb5fa098\"\n - \ }\n ],\n \"root\": \"114116eb3c04eed6d25c3041d4773b77b63d6fec3fca233d719c9d4e72d6379a\",\n - \ \"signature\": \"MEUCIQDWXsksVItpUb5sbD4t4RYWEDpisAGvxUB8wRx7bZwefgIgJFzGUUwPGUxSyKvuVA/BYWk/4ttr8hC0djVQzHvbrC8=\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.529\"\n}" - headers: - content-length: '750' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry from Python SDK","subLedgerId":"132","transactionId":"2.530"}' - headers: - content-length: '96' - content-type: application/json - x-ms-ccf-transaction-id: '2.530' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 -- request: - body: '{"contents": "Test sub-ledger entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: '21' - content-type: application/json - x-ms-ccf-transaction-id: '2.531' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.531/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.531"}' - headers: - content-length: '43' - content-type: application/json - x-ms-ccf-transaction-id: '2.531' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.531/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.531/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.531"}' - headers: - content-length: '45' - content-type: application/json - x-ms-ccf-transaction-id: '2.532' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.531/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry 2 from Python SDK","subLedgerId":"132","transactionId":"2.532"}' - headers: - content-length: '98' - content-type: application/json - x-ms-ccf-transaction-id: '2.532' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.529?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test sub-ledger entry from Python - SDK\",\n \"subLedgerId\": \"132\",\n \"transactionId\": \"2.529\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: '152' - content-type: application/json - x-ms-ccf-transaction-id: '2.532' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.529?api-version=0.1-preview&subLedgerId=132 -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_range_query.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_range_query.yaml deleted file mode 100644 index e6a23db1dd42..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_range_query.yaml +++ /dev/null @@ -1,5881 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: '80' - content-type: application/json - x-ms-ccf-transaction-id: '2.533' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/e76336f1-cae2-492f-84bc-bfcbb6503c9b?api-version=0.1-preview -- request: - body: '{"contents": "message-0"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.535' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-1"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.536' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-2"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.537' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-3"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.538' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-4"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.540' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-5"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.541' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-6"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.542' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-7"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.543' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-8"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.544' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-9"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.546' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-10"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.547' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-11"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.548' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-12"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.549' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-13"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.551' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-14"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.552' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-15"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.553' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-16"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.554' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-17"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.555' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-18"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.557' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-19"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.558' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-20"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.559' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-21"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.560' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-22"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.562' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-23"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.563' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-24"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.564' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-25"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.565' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-26"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.566' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-27"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.568' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-28"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.569' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-29"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.570' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-30"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.571' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-31"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.573' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-32"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.574' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-33"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.575' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-34"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.576' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-35"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.578' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-36"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.579' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-37"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.580' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-38"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.581' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-39"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.583' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-40"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.584' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-41"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.585' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-42"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.587' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-43"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.588' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-44"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.589' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-45"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.590' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-46"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.592' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-47"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.593' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-48"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.594' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-49"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.595' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-50"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.597' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-51"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.598' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-52"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.599' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-53"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.600' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-54"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.602' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-55"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.603' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-56"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.604' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-57"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.605' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-58"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.607' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-59"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.608' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-60"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.609' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-61"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.610' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-62"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.612' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-63"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.613' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-64"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.614' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-65"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.615' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-66"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.617' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-67"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.618' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-68"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.619' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-69"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.620' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-70"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.622' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-71"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.623' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-72"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.624' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-73"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.625' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-74"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.626' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-75"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.628' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-76"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.629' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-77"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.630' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-78"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.631' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-79"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.632' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-80"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.634' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-81"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.635' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-82"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.636' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-83"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.637' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-84"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.639' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-85"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.640' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-86"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.641' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-87"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.642' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-88"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.644' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-89"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.645' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-90"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.646' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-91"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.647' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-92"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.649' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-93"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.650' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-94"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.651' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-95"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.652' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-96"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.653' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-97"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.655' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-98"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.656' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-99"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.657' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-100"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.658' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-101"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.659' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-102"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.661' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-103"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.662' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-104"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.663' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-105"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.665' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-106"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.666' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-107"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.667' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-108"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.668' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-109"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.670' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-110"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.671' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-111"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.672' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-112"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.673' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-113"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.675' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-114"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.676' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-115"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.677' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-116"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.678' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-117"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.679' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-118"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.681' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-119"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.682' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-120"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.683' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-121"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.684' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-122"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.685' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-123"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.687' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-124"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.688' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-125"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.689' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-126"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.690' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-127"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.692' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-128"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.693' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-129"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.694' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-130"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.695' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-131"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.697' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-132"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.698' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-133"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.699' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-134"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.700' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-135"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.702' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-136"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.703' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-137"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.704' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-138"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.705' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-139"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.707' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-140"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.708' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-141"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.709' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-142"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.710' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-143"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.712' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-144"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.713' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-145"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.714' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-146"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.716' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-147"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.717' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-148"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.718' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-149"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.719' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-150"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.720' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-151"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.722' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-152"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.723' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-153"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.724' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-154"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.725' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-155"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.727' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-156"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.728' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-157"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.729' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-158"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.730' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-159"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.732' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-160"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.733' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-161"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.734' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-162"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.735' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-163"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.736' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-164"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.738' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-165"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.739' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-166"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.740' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-167"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.741' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-168"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.743' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-169"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.744' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-170"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.745' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-171"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.746' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-172"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.747' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-173"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.749' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-174"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.750' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-175"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.751' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-176"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.752' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-177"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.754' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-178"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.755' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-179"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.756' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-180"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.757' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-181"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.759' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-182"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.760' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-183"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.761' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-184"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.762' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-185"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.763' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-186"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.765' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-187"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.766' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-188"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.767' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-189"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.768' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-190"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.770' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-191"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.771' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-192"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.772' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-193"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.773' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-194"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.774' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-195"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.775' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-196"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.776' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-197"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.777' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-198"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.778' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-199"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.780' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-200"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.781' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.781' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.781' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636\",\n - \ \"entries\": [\n {\n \"contents\": \"message-0\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.535\"\n },\n {\n \"contents\": - \"message-5\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.541\"\n - \ },\n {\n \"contents\": \"message-10\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.547\"\n },\n {\n \"contents\": - \"message-15\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.553\"\n - \ },\n {\n \"contents\": \"message-20\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.559\"\n },\n {\n \"contents\": - \"message-25\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.565\"\n - \ },\n {\n \"contents\": \"message-30\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.571\"\n },\n {\n \"contents\": - \"message-35\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.578\"\n - \ },\n {\n \"contents\": \"message-40\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.584\"\n },\n {\n \"contents\": - \"message-45\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.590\"\n - \ },\n {\n \"contents\": \"message-50\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.597\"\n },\n {\n \"contents\": - \"message-55\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.603\"\n - \ },\n {\n \"contents\": \"message-60\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.609\"\n },\n {\n \"contents\": - \"message-65\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.615\"\n - \ },\n {\n \"contents\": \"message-70\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.622\"\n },\n {\n \"contents\": - \"message-75\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.628\"\n - \ },\n {\n \"contents\": \"message-80\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.634\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1871' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.535 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.737\",\n - \ \"entries\": [\n {\n \"contents\": \"message-85\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.640\"\n },\n {\n \"contents\": - \"message-90\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.646\"\n - \ },\n {\n \"contents\": \"message-95\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.652\"\n },\n {\n \"contents\": - \"message-100\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.658\"\n },\n {\n \"contents\": \"message-105\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.665\"\n },\n {\n \"contents\": - \"message-110\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.671\"\n },\n {\n \"contents\": \"message-115\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.677\"\n },\n {\n \"contents\": - \"message-120\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.683\"\n },\n {\n \"contents\": \"message-125\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.689\"\n },\n {\n \"contents\": - \"message-130\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.695\"\n },\n {\n \"contents\": \"message-135\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.702\"\n },\n {\n \"contents\": - \"message-140\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.708\"\n },\n {\n \"contents\": \"message-145\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.714\"\n },\n {\n \"contents\": - \"message-150\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.720\"\n },\n {\n \"contents\": \"message-155\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.727\"\n },\n {\n \"contents\": - \"message-160\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.733\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1784' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.636 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.737 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-165\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.739\"\n },\n - \ {\n \"contents\": \"message-170\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.745\"\n },\n {\n \"contents\": \"message-175\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.751\"\n },\n - \ {\n \"contents\": \"message-180\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.757\"\n },\n {\n \"contents\": \"message-185\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.763\"\n },\n - \ {\n \"contents\": \"message-190\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.770\"\n },\n {\n \"contents\": \"message-195\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.775\"\n },\n - \ {\n \"contents\": \"message-200\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.781\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '865' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.737 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.637\",\n - \ \"entries\": [\n {\n \"contents\": \"message-1\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.536\"\n },\n {\n \"contents\": - \"message-6\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.542\"\n - \ },\n {\n \"contents\": \"message-11\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.548\"\n },\n {\n \"contents\": - \"message-16\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.554\"\n - \ },\n {\n \"contents\": \"message-21\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.560\"\n },\n {\n \"contents\": - \"message-26\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.566\"\n - \ },\n {\n \"contents\": \"message-31\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.573\"\n },\n {\n \"contents\": - \"message-36\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.579\"\n - \ },\n {\n \"contents\": \"message-41\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.585\"\n },\n {\n \"contents\": - \"message-46\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.592\"\n - \ },\n {\n \"contents\": \"message-51\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.598\"\n },\n {\n \"contents\": - \"message-56\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.604\"\n - \ },\n {\n \"contents\": \"message-61\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.610\"\n },\n {\n \"contents\": - \"message-66\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.617\"\n - \ },\n {\n \"contents\": \"message-71\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.623\"\n },\n {\n \"contents\": - \"message-76\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.629\"\n - \ },\n {\n \"contents\": \"message-81\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.635\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1871' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.536 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.637 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738\",\n - \ \"entries\": [\n {\n \"contents\": \"message-86\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.641\"\n },\n {\n \"contents\": - \"message-91\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.647\"\n - \ },\n {\n \"contents\": \"message-96\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.653\"\n },\n {\n \"contents\": - \"message-101\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.659\"\n },\n {\n \"contents\": \"message-106\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.666\"\n },\n {\n \"contents\": - \"message-111\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.672\"\n },\n {\n \"contents\": \"message-116\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.678\"\n },\n {\n \"contents\": - \"message-121\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.684\"\n },\n {\n \"contents\": \"message-126\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.690\"\n },\n {\n \"contents\": - \"message-131\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.697\"\n },\n {\n \"contents\": \"message-136\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.703\"\n },\n {\n \"contents\": - \"message-141\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.709\"\n },\n {\n \"contents\": \"message-146\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.716\"\n },\n {\n \"contents\": - \"message-151\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.722\"\n },\n {\n \"contents\": \"message-156\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.728\"\n },\n {\n \"contents\": - \"message-161\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.734\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1784' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.637 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-166\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.740\"\n },\n - \ {\n \"contents\": \"message-171\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.746\"\n },\n {\n \"contents\": \"message-176\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.752\"\n },\n - \ {\n \"contents\": \"message-181\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.759\"\n },\n {\n \"contents\": \"message-186\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.765\"\n },\n - \ {\n \"contents\": \"message-191\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.771\"\n },\n {\n \"contents\": \"message-196\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.776\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '762' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.738 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638\",\n - \ \"entries\": [\n {\n \"contents\": \"message-2\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.537\"\n },\n {\n \"contents\": - \"message-7\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.543\"\n - \ },\n {\n \"contents\": \"message-12\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.549\"\n },\n {\n \"contents\": - \"message-17\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.555\"\n - \ },\n {\n \"contents\": \"message-22\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.562\"\n },\n {\n \"contents\": - \"message-27\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.568\"\n - \ },\n {\n \"contents\": \"message-32\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.574\"\n },\n {\n \"contents\": - \"message-37\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.580\"\n - \ },\n {\n \"contents\": \"message-42\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.587\"\n },\n {\n \"contents\": - \"message-47\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.593\"\n - \ },\n {\n \"contents\": \"message-52\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.599\"\n },\n {\n \"contents\": - \"message-57\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.605\"\n - \ },\n {\n \"contents\": \"message-62\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.612\"\n },\n {\n \"contents\": - \"message-67\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.618\"\n - \ },\n {\n \"contents\": \"message-72\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.624\"\n },\n {\n \"contents\": - \"message-77\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.630\"\n - \ },\n {\n \"contents\": \"message-82\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.636\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1871' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.537 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739\",\n - \ \"entries\": [\n {\n \"contents\": \"message-87\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.642\"\n },\n {\n \"contents\": - \"message-92\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.649\"\n - \ },\n {\n \"contents\": \"message-97\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.655\"\n },\n {\n \"contents\": - \"message-102\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.661\"\n },\n {\n \"contents\": \"message-107\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.667\"\n },\n {\n \"contents\": - \"message-112\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.673\"\n },\n {\n \"contents\": \"message-117\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.679\"\n },\n {\n \"contents\": - \"message-122\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.685\"\n },\n {\n \"contents\": \"message-127\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.692\"\n },\n {\n \"contents\": - \"message-132\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.698\"\n },\n {\n \"contents\": \"message-137\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.704\"\n },\n {\n \"contents\": - \"message-142\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.710\"\n },\n {\n \"contents\": \"message-147\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.717\"\n },\n {\n \"contents\": - \"message-152\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.723\"\n },\n {\n \"contents\": \"message-157\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.729\"\n },\n {\n \"contents\": - \"message-162\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.735\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1784' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.638 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-167\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.741\"\n },\n - \ {\n \"contents\": \"message-172\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.747\"\n },\n {\n \"contents\": \"message-177\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.754\"\n },\n - \ {\n \"contents\": \"message-182\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.760\"\n },\n {\n \"contents\": \"message-187\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.766\"\n },\n - \ {\n \"contents\": \"message-192\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.772\"\n },\n {\n \"contents\": \"message-197\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.777\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '762' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.739 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.538 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.538\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.538 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.538 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.639\",\n - \ \"entries\": [\n {\n \"contents\": \"message-3\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.538\"\n },\n {\n \"contents\": - \"message-8\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.544\"\n - \ },\n {\n \"contents\": \"message-13\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.551\"\n },\n {\n \"contents\": - \"message-18\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.557\"\n - \ },\n {\n \"contents\": \"message-23\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.563\"\n },\n {\n \"contents\": - \"message-28\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.569\"\n - \ },\n {\n \"contents\": \"message-33\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.575\"\n },\n {\n \"contents\": - \"message-38\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.581\"\n - \ },\n {\n \"contents\": \"message-43\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.588\"\n },\n {\n \"contents\": - \"message-48\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.594\"\n - \ },\n {\n \"contents\": \"message-53\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.600\"\n },\n {\n \"contents\": - \"message-58\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.607\"\n - \ },\n {\n \"contents\": \"message-63\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.613\"\n },\n {\n \"contents\": - \"message-68\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.619\"\n - \ },\n {\n \"contents\": \"message-73\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.625\"\n },\n {\n \"contents\": - \"message-78\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.631\"\n - \ },\n {\n \"contents\": \"message-83\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.637\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1871' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.538 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.639 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.740\",\n - \ \"entries\": [\n {\n \"contents\": \"message-88\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.644\"\n },\n {\n \"contents\": - \"message-93\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.650\"\n - \ },\n {\n \"contents\": \"message-98\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.656\"\n },\n {\n \"contents\": - \"message-103\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.662\"\n },\n {\n \"contents\": \"message-108\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.668\"\n },\n {\n \"contents\": - \"message-113\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.675\"\n },\n {\n \"contents\": \"message-118\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.681\"\n },\n {\n \"contents\": - \"message-123\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.687\"\n },\n {\n \"contents\": \"message-128\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.693\"\n },\n {\n \"contents\": - \"message-133\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.699\"\n },\n {\n \"contents\": \"message-138\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.705\"\n },\n {\n \"contents\": - \"message-143\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.712\"\n },\n {\n \"contents\": \"message-148\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.718\"\n },\n {\n \"contents\": - \"message-153\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.724\"\n },\n {\n \"contents\": \"message-158\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.730\"\n },\n {\n \"contents\": - \"message-163\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.736\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1784' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.639 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.740 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-168\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.743\"\n },\n - \ {\n \"contents\": \"message-173\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.749\"\n },\n {\n \"contents\": \"message-178\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.755\"\n },\n - \ {\n \"contents\": \"message-183\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.761\"\n },\n {\n \"contents\": \"message-188\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.767\"\n },\n - \ {\n \"contents\": \"message-193\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.773\"\n },\n {\n \"contents\": \"message-198\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.778\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '762' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.740 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641\",\n - \ \"entries\": [\n {\n \"contents\": \"message-4\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.540\"\n },\n {\n \"contents\": - \"message-9\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.546\"\n - \ },\n {\n \"contents\": \"message-14\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.552\"\n },\n {\n \"contents\": - \"message-19\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.558\"\n - \ },\n {\n \"contents\": \"message-24\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.564\"\n },\n {\n \"contents\": - \"message-29\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.570\"\n - \ },\n {\n \"contents\": \"message-34\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.576\"\n },\n {\n \"contents\": - \"message-39\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.583\"\n - \ },\n {\n \"contents\": \"message-44\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.589\"\n },\n {\n \"contents\": - \"message-49\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.595\"\n - \ },\n {\n \"contents\": \"message-54\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.602\"\n },\n {\n \"contents\": - \"message-59\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.608\"\n - \ },\n {\n \"contents\": \"message-64\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.614\"\n },\n {\n \"contents\": - \"message-69\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.620\"\n - \ },\n {\n \"contents\": \"message-74\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.626\"\n },\n {\n \"contents\": - \"message-79\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.632\"\n - \ },\n {\n \"contents\": \"message-84\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.639\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1871' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.540 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742\",\n - \ \"entries\": [\n {\n \"contents\": \"message-89\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.645\"\n },\n {\n \"contents\": - \"message-94\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.651\"\n - \ },\n {\n \"contents\": \"message-99\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.657\"\n },\n {\n \"contents\": - \"message-104\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.663\"\n },\n {\n \"contents\": \"message-109\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.670\"\n },\n {\n \"contents\": - \"message-114\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.676\"\n },\n {\n \"contents\": \"message-119\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.682\"\n },\n {\n \"contents\": - \"message-124\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.688\"\n },\n {\n \"contents\": \"message-129\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.694\"\n },\n {\n \"contents\": - \"message-134\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.700\"\n },\n {\n \"contents\": \"message-139\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.707\"\n },\n {\n \"contents\": - \"message-144\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.713\"\n },\n {\n \"contents\": \"message-149\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.719\"\n },\n {\n \"contents\": - \"message-154\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.725\"\n },\n {\n \"contents\": \"message-159\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.732\"\n },\n {\n \"contents\": - \"message-164\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.738\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1784' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.641 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '122' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-169\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.744\"\n },\n - \ {\n \"contents\": \"message-174\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.750\"\n },\n {\n \"contents\": \"message-179\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.756\"\n },\n - \ {\n \"contents\": \"message-184\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.762\"\n },\n {\n \"contents\": \"message-189\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.768\"\n },\n - \ {\n \"contents\": \"message-194\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.774\"\n },\n {\n \"contents\": \"message-199\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.780\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '762' - content-type: application/json - x-ms-ccf-transaction-id: '2.782' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.742 -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_user_management.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_user_management.yaml deleted file mode 100644 index 2a3c524d5f47..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_user_management.yaml +++ /dev/null @@ -1,152 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: '80' - content-type: application/json - x-ms-ccf-transaction-id: '2.783' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/e76336f1-cae2-492f-84bc-bfcbb6503c9b?api-version=0.1-preview -- request: - body: '{"assignedRole": "Contributor"}' - headers: - Accept: - - application/json - Content-Length: - - '31' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '78' - content-type: application/json - x-ms-ccf-transaction-id: '2.784' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '78' - content-type: application/json - x-ms-ccf-transaction-id: '2.784' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: '0' - x-ms-ccf-transaction-id: '2.785' - status: - code: 204 - message: No Content - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: '{"assignedRole": "Reader"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '73' - content-type: application/json - x-ms-ccf-transaction-id: '2.787' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '73' - content-type: application/json - x-ms-ccf-transaction-id: '2.787' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: '0' - x-ms-ccf-transaction-id: '2.788' - status: - code: 204 - message: No Content - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_verification_methods.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_verification_methods.yaml deleted file mode 100644 index 7894e35dde74..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_aad_async.test_verification_methods.yaml +++ /dev/null @@ -1,377 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Administrator"}' - headers: - Accept: - - application/json - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Administrator","userId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}' - headers: - content-length: '80' - content-type: application/json - x-ms-ccf-transaction-id: '2.789' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/e76336f1-cae2-492f-84bc-bfcbb6503c9b?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview - response: - body: - string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB+DCCAX2gAwIBAgIQbqIwsiHHQlWkhweK0NbPODAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjAxMTExMjAyNDUwWhcN\nMjExMTExMjAzNDUwWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAATTFBoe5FRZTXSQn5ZGl7BV40FpF6fvK3mj\nuDbh3BpAFCC9eXIU9nrGEEoaWH2n++c0TXuaR9TlXEm1ms47YMGmvr/epdI2Qgd6\nBC6bwYfMoRFVH/+G+itRj70ywY+lqrmjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBQefKdvzGwngW5bffiMcfFhoBYtNzAdBgNVHQ4EFgQUHnynb8xsJ4FuW334jHHx\nYaAWLTcwCgYIKoZIzj0EAwMDaQAwZgIxAKb40n899np5eoAei4YatmJ9P2kdGyGP\nqQBslkobR/Gb++QAHbFoD4m2tANPtpmYJAIxANklOHFie1OSLVwzl3n8zBbt1+KX\naH1qYPDr3MzPfvSBq7ckBGem2C6EEX4ratWAGQ==\n-----END - CERTIFICATE-----","id":"eec5d23a0f376538a34cccb35705cad4850741dcf82cd9ec39d3972aabc58a72"}]}' - headers: - content-length: '860' - content-type: application/json - x-ms-ccf-transaction-id: '2.789' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/governance/members?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview - response: - body: - string: '{"digest":"f1167f64777c56b6e2d14615b6b2ada50a5db07b83ae724500f7a7313c9461da","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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const - groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} - is not a valid URL.`);\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(\"?\");\n if - (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type - = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) - {\n throw new Error(`${field} must be an array`);\n }\n } else if - (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw - new Error(`${field} must be an integer`);\n }\n } else if (typeof value - !== type) {\n throw new Error(`${field} must be of type ${type} but is - ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if - (!members.includes(value)) {\n throw new Error(`${field} must be one of - ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if - (low !== null && value < low) {\n throw new Error(`${field} must be greater - than ${low}`);\n }\n if (high !== null && value > high) {\n throw new - Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, - min, max, field) {\n if (min !== null && value.length < min) {\n throw - new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if - (max !== null && value.length > max) {\n throw new Error(`${field} must - be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) - {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal - does not accept any argument, found \"${args}\"`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, - k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if - (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} - has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if - (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return - activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, - \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for - (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", - `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, - \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, - `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) - {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const - pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END - CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction - checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) - {\n throw new Error(\n `${field} must be a valid X509 certificate - (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) - {\n let proposals = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n const - proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n proposalsMap.forEach((v, - k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) - {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === - \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, - ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions - = new Map([\n [\n \"set_constitution\",\n new Action(\n function - (args) {\n checkType(args.constitution, \"string\");\n },\n function - (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, - \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } - else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 - = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const - rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if - (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } - else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const - ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n },\n function (args) {\n const rawMemberId - = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if - (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const - memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember - = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 - && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const - activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) - {\n throw new Error(\n `Number of active recovery - members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold - (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if - (isActiveMember && 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 \"set_member_data\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function - (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let - members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info - = members_info.get(member_id);\n if (member_info === undefined) {\n throw - new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, - \"object?\", \"user_data\");\n },\n function (args) {\n let - userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n },\n function (args) {\n const user_id = - ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function - (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId - = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function - (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n let - userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new - Action(\n function (args) {\n checkType(args.recovery_threshold, - \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, - 1, 254, \"threshold\");\n },\n function (args) {\n const - rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\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[\"public:ccf.gov.service.info\"].get(\n getSingletonKvKey()\n );\n if - (rawService === undefined) {\n throw new Error(\"Service information - could not be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if - (service.status === \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot - set recovery threshold if service is ${service.status}`\n );\n } - else if (service.status === \"Open\") {\n let activeRecoveryMembersCount - = getActiveRecoveryMembersCount();\n if (args.recovery_threshold - > activeRecoveryMembersCount) {\n throw new Error(\n `Cannot - set recovery threshold to ${args.recovery_threshold}: recovery threshold would - be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n\n config.recovery_threshold - = args.recovery_threshold;\n ccf.kv[\"public:ccf.gov.service.config\"].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n function - (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \"set_js_app\",\n new - Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, - \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, - \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) - {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, - \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", - `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, - \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", - `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) - {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for - (const [method, info] of Object.entries(endpoint)) {\n const prefix2 - = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, - \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, - \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", - \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", - \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, - \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for - (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, - \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if - (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw - new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n },\n function - (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const - endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should - expose .clear()\n modulesMap.forEach((_, k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n\n const bundle - = args.bundle;\n for (const module of bundle.modules) {\n const - path = \"/\" + 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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module - = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, - infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new - Action(\n function (args) { },\n function (args) {\n const - modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const endpointsMap - = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should expose .clear()\n modulesMap.forEach((_, - k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, - bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n },\n function (args) {\n const name = args.name;\n const - nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, - \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, - [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", - \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, - \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, - \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) - {\n throw new Error(\n \"ca_cert_bundle_name is missing - but required if auto_refresh is true\"\n );\n }\n let - url;\n try {\n url = parseUrl(args.issuer);\n } - catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh - is true\");\n }\n if (url.scheme != \"https\") {\n throw - new Error(\n \"issuer must be a URL starting with https:// if - auto_refresh is true\"\n );\n }\n if (url.query - || url.fragment) {\n throw new Error(\n \"issuer must - be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) - {\n throw new Error(\n `No CA cert bundle found with - name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, - metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function - (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const - metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if - (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} - not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const - jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n },\n function (args) {\n const issuerBuf = - ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) - {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \"add_node_code\",\n new - Action(\n function (args) {\n checkType(args.new_code_id, \"string\", - \"new_code_id\");\n checkType(args.existing_code_id, \"string\", \"existing_code_id\");\n },\n function - (args, proposalId) {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if - (existingCode === undefined) {\n throw new Error(`Code required to - exist is not present: ${args.existing_code_id}`);\n }\n\n const - newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"transition_node_to_trusted\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const - nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === - \"Pending\") {\n nodeInfo.status = \"Trusted\";\n nodeInfo.ledger_secret_seqno - = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \"remove_node_code\",\n new - Action(\n function (args) {\n checkType(args.code_id_to_remove, - \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, - \"string\", \"remaining_code_id\");\n },\n function (args) {\n const - remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if - (remainingCode === undefined) {\n throw new Error(`Code required - to remain is not present: ${args.remaining_code_id}`);\n }\n\n const - codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status - = \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, - \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function - (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport - function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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[\"public:ccf.gov.members.info\"].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 // Some actions can always be called by operators.\n const allowedOperatorActions - = [\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 - === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if - (memberData && memberData.is_operator) {\n return true;\n }\n } else - if (action.name === \"remove_member\") {\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)[\"actions\"];\n\n // - Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote - && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding - operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, - key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if - (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // - A proposal is an operator change if it''s only applying operator actions.\n const - isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members - can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount - / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator - changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) - {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function - validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let - position = 0;\n for (const action of proposal[\"actions\"]) {\n const - definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } - catch (e) {\n errors.push(\n `${action.name} at position ${position} - failed validation: ${e}\\n${e.stack}`\n );\n }\n } else {\n errors.push(`${action.name}: - no such action`);\n }\n position++;\n }\n return { valid: errors.length - === 0, description: errors.join(\", \") };\n}\n"}' - headers: - content-length: '30912' - content-type: application/json - x-ms-ccf-transaction-id: '2.789' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/governance/constitution?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview - response: - body: - string: '{"currentNodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","enclaveQuotes":{"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074fca16e1b382cc4d9313fca5acbf408b0000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b29f6c95262f276c27d647ad544333f705abc0d492c1bb6c8c5e85cd5349cf800000000000000000000000000000000000000000000000000000000000000003410000061af278ff696604a85f21ef449253c0d0053cefafddc13716293cde909aa5258b6f21ed480e8411418632b768a16a790c4efee2b69278a2b72ccc8411a59fa6e8eb0721568eb8eefb5ffe48d4c0535ccbd637f6998f30d252334d093bfe489707cef9b5abbe51428ff6feb0d5590723896f7e3d8466e7c4c7f661f5588b1cbc011110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045566c39ee9249e7f197a87256fd7267ac67bec7f27e6133d95306656244366e00000000000000000000000000000000000000000000000000000000000000007d1cada36a9e54bde941973bd2de03d5304bffdd775474aec6d38207272d9226a3e9e0314555d3960507f3224cf7d2009d75c8b968071fc31094a3dfb999c1e42000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436167417749424167495545646d6b4833625131367152525856766e73307369596b3979495577436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4449784d4449794d5455774e466f58445449344d4449784d4449794d5455770a4e466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414152680a5247587236365079506673764a55444a666158563841575957586768454e6b784638614d6d3471396a5a543546356d2f4d446b466365724a735a486c6d2b58710a4471673138452f344f416e39622f70344e366d796f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d42304741315564446751574242537956634a3754335950586f383059535762493759504e514233506a414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e4151454545475a445038395a483248673435704f4f5337372b564d776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b45304244514543415149424554415142677371686b69472b45304244514543416749424554415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454245524167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445351417752674968414a497245793530694b564857596f70573844500a56525366306859546f7232535830674b4f517569354f644241694541354d6351674a7a615550497a456342714c7970554a646a6a5a6e694c77686458387a75520a496458303244593d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee"},"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074873041a31fa9e99c28726074c95f0110000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cbf1112f99fb6a724779ee53b9caf70408fa5408bb7f309ae29ce550b583b7a0000000000000000000000000000000000000000000000000000000000000000341000004d5c886623f85f5223e27226dd322449239a5c3cccc355503a18f85d62b7823d2d0bc53f9c631483f96a85a5b9c55a30bcfa90cdb697d7fee0d7dd41ed111917f90fc89d9b26a4f817549ca484f845ccdd2e7a58317ef86498dc72f884122fcb744c534915ab067517627d73b1984d14196a6cb2ecc8f86bf62a81b535213e0411110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f588dbf7520c9e3cc41fff530db8b42141a25b1f84f167963cb1305d0557d130000000000000000000000000000000000000000000000000000000000000000cc63294e9101303c80d2cf7b5ff71a272506220378e2f50331a69cbf1eab6b76fc4b70eb794e6650c41220f4dbb5c2ab583ec153d1eddf72f5b34fc82b8621542000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436567417749424167495641495a565a7a647836376f5348596b535a47696b2f7a764f715a4d554d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d5463774e5441304e444e61467730794f44417a4d5463774e5441300a4e444e614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4f63727649474473437751544e6535344135436c444d3864542f78627a4c476b50614932617352555a56392b3367712b5855626d486731724631462f534f6d700a6337576759624737747a70716e662b7a67324e4250614f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e564851344546675155685539616b6630615270427168507145587378754e736a2f6672457744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b453042445145424242435070554b3474472b5243415148592b7353395a76644d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434944644e6a44357953615a6f703678436f6344620a424f752f6976504550647663326b6a78356a744b79715a374169454135666c716a51596c5235435339746b2f3678777a7a4a514331794f34374f4556776950430a2f44306756384d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076"},"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f060754a876d8093c9425005f2e6815d530010000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cffd2506bd7388597f99ac20e4a744e498ff0ef505108c34368f1f731247e43000000000000000000000000000000000000000000000000000000000000000034100000c369dfe6412619ce5c1bf9026f7fcbfdd79ae58aa1053c2cad78356e614240701f60ba69220f9cbd8592d40cbf1f477a13a253dbb45bd242580ccb9f11f912ea06834e14e82c9982eb6cee7471e3b13721661ece0a68458b0948b26ed53322b58dbf3252283ce9fe4703d59aff2003d8f94c5b61722eefd439c735d7e40b0e9a11110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000751ade3621fe0e0e62fdfda76b32e7524bd87388a96e0a98ace244c95a8965b500000000000000000000000000000000000000000000000000000000000000000322ce315e71a60490bddf773f32b059f4cce7b435d550e2c1cd34aa7faf1cf4d06858ceb9ff5b8fa2aa9d3ba7a564c53853ca78ea6e1175e02b185f94ec4e852000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d49494567544343424365674177494241674956414c546d71796a394e4363724f414844654849486f6c754d565758464d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d6a4d774f544d304e546c61467730794f44417a4d6a4d774f544d300a4e546c614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a715165687944707854673273444b6849772b64454f2b42647536527039586f516e6c3359322f6a32497455566e524374704236484c707943325a45614d6853610a4b716c6f436476715674426872504f7364377374474b4f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e5648513445466751552f724673795665793276384e58594e354178754c766177586868347744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b4530424451454242424132346f6d696e7451356a58772f325543756237766b4d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543494252454b346b4c5559532b766149336436536d0a6668564f613642726d4c43316d50314b7265346f52456262416945416d78325a496f506f36584838303839576668746f6539356b6345733432507050343152370a643544467167513d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3"}}}' - headers: - content-length: '28866' - content-type: application/json - x-ms-ccf-transaction-id: '2.789' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/enclaveQuotes?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_aad_user.yaml new file mode 100644 index 000000000000..447daf952535 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_aad_user.yaml @@ -0,0 +1,305 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:12 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK"}' + headers: + Accept: + - application/json + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: '30' + content-type: application/json + x-ms-ccf-transaction-id: '4.23913' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23913"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23913' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23913"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23914' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23913"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23914' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: '66' + content-type: application/json + x-ms-ccf-transaction-id: '4.23914' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23913:a42940ca0308e982dce7f6a9d526ce3de3b34e65cf4920014652a0ccdcbded8d\",\n + \ \"write_set_digest\": \"e77e3c2457e8abe7cb6e366b9bd2baf07feb90f77f0539e10f2b00618fe51f03\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"eda1691b7c29d04a46aa1cd72f805ec108b6f6eb795b222db3afb5055caffd23\"\n + \ },\n {\n \"left\": \"dc3ff887e92e26c3bf6dbb892ffde61210488b5b16460da832c85e88d0ef91c2\"\n + \ },\n {\n \"left\": \"18ceb9acfd331cf03511b541214ef26d792a8ce501b15d0fb91b2915aaaec529\"\n + \ },\n {\n \"left\": \"26274da1e2efe64e2f659f194b8a87eac032468094d98b7ba23d819ecda0aa9c\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIDQPCeNWBzjhj3dNDgUkb+DlChPkYdtG+32qawpMmvvvAiEA6dN92S5xxCwMLMDYW6TStAdLL2WfAnoDEYC1LhDqUE0=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23913\"\n}" + headers: + content-length: '2291' + content-type: application/json + x-ms-ccf-transaction-id: '4.23914' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry from Python SDK","transactionId":"4.23914"}' + headers: + content-length: '96' + content-type: application/json + x-ms-ccf-transaction-id: '4.23914' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 +- request: + body: '{"contents": "Test entry 2 from Python SDK"}' + headers: + Accept: + - application/json + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: '30' + content-type: application/json + x-ms-ccf-transaction-id: '4.23915' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23915/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23915"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23916' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23915/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23915/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23915"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23916' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23915/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry 2 from Python + SDK","transactionId":"4.23916"}' + headers: + content-length: '98' + content-type: application/json + x-ms-ccf-transaction-id: '4.23916' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23913?api-version=2022-05-13 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"subledger:0\",\n \"contents\": + \"Test entry from Python SDK\",\n \"transactionId\": \"4.23913\"\n },\n + \ \"state\": \"Ready\"\n}" + headers: + content-length: '152' + content-type: application/json + x-ms-ccf-transaction-id: '4.23916' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23913?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_cert_user.yaml new file mode 100644 index 000000000000..91ac541476bc --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_cert_user.yaml @@ -0,0 +1,351 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:19 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23917' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: '{"contents": "Test entry from Python SDK"}' + headers: + Accept: + - application/json + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: '30' + content-type: application/json + x-ms-ccf-transaction-id: '4.23919' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23919"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23919' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23919"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23920' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23919"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23920' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: '66' + content-type: application/json + x-ms-ccf-transaction-id: '4.23920' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23919:338ec345641ffb91200b1ccdafc0079fa0ab6f25ebb638ce5e0ba04825fa5e85\",\n + \ \"write_set_digest\": \"8d10dc6d9a6c557b27d09142ee952a6f4c570fb4fd48b69f72aa9fa7e66939ed\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"2636db1fb41aa11f781907fc8a92891871b965f59204229173a84852642b5283\"\n + \ },\n {\n \"left\": \"b371be66e390477a39099fec2b22a0a9bd49867688c9b135b71bb214d9be08b7\"\n + \ },\n {\n \"left\": \"07be34097ba95629e10b0e6ec9bb66230d8c725c6fe3892e3936c62559191e78\"\n + \ },\n {\n \"left\": \"dc3ff887e92e26c3bf6dbb892ffde61210488b5b16460da832c85e88d0ef91c2\"\n + \ },\n {\n \"left\": \"18ceb9acfd331cf03511b541214ef26d792a8ce501b15d0fb91b2915aaaec529\"\n + \ },\n {\n \"left\": \"26274da1e2efe64e2f659f194b8a87eac032468094d98b7ba23d819ecda0aa9c\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIQDBykdq6TwlOIwHofaHxBbkN2afPVWRXLok2Ff8jH0RmgIgDu+UKrZ2JohXy/pcYrDQwazdrwQ6JW6WY6eHYXgtLIM=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23919\"\n}" + headers: + content-length: '2491' + content-type: application/json + x-ms-ccf-transaction-id: '4.23920' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry from Python SDK","transactionId":"4.23920"}' + headers: + content-length: '96' + content-type: application/json + x-ms-ccf-transaction-id: '4.23920' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 +- request: + body: '{"contents": "Test entry 2 from Python SDK"}' + headers: + Accept: + - application/json + Content-Length: + - '44' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0"}' + headers: + content-length: '30' + content-type: application/json + x-ms-ccf-transaction-id: '4.23921' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23921"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23921' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23921"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23922' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23921"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23922' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23921/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 + response: + body: + string: '{"collectionId":"subledger:0","contents":"Test entry 2 from Python + SDK","transactionId":"4.23922"}' + headers: + content-length: '98' + content-type: application/json + x-ms-ccf-transaction-id: '4.23922' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23919?api-version=2022-05-13 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"subledger:0\",\n \"contents\": + \"Test entry from Python SDK\",\n \"transactionId\": \"4.23919\"\n },\n + \ \"state\": \"Ready\"\n}" + headers: + content-length: '152' + content-type: application/json + x-ms-ccf-transaction-id: '4.23922' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23919?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_aad_user.yaml new file mode 100644 index 000000000000..b70032b223e6 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_aad_user.yaml @@ -0,0 +1,348 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:31 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"contents": "Test entry from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: '22' + content-type: application/json + x-ms-ccf-transaction-id: '4.23923' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23923"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23923' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23923"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23924' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23923"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23924' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: '66' + content-type: application/json + x-ms-ccf-transaction-id: '4.23924' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23923:4be50f4909ea9f45c5d46d190827bf173cd3bef978767a469e38f165846f6b12\",\n + \ \"write_set_digest\": \"b1078e6cd7a7cb1c6ea457369015bb4df6b84d8555d409c542b6300919f9d476\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"6252d76911fe5fb950335fd3f7e0bf21c5935bed1d096db50a039bfce1623165\"\n + \ },\n {\n \"left\": \"220d98314478b3f4e5b53cec452d3d4fa193b86fdaba7a575c9070c7b6cc260a\"\n + \ },\n {\n \"left\": \"0c89ab8475418689ef0a0b3c6d88942accfda92cba760ebef211676e718a5b51\"\n + \ },\n {\n \"left\": \"18ceb9acfd331cf03511b541214ef26d792a8ce501b15d0fb91b2915aaaec529\"\n + \ },\n {\n \"left\": \"26274da1e2efe64e2f659f194b8a87eac032468094d98b7ba23d819ecda0aa9c\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIQCebl0eJrlGGRVXOhb7s+OUybQX04D321b+7BeiedRvTwIgBBDAWa3ix9dUIOfyag0cm72Gi2YhUjG1koUfA798nVc=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23923\"\n}" + headers: + content-length: '2391' + content-type: application/json + x-ms-ccf-transaction-id: '4.23924' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry from Python SDK. Collection: + 132","transactionId":"4.23924"}' + headers: + content-length: '105' + content-type: application/json + x-ms-ccf-transaction-id: '4.23924' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 +- request: + body: '{"contents": "Test entry 2 from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Content-Length: + - '61' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: '22' + content-type: application/json + x-ms-ccf-transaction-id: '4.23925' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23925"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23925' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23925"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23925' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23925"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23926' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23925/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry 2 from Python SDK. Collection: + 132","transactionId":"4.23926"}' + headers: + content-length: '107' + content-type: application/json + x-ms-ccf-transaction-id: '4.23926' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23923?api-version=2022-05-13&collectionId=132 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"132\",\n \"contents\": + \"Test entry from Python SDK. Collection: 132\",\n \"transactionId\": \"4.23923\"\n + \ },\n \"state\": \"Ready\"\n}" + headers: + content-length: '161' + content-type: application/json + x-ms-ccf-transaction-id: '4.23926' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23923?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 + response: + body: + string: '{"collections":[{"collectionId":"3"},{"collectionId":"132"},{"collectionId":"0"},{"collectionId":"Alice"},{"collectionId":"subledger:0"},{"collectionId":"1"},{"collectionId":"2"},{"collectionId":"Bob"},{"collectionId":"Messages + from Alice"},{"collectionId":"4"}]}' + headers: + content-length: '263' + content-type: application/json + x-ms-ccf-transaction-id: '4.23926' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_cert_user.yaml new file mode 100644 index 000000000000..06546cfe5a77 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_append_entry_flow_with_collection_id_cert_user.yaml @@ -0,0 +1,332 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:40 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23927' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: '{"contents": "Test entry from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Content-Length: + - '59' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: '22' + content-type: application/json + x-ms-ccf-transaction-id: '4.23929' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23929"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23929' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23929"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23930' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23929"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23930' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": null,\n \"state\": \"Loading\",\n \"transactionId\": + \"\"\n}" + headers: + content-length: '66' + content-type: application/json + x-ms-ccf-transaction-id: '4.23930' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929/receipt?api-version=2022-05-13 + response: + body: + string: "{\n \"receipt\": {\n \"cert\": \"-----BEGIN CERTIFICATE-----\\nMIIByTCCAW+gAwIBAgIQLS9B5zlFVupxqOAOVXkppDAKBggqhkjOPQQDAjAWMRQw\\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjVaFw0yMjA5MjUxNjA3\\nMjRaMBMxETAPBgNVBAMMCENDRiBOb2RlMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD\\nQgAEmtkFFf5II8O05VyFMOWtMgOoXyi7wgEl6f96w2iJpJtH4xp2+OczZQBP3lMQ\\ncIOcTmZrt6GBLRJgj/rFAKUWW6OBoTCBnjAJBgNVHRMEAjAAMB0GA1UdDgQWBBQ9\\nw5S5Qtj/74rnPfWFztgoE09D+jAfBgNVHSMEGDAWgBSHWA0eCkiVM42YVsVfsd4b\\nWtxPqDBRBgNVHREESjBIghBseXNoaS1weXRob24tc2Rrgi5seXNoaS1weXRob24t\\nc2RrLmNvbmZpZGVudGlhbC1sZWRnZXIuYXp1cmUuY29thwQK8CzoMAoGCCqGSM49\\nBAMCA0gAMEUCIFgXO3P/noe6eE842lHVb+3ozVDKx8GOhALN3RJH8+LPAiEA5WUt\\n7aUZuLRfuJ2z1HmYSnows/OkisZ2zlSLDEqsTeQ=\\n-----END + CERTIFICATE-----\\n\",\n \"is_signature_transaction\": false,\n \"leaf_components\": + {\n \"claims_digest\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n + \ \"commit_evidence\": \"ce:4.23929:b1e9c7376d267265d751d322a59834e238be4b1fc40ccd4a511f20ea3870a888\",\n + \ \"write_set_digest\": \"47d7027f236f6fed9ae12dd6fcb855f997038686144aaac866c5dee14f3bc199\"\n + \ },\n \"node_id\": \"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069\",\n + \ \"proof\": [\n {\n \"left\": \"7fc0968cbec49526a748b66926ca893499f0c7a289e7fa677f3bd2740bf91e25\"\n + \ },\n {\n \"left\": \"3efeb3a44a98a22dd129016f1119644e84f8f4bfc99ef8d82da87f58622a93f4\"\n + \ },\n {\n \"left\": \"0c89ab8475418689ef0a0b3c6d88942accfda92cba760ebef211676e718a5b51\"\n + \ },\n {\n \"left\": \"18ceb9acfd331cf03511b541214ef26d792a8ce501b15d0fb91b2915aaaec529\"\n + \ },\n {\n \"left\": \"26274da1e2efe64e2f659f194b8a87eac032468094d98b7ba23d819ecda0aa9c\"\n + \ },\n {\n \"left\": \"47cf7db1fce3cb2836a02d9d571356ee6aeb4658dd757ebc2c0d5c1422726793\"\n + \ },\n {\n \"left\": \"77ba1efc54e517cd12dd4e285ce681365db555fa8424afaead68003f1a86a2cf\"\n + \ },\n {\n \"left\": \"7b74585c9d235806dd05453b07a8327b00997bd007ec1c1a77b829a2f777b1ab\"\n + \ },\n {\n \"left\": \"7ebfc446e286d16001f840fac247b91f8d6179b73f00ad48498ba5996055baa6\"\n + \ },\n {\n \"left\": \"22f26d7be153ca3ba6b6bc87ef972e06dabb9dd43cf44905892890428d4d93d2\"\n + \ }\n ],\n \"service_endorsements\": [],\n \"signature\": \"MEUCIDmd9z1Fzoz+Ptb/iP1B6IbK+w94sOfQBw6hJVqMRWsiAiEArJRJAwrF581Y0T4+gnIXLVmTKJ82bqYPmmfWoPQzZqM=\"\n + \ },\n \"state\": \"Ready\",\n \"transactionId\": \"4.23929\"\n}" + headers: + content-length: '2391' + content-type: application/json + x-ms-ccf-transaction-id: '4.23930' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929/receipt?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry from Python SDK. Collection: + 132","transactionId":"4.23930"}' + headers: + content-length: '105' + content-type: application/json + x-ms-ccf-transaction-id: '4.23930' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 +- request: + body: '{"contents": "Test entry 2 from Python SDK. Collection: 132"}' + headers: + Accept: + - application/json + Content-Length: + - '61' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132"}' + headers: + content-length: '22' + content-type: application/json + x-ms-ccf-transaction-id: '4.23931' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23931/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23931"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23932' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23931/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 + response: + body: + string: '{"collectionId":"132","contents":"Test entry 2 from Python SDK. Collection: + 132","transactionId":"4.23932"}' + headers: + content-length: '107' + content-type: application/json + x-ms-ccf-transaction-id: '4.23932' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/current?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23929?api-version=2022-05-13&collectionId=132 + response: + body: + string: "{\n \"entry\": {\n \"collectionId\": \"132\",\n \"contents\": + \"Test entry from Python SDK. Collection: 132\",\n \"transactionId\": \"4.23929\"\n + \ },\n \"state\": \"Ready\"\n}" + headers: + content-length: '161' + content-type: application/json + x-ms-ccf-transaction-id: '4.23932' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23929?api-version=2022-05-13&collectionId=132 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 + response: + body: + string: '{"collections":[{"collectionId":"3"},{"collectionId":"132"},{"collectionId":"0"},{"collectionId":"Alice"},{"collectionId":"subledger:0"},{"collectionId":"1"},{"collectionId":"2"},{"collectionId":"Bob"},{"collectionId":"Messages + from Alice"},{"collectionId":"4"}]}' + headers: + content-length: '263' + content-type: application/json + x-ms-ccf-transaction-id: '4.23932' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/collections?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_aad_user.yaml new file mode 100644 index 000000000000..5a36d37aa4ea --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_aad_user.yaml @@ -0,0 +1,507 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:06:50 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"contents": "message-0"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23933' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 +- request: + body: '{"contents": "message-1"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23934' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 +- request: + body: '{"contents": "message-2"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23936' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 +- request: + body: '{"contents": "message-3"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23937' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 +- request: + body: '{"contents": "message-4"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23939' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 +- request: + body: '{"contents": "message-5"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23940' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 +- request: + body: '{"contents": "message-6"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23942' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 +- request: + body: '{"contents": "message-7"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23943' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 +- request: + body: '{"contents": "message-8"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23945' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 +- request: + body: '{"contents": "message-9"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23946' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23946/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23946"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23946/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23933&toTransactionId=4.23940 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23933&toTransactionId=4.23940\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23933&toTransactionId=4.23940 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23933&toTransactionId=4.23940 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"0\",\n \"contents\": + \"message-0\",\n \"transactionId\": \"4.23933\"\n },\n {\n \"collectionId\": + \"0\",\n \"contents\": \"message-5\",\n \"transactionId\": \"4.23940\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23933&toTransactionId=4.23940 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23934&toTransactionId=4.23942 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23934&toTransactionId=4.23942\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23934&toTransactionId=4.23942 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23934&toTransactionId=4.23942 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"1\",\n \"contents\": + \"message-1\",\n \"transactionId\": \"4.23934\"\n },\n {\n \"collectionId\": + \"1\",\n \"contents\": \"message-6\",\n \"transactionId\": \"4.23942\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23934&toTransactionId=4.23942 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23936&toTransactionId=4.23943 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23936&toTransactionId=4.23943\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23936&toTransactionId=4.23943 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23936&toTransactionId=4.23943 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"2\",\n \"contents\": + \"message-2\",\n \"transactionId\": \"4.23936\"\n },\n {\n \"collectionId\": + \"2\",\n \"contents\": \"message-7\",\n \"transactionId\": \"4.23943\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23936&toTransactionId=4.23943 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23937&toTransactionId=4.23945 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23937&toTransactionId=4.23945\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23937&toTransactionId=4.23945 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23937&toTransactionId=4.23945 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"3\",\n \"contents\": + \"message-3\",\n \"transactionId\": \"4.23937\"\n },\n {\n \"collectionId\": + \"3\",\n \"contents\": \"message-8\",\n \"transactionId\": \"4.23945\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23937&toTransactionId=4.23945 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23939&toTransactionId=4.23946 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23939&toTransactionId=4.23946\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23939&toTransactionId=4.23946 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23939&toTransactionId=4.23946 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"4\",\n \"contents\": + \"message-4\",\n \"transactionId\": \"4.23939\"\n },\n {\n \"collectionId\": + \"4\",\n \"contents\": \"message-9\",\n \"transactionId\": \"4.23946\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23947' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23939&toTransactionId=4.23946 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_cert_user.yaml new file mode 100644 index 000000000000..c1f5886bf090 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_range_query_cert_user.yaml @@ -0,0 +1,551 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:07:03 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23948' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: '{"contents": "message-0"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23950' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 +- request: + body: '{"contents": "message-1"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23952' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 +- request: + body: '{"contents": "message-2"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23953' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 +- request: + body: '{"contents": "message-3"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23955' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 +- request: + body: '{"contents": "message-4"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23956' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 +- request: + body: '{"contents": "message-5"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 + response: + body: + string: '{"collectionId":"0"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23958' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0 +- request: + body: '{"contents": "message-6"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 + response: + body: + string: '{"collectionId":"1"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23959' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1 +- request: + body: '{"contents": "message-7"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 + response: + body: + string: '{"collectionId":"2"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23961' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2 +- request: + body: '{"contents": "message-8"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 + response: + body: + string: '{"collectionId":"3"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23963' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3 +- request: + body: '{"contents": "message-9"}' + headers: + Accept: + - application/json + Content-Length: + - '25' + Content-Type: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: POST + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 + response: + body: + string: '{"collectionId":"4"}' + headers: + content-length: '20' + content-type: application/json + x-ms-ccf-transaction-id: '4.23964' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23964/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Pending","transactionId":"4.23964"}' + headers: + content-length: '45' + content-type: application/json + x-ms-ccf-transaction-id: '4.23964' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23964/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions/4.23964/status?api-version=2022-05-13 + response: + body: + string: '{"state":"Committed","transactionId":"4.23964"}' + headers: + content-length: '47' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions/4.23964/status?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23950&toTransactionId=4.23958 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23950&toTransactionId=4.23958\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23950&toTransactionId=4.23958 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23950&toTransactionId=4.23958 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"0\",\n \"contents\": + \"message-0\",\n \"transactionId\": \"4.23950\"\n },\n {\n \"collectionId\": + \"0\",\n \"contents\": \"message-5\",\n \"transactionId\": \"4.23958\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=0&fromTransactionId=4.23950&toTransactionId=4.23958 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23952&toTransactionId=4.23959 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23952&toTransactionId=4.23959\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23952&toTransactionId=4.23959 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23952&toTransactionId=4.23959 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"1\",\n \"contents\": + \"message-1\",\n \"transactionId\": \"4.23952\"\n },\n {\n \"collectionId\": + \"1\",\n \"contents\": \"message-6\",\n \"transactionId\": \"4.23959\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=1&fromTransactionId=4.23952&toTransactionId=4.23959 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23953&toTransactionId=4.23961 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23953&toTransactionId=4.23961\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23953&toTransactionId=4.23961 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23953&toTransactionId=4.23961 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"2\",\n \"contents\": + \"message-2\",\n \"transactionId\": \"4.23953\"\n },\n {\n \"collectionId\": + \"2\",\n \"contents\": \"message-7\",\n \"transactionId\": \"4.23961\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=2&fromTransactionId=4.23953&toTransactionId=4.23961 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23955&toTransactionId=4.23963 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23955&toTransactionId=4.23963\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23955&toTransactionId=4.23963 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23955&toTransactionId=4.23963 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"3\",\n \"contents\": + \"message-3\",\n \"transactionId\": \"4.23955\"\n },\n {\n \"collectionId\": + \"3\",\n \"contents\": \"message-8\",\n \"transactionId\": \"4.23963\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=3&fromTransactionId=4.23955&toTransactionId=4.23963 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23956&toTransactionId=4.23964 + response: + body: + string: "{\n \"entries\": [],\n \"nextLink\": \"/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23956&toTransactionId=4.23964\",\n + \ \"state\": \"Loading\"\n}" + headers: + content-length: '164' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23956&toTransactionId=4.23964 +- request: + body: null + headers: + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23956&toTransactionId=4.23964 + response: + body: + string: "{\n \"entries\": [\n {\n \"collectionId\": \"4\",\n \"contents\": + \"message-4\",\n \"transactionId\": \"4.23956\"\n },\n {\n \"collectionId\": + \"4\",\n \"contents\": \"message-9\",\n \"transactionId\": \"4.23964\"\n + \ }\n ],\n \"state\": \"Ready\"\n}" + headers: + content-length: '249' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/transactions?api-version=2022-05-13&collectionId=4&fromTransactionId=4.23956&toTransactionId=4.23964 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_aad_user.yaml new file mode 100644 index 000000000000..d375f440846f --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_aad_user.yaml @@ -0,0 +1,471 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:07:19 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: '45692' + content-type: application/json + x-ms-ccf-transaction-id: '4.23965' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_cert_user.yaml new file mode 100644 index 000000000000..274aa19987db --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_tls_cert_convenience_cert_user.yaml @@ -0,0 +1,495 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:07:21 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23966' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: '45692' + content-type: application/json + x-ms-ccf-transaction-id: '4.23967' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_aad_user.yaml new file mode 100644 index 000000000000..450f854fb948 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_aad_user.yaml @@ -0,0 +1,251 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:07:26 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '78' + content-type: application/json + x-ms-ccf-transaction-id: '4.23968' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '78' + content-type: application/json + x-ms-ccf-transaction-id: '4.23969' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '73' + content-type: application/json + x-ms-ccf-transaction-id: '4.23970' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '73' + content-type: application/json + x-ms-ccf-transaction-id: '4.23971' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: '0' + x-ms-ccf-transaction-id: '4.23972' + status: + code: 204 + message: No Content + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '137' + content-type: application/json + x-ms-ccf-transaction-id: '4.23973' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '137' + content-type: application/json + x-ms-ccf-transaction-id: '4.23974' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '132' + content-type: application/json + x-ms-ccf-transaction-id: '4.23975' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '132' + content-type: application/json + x-ms-ccf-transaction-id: '4.23976' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: '0' + x-ms-ccf-transaction-id: '4.23977' + status: + code: 204 + message: No Content + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_cert_user.yaml new file mode 100644 index 000000000000..851bf655166d --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_user_management_cert_user.yaml @@ -0,0 +1,275 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:07:44 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-g48zc + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23979' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '78' + content-type: application/json + x-ms-ccf-transaction-id: '4.23981' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '78' + content-type: application/json + x-ms-ccf-transaction-id: '4.23982' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '73' + content-type: application/json + x-ms-ccf-transaction-id: '4.23983' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' + headers: + content-length: '73' + content-type: application/json + x-ms-ccf-transaction-id: '4.23984' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: '0' + x-ms-ccf-transaction-id: '4.23985' + status: + code: 204 + message: No Content + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Contributor"}' + headers: + Accept: + - application/json + Content-Length: + - '31' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '137' + content-type: application/json + x-ms-ccf-transaction-id: '4.23986' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Contributor","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '137' + content-type: application/json + x-ms-ccf-transaction-id: '4.23987' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: '{"assignedRole": "Reader"}' + headers: + Accept: + - application/json + Content-Length: + - '26' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '132' + content-type: application/json + x-ms-ccf-transaction-id: '4.23988' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Reader","userId":"7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F"}' + headers: + content-length: '132' + content-type: application/json + x-ms-ccf-transaction-id: '4.23989' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: DELETE + uri: https://fake.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 + response: + body: + string: '' + headers: + content-length: '0' + x-ms-ccf-transaction-id: '4.23990' + status: + code: 204 + message: No Content + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4:77:30:1F?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_aad_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_aad_user.yaml new file mode 100644 index 000000000000..7f2acbf27b18 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_aad_user.yaml @@ -0,0 +1,512 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:08:06 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-jh62d + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 + response: + body: + string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQMAEeooXfQdW6giXYaafT1DAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjIwNjI3MTU1NjQxWhcN\nMjIwOTI3MTYwNjQxWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAASqtUAZVCcGm38thbsTyFz+wkUHNHixt5QF\ncr9Q095DywgBU9yUWXSHBjhVMtI8+HJzq9PTSPvkO6yhvacaBr3w7uWrwN+4yfpj\nwFwsl4GpDvnBa0PdHnRa03ayLcfjZEKjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBR6I6yFAZG9HMa6eJOorb+s5u0kADAdBgNVHQ4EFgQUeiOshQGRvRzGuniTqK2/\nrObtJAAwCgYIKoZIzj0EAwMDaAAwZQIwNZ63xMJXFHSuP9fYqpwaMN7IFBR/oihI\nBI/g/zdHJrpZ/WBflOu/h8NjOCJL/6gFAjEAttAEp5op+uEZGVsC12BD+3iSMbbU\nBCTbeRohXdmfrVh+R4HTjMEkMZGulxArXsgl\n-----END + CERTIFICATE-----","id":"93579f54afd1c33c6924ffa2c1ef0e5aaf449d2d532f6e88cfff8f718cd2e068"}]}' + headers: + content-length: '856' + content-type: application/json + x-ms-ccf-transaction-id: '4.23991' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: '45692' + content-type: application/json + x-ms-ccf-transaction-id: '4.23991' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 + response: + body: + string: '{"currentNodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","enclaveQuotes":{"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f0607991573a6956b8eb8a806f199b1662b7a0000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a412000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c19817c2525ef909efdcb3b068499b33dd40cdaa832b5b697f47abe4543c302000000000000000000000000000000000000000000000000000000000000000044100000b11e25a28b1e13588dbf1b2c4878955ec399be0b80f3fcff5ba0c74b4b3baa8f84f3f5c8c8cd054b4ca9054dd9f130e5c26955abcf99b0e654af0f1af7424112cf7312969e233e971d6cff8c1dfa26b23c5457770c92c16ffc520d0ea6de78042a871cc06ac8fa1a56ca6f939d6c8de966197b4ad639042c1f3a3fcb1a706f7d13130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e010d58849d96a5e8df387100bba0e54295525d8af63be4143a132ed71ab65060000000000000000000000000000000000000000000000000000000000000000f1d9007f37ae0e150c7caae3403d0ae789f3647d34c622e1a46354c85e37d20b0fc6d656f2f21389c752ad551c9e4e957976949868b831dbd07bdc2f795650102000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f6741774942416749555a435233597a6879752f4c35304f6d59576c304b5648427974794177436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e6a41784e5459304d566f58445449354d4455774e6a41784e5459300a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e434141536a0a616f334b504378685a7833316e4d39636649584c35716178384e62506c6a6d47674b4e576b58657833447353343769313975753641422b6c48515a2b4e2b44610a6272555641532b384b55554a647559794654434b6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554a6e42335a51626c3233376f6e447167616d536a0a4c454e343052497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424243467870513847455a4534664f55436c4f7051516a624d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434951446a0a61463955556a506d633853374561364f726344486157706d534b3176516a476645442b43442b647744674967666945766a4e5357436675573464746d733568490a36673968757449584d31366463677864686478617466383d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069"},"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f060736da9ce2321cee3355880f41a56573390000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a41200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7dc3053d08f86d78567b5b3e6b1276737f7b172943affa9ca6eb5df079b3a940000000000000000000000000000000000000000000000000000000000000000441000005c97af7df5ddfb377e7a4393c9474aa3e3e0010aeb62264f443fee13e5350c1b32a8315d60e78d8e11068a672b49bffaf4fb10067bc7b80ffc018d79ea1ecd2313fc13db498262c28fa23cd129d1a7a35acf590229bc0ac5fea7baa72a316492e1382f6de652b51395de97053f2b5d4dfac694abbf88ab2c36f5a6469c1e209213130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942ab091bbdba69f4eb00f5945561b0eeb57919f838c67a1cbbb2257021e1ae30000000000000000000000000000000000000000000000000000000000000000cb28ef2eb7e09fc8112a45c921dbdfa7b23dc1a323cb6aee33f5856ca733f644b68ab1c28ab76391331e053195dc7df353fe45a8a02931abb176bd4e9744197f2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a544343424453674177494241674956414e3435477035586a33644e4b36424f7345477462456c70776244324d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d6a41314d4459774d4449354d444a61467730794f5441314d4459774d4449350a4d444a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a70304e4166325a324759647147615851573434594a4e4a6665755862734567736363356f7346376e6f634278503362727a48634c44494a4e75485767315358520a6265493859704f4e4e45302f5254635a7364513371364f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f4242594546464b6f2b4969426b4f732f754f713130554e780a4439666c417664504d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151414b6e6d74444761714536694b72444549434d53367a4343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e48414442454169424e0a6336414b6b67575338745963763753677345494e6c574d526d752b504b76757853756b744f6a33534d7749674e77526e35785a4a56544751517068646c4865690a39694c522b4f3133706b394d77313467776d33736357303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461008fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f"},"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f06072fa0d2c36c34306f70a1dc88d59ad2c40000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a4120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055cc2178f6af43ca7eff3d5bde8fc761cf1abb330719aa16a1581f9d7c4375b3000000000000000000000000000000000000000000000000000000000000000044100000cbe398c2802d6d138d0e443d980d8334d309ec2263bbdfae9357f51ceea1ec244b0ff3f4c1f9aa6c9b6fb41793d44b69006888d2a234c7b34d916b030fa22df8dfa88c8fce6883e26e6a440f2ec0a01d689e0c30135a2c66b7c784c897bc755495b3329a058dd547d3a483e454673f5934fcc9ba73b38be3700924dccf455e3713130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae853068706466e0007aa229170ba44dfaa60f06b11f0eddd9ece932e63d5db400000000000000000000000000000000000000000000000000000000000000000e56496762f81fa526b69f30fd1c1978573bdf4a06fc80575faccd87533ccdbab4115a0c22f21b48c021f99e86a70e5061b70950164e5dab165ebe97ee26c5762000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f674177494241674955583367495779635930394552326f6679544e644a724a727245507777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e5449794d5441314d566f58445449354d4455774e5449794d5441310a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414151670a4a524b74683978634f6a376c525336494d716858346139466b3373535349524e4e507237374771764d376653513174356c6a41723674482b4f58645571764b690a576747715a2f6879424d4e434531634474336f786f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554c7a6378587631425645756e58694e436c76626e0a4353434c4a53597744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424244786467466b712f7256564c2f6a5477324d664b666a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543495144350a7150586948746d584f794f69364e694c71534c7154337269726b636d535052673630472b46485056495149674c794768736142416c4f5679527549694d552b460a422b45366652366e465135436c4f637662584d4564376b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811"}}}' + headers: + content-length: '28962' + content-type: application/json + x-ms-ccf-transaction-id: '4.23991' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_cert_user.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_cert_user.yaml new file mode 100644 index 000000000000..970f39bcecf6 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_async.test_verification_methods_cert_user.yaml @@ -0,0 +1,536 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 + response: + body: + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 01 Jul 2022 23:08:08 GMT + server: + - Kestrel + transfer-encoding: + - chunked + x-ms-image-digest: + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: + - identityservice-6499ffbf45-88b57 + status: + code: 200 + message: OK +- request: + body: '{"assignedRole": "Administrator"}' + headers: + Accept: + - application/json + Content-Length: + - '33' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: PATCH + uri: https://fake.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 + response: + body: + string: '{"assignedRole":"Administrator","userId":"5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5"}' + headers: + content-length: '139' + content-type: application/json + x-ms-ccf-transaction-id: '4.23992' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/users/5F:23:3D:26:E2:28:88:9C:06:E0:88:21:FA:C7:B2:9A:F8:81:30:6B:F9:15:41:F2:34:05:05:44:4C:AD:5A:B5?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 + response: + body: + string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB9zCCAX2gAwIBAgIQMAEeooXfQdW6giXYaafT1DAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjIwNjI3MTU1NjQxWhcN\nMjIwOTI3MTYwNjQxWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAASqtUAZVCcGm38thbsTyFz+wkUHNHixt5QF\ncr9Q095DywgBU9yUWXSHBjhVMtI8+HJzq9PTSPvkO6yhvacaBr3w7uWrwN+4yfpj\nwFwsl4GpDvnBa0PdHnRa03ayLcfjZEKjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBR6I6yFAZG9HMa6eJOorb+s5u0kADAdBgNVHQ4EFgQUeiOshQGRvRzGuniTqK2/\nrObtJAAwCgYIKoZIzj0EAwMDaAAwZQIwNZ63xMJXFHSuP9fYqpwaMN7IFBR/oihI\nBI/g/zdHJrpZ/WBflOu/h8NjOCJL/6gFAjEAttAEp5op+uEZGVsC12BD+3iSMbbU\nBCTbeRohXdmfrVh+R4HTjMEkMZGulxArXsgl\n-----END + CERTIFICATE-----","id":"93579f54afd1c33c6924ffa2c1ef0e5aaf449d2d532f6e88cfff8f718cd2e068"}]}' + headers: + content-length: '856' + content-type: application/json + x-ms-ccf-transaction-id: '4.23993' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/members?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 + response: + body: + string: '{"digest":"c71e1e9cb9e2c0cb26a4e0ff04bdd3913cff868b241808869a81dd0de29ab703","script":"export + function validate(input) {\n let proposal = JSON.parse(input);\n let errors + = [];\n let position = 0;\n for (const action of proposal[\"actions\"]) + {\n const definition = actions.get(action.name);\n if (definition) {\n try + {\n definition.validate(action.args);\n } catch (e) {\n errors.push(\n `${action.name} + at position ${position} failed validation: ${e}\\n${e.stack}`\n );\n }\n } + else {\n errors.push(`${action.name}: no such action`);\n }\n position++;\n }\n return + { valid: errors.length === 0, description: errors.join(\", \") };\n}\nclass + 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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const + groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} + is not a valid URL.`);\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(\"?\");\n if + (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type + = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) + {\n throw new Error(`${field} must be an array`);\n }\n } else if + (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw + new Error(`${field} must be an integer`);\n }\n } else if (typeof value + !== type) {\n throw new Error(`${field} must be of type ${type} but is + ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if + (!members.includes(value)) {\n throw new Error(`${field} must be one of + ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if + (low !== null && value < low) {\n throw new Error(`${field} must be greater + than ${low}`);\n }\n if (high !== null && value > high) {\n throw new + Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, + min, max, field) {\n if (min !== null && value.length < min) {\n throw + new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if + (max !== null && value.length > max) {\n throw new Error(`${field} must + be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) + {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal + does not accept any argument, found \"${args}\"`);\n }\n}\n\nfunction checkEntityId(value, + field) {\n checkType(value, \"string\", field);\n // This should be the + hex-encoding of a SHA256 digest. This is 32 bytes long, so\n // produces + 64 hex characters.\n const digestLength = 64;\n if (value.length !== digestLength) + {\n throw new Error(`${field} must contain exactly ${digestLength} characters`);\n }\n const + re = new RegExp(\"^[a-fA-F0-9]*$\");\n if (!re.test(value)) {\n throw + new Error(`${field} contains non-hexadecimal character`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, + k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if + (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} + has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if + (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return + activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, + \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for + (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", + `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, + \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, + `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) + {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const + pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END + CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction + checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) + {\n throw new Error(\n `${field} must be a valid X509 certificate + (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) + {\n const proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info\"];\n proposalsMap.forEach((v, + k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) + {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === + \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, + ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nfunction setServiceCertificateValidityPeriod(validFrom, + validityPeriodDays) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_service_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const renewed_service_certificate = ccf.network.generateNetworkCertificate(\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n\n const serviceInfoTable + = \"public:ccf.gov.service.info\";\n const rawServiceInfo = ccf.kv[serviceInfoTable].get(getSingletonKvKey());\n if + (rawServiceInfo === undefined) {\n throw new Error(\"Service info could + not be found\");\n }\n const serviceInfo = ccf.bufToJsonCompatible(rawServiceInfo);\n\n serviceInfo.cert + = renewed_service_certificate;\n ccf.kv[serviceInfoTable].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(serviceInfo)\n );\n}\n\nfunction + setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n validFrom,\n validityPeriodDays\n) + {\n if (nodeInfo.certificate_signing_request === undefined) {\n throw + new Error(`Node ${nodeId} has no certificate signing request`);\n }\n\n const + rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration could + not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n\n const + default_validity_period_days = 365;\n const max_allowed_cert_validity_period_days + =\n serviceConfig.maximum_node_certificate_validity_days ??\n default_validity_period_days;\n\n if + (\n validityPeriodDays !== undefined &&\n validityPeriodDays > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${validityPeriodDays} (days) + is not allowed: service max allowed is ${max_allowed_cert_validity_period_days} + (days)`\n );\n }\n\n const endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n validFrom,\n validityPeriodDays + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(nodeId),\n ccf.strToBuf(endorsed_node_cert)\n );\n}\n\nfunction + checkRecoveryThreshold(config, new_config) {\n const from = config.recovery_threshold;\n const + to = new_config.recovery_threshold;\n if (to === undefined || from === to) + {\n return;\n }\n\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not be found\");\n }\n\n const + service = ccf.bufToJsonCompatible(rawService);\n\n if (service.status === + \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot set recovery + threshold if service is ${service.status}`\n );\n } else if (service.status + === \"Open\") {\n let activeRecoveryMembersCount = getActiveRecoveryMembersCount();\n if + (new_config.recovery_threshold > activeRecoveryMembersCount) {\n throw + new Error(\n `Cannot set recovery threshold to ${new_config.recovery_threshold}: + recovery threshold would be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n}\n\nfunction + checkReconfigurationType(config, new_config) {\n const from = config.reconfiguration_type;\n const + to = new_config.reconfiguration_type;\n if (from !== to && to !== undefined) + {\n if (\n !(\n (from === undefined || from === \"OneTransaction\") + &&\n to === \"TwoTransaction\"\n )\n ) {\n throw new Error(\n `Cannot + change reconfiguration type from ${from} to ${to}.`\n );\n }\n }\n}\n\nfunction + updateServiceConfig(new_config) {\n const service_config_table = \"public:ccf.gov.service.config\";\n const + rawConfig = ccf.kv[service_config_table].get(getSingletonKvKey());\n if (rawConfig + === undefined) {\n throw new Error(\"Service configuration could not be + found\");\n }\n let config = ccf.bufToJsonCompatible(rawConfig);\n\n // + First run all checks\n checkReconfigurationType(config, new_config);\n checkRecoveryThreshold(config, + new_config);\n\n // Then all updates\n if (new_config.reconfiguration_type + !== undefined) {\n config.reconfiguration_type = new_config.reconfiguration_type;\n }\n\n let + need_recovery_threshold_refresh = false;\n if (\n new_config.recovery_threshold + !== undefined &&\n new_config.recovery_threshold !== config.recovery_threshold\n ) + {\n config.recovery_threshold = new_config.recovery_threshold;\n need_recovery_threshold_refresh + = true;\n }\n\n ccf.kv[service_config_table].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n if + (need_recovery_threshold_refresh) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n}\n\nconst + actions = new Map([\n [\n \"set_constitution\",\n new Action(\n function + (args) {\n checkType(args.constitution, \"string\");\n },\n function + (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, + \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } + else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 + = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const + rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if + (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } + else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const + ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n const memberId = ccf.pemToId(args.cert);\n const + rawMemberId = ccf.strToBuf(memberId);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if + (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const + memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember + = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 + && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const + activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() + - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) + {\n throw new Error(\n `Number of active recovery + members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold + (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if + (isActiveMember && 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 \"set_member_data\",\n new + Action(\n function (args) {\n checkType(args.member_id, \"string\", + \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function + (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let + members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info + = members_info.get(member_id);\n if (member_info === undefined) {\n throw + new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, + \"object?\", \"user_data\");\n },\n function (args) {\n let + userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n },\n function (args) {\n const user_id = + ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new + Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function + (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId + = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new + Action(\n function (args) {\n checkType(args.user_id, \"string\", + \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function + (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if + (args.user_data !== null && args.user_data !== undefined) {\n let + userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } + else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new + Action(\n function (args) {\n checkType(args.recovery_threshold, + \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n function + (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new + Action(\n function (args) {\n checkNone(args);\n },\n\n function + (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new + Action(\n function (args) {\n checkType(\n args.next_service_identity,\n \"string\",\n \"next + service identity (PEM certificate)\"\n );\n checkX509CertChain(\n args.next_service_identity,\n \"next_service_identity\"\n );\n\n checkType(\n args.previous_service_identity,\n \"string?\",\n \"previous + service identity (PEM certificate)\"\n );\n if (args.previous_service_identity + !== undefined) {\n checkX509CertChain(\n args.previous_service_identity,\n \"previous_service_identity\"\n );\n }\n },\n\n function + (args) {\n const service_info = \"public:ccf.gov.service.info\";\n const + rawService = ccf.kv[service_info].get(getSingletonKvKey());\n if (rawService + === undefined) {\n throw new Error(\"Service information could not + be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if + (\n service.status === \"Recovering\" &&\n (args.previous_service_identity + === undefined ||\n args.next_service_identity === undefined)\n ) + {\n throw new Error(\n `Opening a recovering network requires + both, the previous and the next service identity`\n );\n }\n\n const + previous_identity =\n args.previous_service_identity !== undefined\n ? + ccf.strToBuf(args.previous_service_identity)\n : undefined;\n const + next_identity = ccf.strToBuf(args.next_service_identity);\n ccf.node.transitionServiceToOpen(previous_identity, + next_identity);\n }\n ),\n ],\n [\n \"set_js_app\",\n new + Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, + \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, + \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) + {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, + \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", + `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, + \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", + `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) + {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for + (const [method, info] of Object.entries(endpoint)) {\n const prefix2 + = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, + \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, + \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", + \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", + \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, + \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for + (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, + \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if + (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw + new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n \n checkType(\n args.disable_bytecode_cache,\n \"boolean?\",\n \"disable_bytecode_cache\"\n );\n },\n function + (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const + modulesQuickJsBytecodeMap =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n endpointsMap.clear();\n\n const + bundle = args.bundle;\n for (const module of bundle.modules) {\n const + path = \"/\" + module.name;\n const pathBuf = ccf.strToBuf(path);\n const + moduleBuf = ccf.strToBuf(module.module);\n modulesMap.set(pathBuf, + moduleBuf);\n }\n\n if (args.disable_bytecode_cache) {\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n } + else {\n ccf.refreshAppBytecodeCache();\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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module + = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, + infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new + Action(\n function (args) {},\n function (args) {\n const + modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const modulesQuickJsBytecodeMap + =\n ccf.kv[\"public:ccf.gov.modules_quickjs_bytecode\"];\n const + modulesQuickJsVersionVal =\n ccf.kv[\"public:ccf.gov.modules_quickjs_version\"];\n const + endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n modulesMap.clear();\n modulesQuickJsBytecodeMap.clear();\n modulesQuickJsVersionVal.clear();\n endpointsMap.clear();\n }\n ),\n ],\n [\n \"refresh_js_app_bytecode_cache\",\n new + Action(\n function (args) {},\n function (args) {\n ccf.refreshAppBytecodeCache();\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, + bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new + Action(\n function (args) {\n checkType(args.name, \"string\", + \"name\");\n },\n function (args) {\n const name = args.name;\n const + nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, + \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, + [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", + \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, + \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, + \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) + {\n throw new Error(\n \"ca_cert_bundle_name is missing + but required if auto_refresh is true\"\n );\n }\n let + url;\n try {\n url = parseUrl(args.issuer);\n } + catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh + is true\");\n }\n if (url.scheme != \"https\") {\n throw + new Error(\n \"issuer must be a URL starting with https:// if + auto_refresh is true\"\n );\n }\n if (url.query + || url.fragment) {\n throw new Error(\n \"issuer must + be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) + {\n throw new Error(\n `No CA cert bundle found with + name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, + metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function + (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const + metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if + (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} + not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const + jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new + Action(\n function (args) {\n checkType(args.issuer, \"string\", + \"issuer\");\n },\n function (args) {\n const issuerBuf = + ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) + {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n // + custom logic specific to ACL\n \"add_node_code\",\n new Action(\n function + (args) {\n checkType(args.new_code_id, \"string\", \"new_code_id\");\n checkType(args.existing_code_id, + \"string\", \"existing_code_id\");\n },\n function (args, proposalId) + {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if + (existingCode === undefined) {\n throw new Error(`Code required to + exist is not present: ${args.existing_code_id}`);\n }\n\n const + newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"set_node_data\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n let node_id = ccf.strToBuf(args.node_id);\n let nodes_info + = ccf.kv[\"public:ccf.gov.nodes.info\"];\n let node_info = nodes_info.get(node_id);\n if + (node_info === undefined) {\n throw new Error(`Node ${node_id} does + not exist`);\n }\n let ni = ccf.bufToJsonCompatible(node_info);\n ni.node_data + = args.node_data;\n nodes_info.set(node_id, ccf.jsonCompatibleToBuf(ni));\n }\n ),\n ],\n [\n \"transition_node_to_trusted\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === + \"Pending\") {\n nodeInfo.status =\n serviceConfig.reconfiguration_type + == \"TwoTransaction\"\n ? \"Learner\"\n : \"Trusted\";\n nodeInfo.ledger_secret_seqno + =\n ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n\n // + Also generate and record service-endorsed node certificate from node CSR\n if + (\n nodeInfo.certificate_signing_request !== undefined &&\n serviceConfig.consensus + !== \"BFT\"\n ) {\n // Note: CSR and node certificate + validity config are only present from 2.x\n const default_validity_period_days + = 365;\n const max_allowed_cert_validity_period_days =\n serviceConfig.maximum_node_certificate_validity_days + ??\n default_validity_period_days;\n if (\n args.validity_period_days + !== undefined &&\n args.validity_period_days > max_allowed_cert_validity_period_days\n ) + {\n throw new Error(\n `Validity period ${args.validity_period_days} + is not allowed: max allowed is ${max_allowed_cert_validity_period_days}`\n );\n }\n\n const + endorsed_node_cert = ccf.network.generateEndorsedCertificate(\n nodeInfo.certificate_signing_request,\n args.valid_from,\n args.validity_period_days + ?? max_allowed_cert_validity_period_days\n );\n ccf.kv[\"public:ccf.gov.nodes.endorsed_certificates\"].set(\n ccf.strToBuf(args.node_id),\n ccf.strToBuf(endorsed_node_cert)\n );\n }\n }\n }\n ),\n ],\n [\n // + custom logic for ACL\n \"remove_node_code\",\n new Action(\n function + (args) {\n checkType(args.code_id_to_remove, \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, + \"string\", \"remaining_code_id\");\n },\n function (args) {\n const + remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if + (remainingCode === undefined) {\n throw new Error(`Code required + to remain is not present: ${args.remaining_code_id}`);\n }\n\n const + codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n },\n function + (args) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if + (rawConfig === undefined) {\n throw new Error(\"Service configuration + could not be found\");\n }\n const serviceConfig = ccf.bufToJsonCompatible(rawConfig);\n const + node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n return;\n }\n const node_obj + = ccf.bufToJsonCompatible(node);\n if (node_obj.status === \"Pending\") + {\n ccf.kv[\"public:ccf.gov.nodes.info\"].delete(\n ccf.strToBuf(args.node_id)\n );\n } + else {\n node_obj.status =\n serviceConfig.reconfiguration_type + === \"TwoTransaction\"\n ? \"Retiring\"\n : \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_node_certificate_validity\",\n new + Action(\n function (args) {\n checkEntityId(args.node_id, \"node_id\");\n checkType(args.valid_from, + \"string\", \"valid_from\");\n if (args.validity_period_days !== undefined) + {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if + (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const + nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status !== + \"Trusted\") {\n throw new Error(`Node ${args.node_id} is not trusted`);\n }\n\n setNodeCertificateValidityPeriod(\n args.node_id,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_all_nodes_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.nodes.info\"].forEach((v, k) => + {\n const nodeId = ccf.bufToStr(k);\n const nodeInfo = ccf.bufToJsonCompatible(v);\n if + (nodeInfo.status === \"Trusted\") {\n setNodeCertificateValidityPeriod(\n nodeId,\n nodeInfo,\n args.valid_from,\n args.validity_period_days\n );\n }\n });\n }\n ),\n ],\n [\n \"set_service_certificate_validity\",\n new + Action(\n function (args) {\n checkType(args.valid_from, \"string\", + \"valid_from\");\n if (args.validity_period_days !== undefined) {\n checkType(\n args.validity_period_days,\n \"integer\",\n \"validity_period_days\"\n );\n checkBounds(\n args.validity_period_days,\n 1,\n null,\n \"validity_period_days\"\n );\n }\n },\n function + (args) {\n setServiceCertificateValidityPeriod(\n args.valid_from,\n args.validity_period_days\n );\n }\n ),\n ],\n [\n \"set_service_configuration\",\n new + Action(\n function (args) {\n for (var key in args) {\n if + (key !== \"reconfiguration_type\" && key !== \"recovery_threshold\") {\n throw + new Error(\n `Cannot change ${key} via set_service_configuration.`\n );\n }\n }\n checkType(args.reconfiguration_type, + \"string?\", \"reconfiguration type\");\n checkType(args.recovery_threshold, + \"integer?\", \"recovery threshold\");\n checkBounds(args.recovery_threshold, + 1, 254, \"recovery threshold\");\n },\n function (args) {\n updateServiceConfig(args);\n }\n ),\n ],\n [\n \"trigger_ledger_chunk\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerLedgerChunk();\n }\n ),\n ],\n [\n \"trigger_snapshot\",\n new + Action(\n function (args) {},\n function (args, proposalId) {\n ccf.node.triggerSnapshot();\n }\n ),\n ],\n [\n \"set_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, + \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new + Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function + (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nfunction + getMemberInfo(memberId) {\n const key = ccf.strToBuf(memberId);\n const + value = ccf.kv[\"public:ccf.gov.members.info\"].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''ve 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 \"correct\" 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 \"add_node_code\", // Remove\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_node_code\", + // Remove\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_constitution\", + // Remove\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_member\", + // Remove,\n \"set_node_certificate_validity\",\n \"set_node_data\",\n \"set_service_certificate_validity\",\n \"set_service_configuration\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 + === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if + (memberData && memberData.is_operator) {\n return true;\n }\n } else + if (action.name === \"remove_member\") {\n const memberId = ccf.pemToId(action.args.cert);\n if + (isOperator(memberId)) {\n return true;\n }\n }\n return false;\n}\n\nexport + function resolve(proposal, proposerId, votes) {\n const actions = JSON.parse(proposal)[\"actions\"];\n\n // + Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote + && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding + operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, + key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if + (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // + A proposal is an operator change if it''s only applying operator actions.\n const + isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members + can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount + / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator + changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) + {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function + apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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}"}' + headers: + content-length: '45692' + content-type: application/json + x-ms-ccf-transaction-id: '4.23993' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/governance/constitution?api-version=2022-05-13 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-confidentialledger/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) + method: GET + uri: https://fake.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 + response: + body: + string: '{"currentNodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","enclaveQuotes":{"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f0607991573a6956b8eb8a806f199b1662b7a0000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a412000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c19817c2525ef909efdcb3b068499b33dd40cdaa832b5b697f47abe4543c302000000000000000000000000000000000000000000000000000000000000000044100000b11e25a28b1e13588dbf1b2c4878955ec399be0b80f3fcff5ba0c74b4b3baa8f84f3f5c8c8cd054b4ca9054dd9f130e5c26955abcf99b0e654af0f1af7424112cf7312969e233e971d6cff8c1dfa26b23c5457770c92c16ffc520d0ea6de78042a871cc06ac8fa1a56ca6f939d6c8de966197b4ad639042c1f3a3fcb1a706f7d13130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e010d58849d96a5e8df387100bba0e54295525d8af63be4143a132ed71ab65060000000000000000000000000000000000000000000000000000000000000000f1d9007f37ae0e150c7caae3403d0ae789f3647d34c622e1a46354c85e37d20b0fc6d656f2f21389c752ad551c9e4e957976949868b831dbd07bdc2f795650102000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f6741774942416749555a435233597a6879752f4c35304f6d59576c304b5648427974794177436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e6a41784e5459304d566f58445449354d4455774e6a41784e5459300a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e434141536a0a616f334b504378685a7833316e4d39636649584c35716178384e62506c6a6d47674b4e576b58657833447353343769313975753641422b6c48515a2b4e2b44610a6272555641532b384b55554a647559794654434b6f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554a6e42335a51626c3233376f6e447167616d536a0a4c454e343052497744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424243467870513847455a4534664f55436c4f7051516a624d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434951446a0a61463955556a506d633853374561364f726344486157706d534b3176516a476645442b43442b647744674967666945766a4e5357436675573464746d733568490a36673968757449584d31366463677864686478617466383d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100363a09dfc4c89c6f6e2721d3cc6c733eea531d291ac2d0f19a2f21a752396069"},"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"8fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f060736da9ce2321cee3355880f41a56573390000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a41200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a7dc3053d08f86d78567b5b3e6b1276737f7b172943affa9ca6eb5df079b3a940000000000000000000000000000000000000000000000000000000000000000441000005c97af7df5ddfb377e7a4393c9474aa3e3e0010aeb62264f443fee13e5350c1b32a8315d60e78d8e11068a672b49bffaf4fb10067bc7b80ffc018d79ea1ecd2313fc13db498262c28fa23cd129d1a7a35acf590229bc0ac5fea7baa72a316492e1382f6de652b51395de97053f2b5d4dfac694abbf88ab2c36f5a6469c1e209213130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942ab091bbdba69f4eb00f5945561b0eeb57919f838c67a1cbbb2257021e1ae30000000000000000000000000000000000000000000000000000000000000000cb28ef2eb7e09fc8112a45c921dbdfa7b23dc1a323cb6aee33f5856ca733f644b68ab1c28ab76391331e053195dc7df353fe45a8a02931abb176bd4e9744197f2000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a544343424453674177494241674956414e3435477035586a33644e4b36424f7345477462456c70776244324d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d6a41314d4459774d4449354d444a61467730794f5441314d4459774d4449350a4d444a614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a70304e4166325a324759647147615851573434594a4e4a6665755862734567736363356f7346376e6f634278503362727a48634c44494a4e75485767315358520a6265493859704f4e4e45302f5254635a7364513371364f434171677767674b6b4d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d477747413155644877526c4d474d77596142666f463247573268306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a4d7663474e7259334a7350324e680a5058427962324e6c63334e7663695a6c626d4e765a476c755a7a316b5a584977485159445652304f4242594546464b6f2b4969426b4f732f754f713130554e780a4439666c417664504d41344741315564447745422f775145417749477744414d42674e5648524d4241663845416a41414d4949423141594a4b6f5a496876684e0a415130424249494278544343416345774867594b4b6f5a496876684e4151304241515151414b6e6d74444761714536694b72444549434d53367a4343415751470a43697147534962345451454e41514977676746554d42414743797147534962345451454e41514942416745524d42414743797147534962345451454e415149430a416745524d42414743797147534962345451454e41514944416745434d42414743797147534962345451454e41514945416745454d42414743797147534962340a5451454e41514946416745424d42454743797147534962345451454e41514947416749416744415142677371686b69472b4530424451454342774942426a41510a42677371686b69472b45304244514543434149424144415142677371686b69472b45304244514543435149424144415142677371686b69472b453042445145430a436749424144415142677371686b69472b45304244514543437749424144415142677371686b69472b45304244514543444149424144415142677371686b69470a2b45304244514543445149424144415142677371686b69472b45304244514543446749424144415142677371686b69472b4530424451454344774942414441510a42677371686b69472b45304244514543454149424144415142677371686b69472b4530424451454345514942437a416642677371686b69472b453042445145430a4567515145524543424147414267414141414141414141414144415142676f71686b69472b45304244514544424149414144415542676f71686b69472b4530420a44514545424159416b473756414141774477594b4b6f5a496876684e4151304242516f424144414b42676771686b6a4f5051514441674e48414442454169424e0a6336414b6b67575338745963763753677345494e6c574d526d752b504b76757853756b744f6a33534d7749674e77526e35785a4a56544751517068646c4865690a39694c522b4f3133706b394d77313467776d33736357303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461008fedd41a386eab38da966e56e453fd47093fa897bed634e5357ad510a875ea3f"},"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811":{"mrenclave":"764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d3","nodeId":"ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811","quoteVersion":"OE_SGX_v1","raw":"030002000000000007000c00939a7233f79c4ca9940a0db3957f06072fa0d2c36c34306f70a1dc88d59ad2c40000000013130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000764eda4c145c01431f67144e00308a1609c344c743ddd6c790631c6a0dedb2d300000000000000000000000000000000000000000000000000000000000000006519b45e7593938e8c3edf88b26b398f41519a23ea90899fdf8b2cc29808a4120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055cc2178f6af43ca7eff3d5bde8fc761cf1abb330719aa16a1581f9d7c4375b3000000000000000000000000000000000000000000000000000000000000000044100000cbe398c2802d6d138d0e443d980d8334d309ec2263bbdfae9357f51ceea1ec244b0ff3f4c1f9aa6c9b6fb41793d44b69006888d2a234c7b34d916b030fa22df8dfa88c8fce6883e26e6a440f2ec0a01d689e0c30135a2c66b7c784c897bc755495b3329a058dd547d3a483e454673f5934fcc9ba73b38be3700924dccf455e3713130207ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000015000000000000000700000000000000ae123cbfa96c268560dfd5dffe4854ce443de4e0fa51d281184c9428d7a340fb00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ae853068706466e0007aa229170ba44dfaa60f06b11f0eddd9ece932e63d5db400000000000000000000000000000000000000000000000000000000000000000e56496762f81fa526b69f30fd1c1978573bdf4a06fc80575faccd87533ccdbab4115a0c22f21b48c021f99e86a70e5061b70950164e5dab165ebe97ee26c5762000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500dc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456a54434342444f674177494241674955583367495779635930394552326f6679544e644a724a727245507777436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449794d4455774e5449794d5441314d566f58445449354d4455774e5449794d5441310a4d566f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414151670a4a524b74683978634f6a376c525336494d716858346139466b3373535349524e4e507237374771764d376653513174356c6a41723674482b4f58645571764b690a576747715a2f6879424d4e434531634474336f786f3449437144434341715177487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077624159445652306642475577597a42686f462b6758595a626148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d7939775932746a636d772f593245390a63484a765932567a633239794a6d56755932396b6157356e5057526c636a416442674e5648513445466751554c7a6378587631425645756e58694e436c76626e0a4353434c4a53597744675944565230504151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b4530420a44514545676748464d4949427754416542676f71686b69472b45304244514542424244786467466b712f7256564c2f6a5477324d664b666a4d4949425a41594b0a4b6f5a496876684e41513042416a4343415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e41513042416749430a415245774541594c4b6f5a496876684e4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e0a4151304241675543415145774551594c4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d4241470a43797147534962345451454e41514949416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b0a416745414d42414743797147534962345451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962340a5451454e4151494e416745414d42414743797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d4241470a43797147534962345451454e41514951416745414d42414743797147534962345451454e415149524167454c4d42384743797147534962345451454e415149530a4242415245514945415941474141414141414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e0a4151514542674351627455414144415042676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543495144350a7150586948746d584f794f69364e694c71534c7154337269726b636d535052673630472b46485056495149674c794768736142416c4f5679527549694d552b460a422b45366652366e465135436c4f637662584d4564376b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436d444343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4455774d5442614677307a4d7a41314d6a45784d4455774d5442614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356b5a584977485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413067414d4555434951434a6754627456714f795a316d336a716941584d365159613672357357530a34792f4737793875494a4778647749675271507642534b7a7a516167424c517135733541373070646f6961524a387a2f3075447a344e675639316b3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a7a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4455784d466f58445451354d54497a4d54497a4e546b314f566f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d526c636a416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a3045417749445351417752674968414f572f35516b522b533943695344634e6f6f774c7550524c735747662f59693747535839344267775477670a41694541344a306c72486f4d732b586f356f2f7358364f39515778485241765a55474f6452513763767152586171493d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100ea2134eb183f2c8fa496df3c06d91a47881421a53b110c603304c2de768e1811"}}}' + headers: + content-length: '28962' + content-type: application/json + x-ms-ccf-transaction-id: '4.23993' + status: + code: 200 + message: OK + url: https://lyshi-python-sdk.confidential-ledger.azure.com/app/enclaveQuotes?api-version=2022-05-13 +version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow.yaml deleted file mode 100644 index 4c400d178b6d..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow.yaml +++ /dev/null @@ -1,362 +0,0 @@ -interactions: -- request: - body: '{"contents": "Test entry from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: - - '29' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.791' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.791"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.791' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.791"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.791"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.791"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: - - '155' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"c6ff45c791e9f9bc83617be831ae31e7f476934d0eca60f5bb8ff4ed4fecd275\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"b3e44ff0b7dab82fb49bb32fdd6e0cb44049e1468c8d72bbd3d20edb890d888d\"\n - \ },\n {\n \"left\": \"fe8bce340031d52515605de42ff59d108bc18636a9ef43ce06334044b6449894\"\n - \ },\n {\n \"left\": \"eef07e7e02706882b083567bddf4d1a4960e3807c208aea6873e71c01f5f27ba\"\n - \ },\n {\n \"left\": \"4612203c4ef12cbcd118d55d3bb002de29c8c0f2f890be1d17f8787616bfbac4\"\n - \ },\n {\n \"left\": \"09e133afb1022496ed845867002503542072673095d3f0971a7d59b68d01d5ed\"\n - \ },\n {\n \"left\": \"350d1ee3e0e7c1956d536f0ba67a81b793eefd5f6fba139f5a739fafeb5fa098\"\n - \ }\n ],\n \"root\": \"02b4936d39607ee3e5be1804ac7ef6abc421b49138ba46b5680392c9487773cf\",\n - \ \"signature\": \"MEUCIQD6wf1ff59wWxCs3CocR3lbjWBfX+gsM9X9A+IYhQ9OuQIgOq+nWn0UU5k8TP/GqFQeD8fr8sunWpkiPwTnMydTgPo=\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.791\"\n}" - headers: - content-length: - - '1050' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry from Python SDK","subLedgerId":"subledger:0","transactionId":"2.792"}' - headers: - content-length: - - '93' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.792' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: - - '29' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.793' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.793/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.793"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.793' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.793/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.793"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.794' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry 2 from Python SDK","subLedgerId":"subledger:0","transactionId":"2.794"}' - headers: - content-length: - - '95' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.794' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.791?api-version=0.1-preview - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test entry from Python SDK\",\n - \ \"subLedgerId\": \"subledger:0\",\n \"transactionId\": \"2.791\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '149' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.794' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow_with_sub_ledger_id.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow_with_sub_ledger_id.yaml deleted file mode 100644 index 63a67eff86a2..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_append_entry_flow_with_sub_ledger_id.yaml +++ /dev/null @@ -1,362 +0,0 @@ -interactions: -- request: - body: '{"contents": "Test sub-ledger entry from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '53' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: - - '21' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.795' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.795"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.795' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.795"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.795' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.795"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.796' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.795"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.796' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: - - '155' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.796' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"2eb4ddb7acac8240265941fecb9bbb30f54d372ef86eab96b23df10d47ae7886\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"1ca6ad0ef40c91ab241c8d8b37cffc84d84f821a9fc379db2910e34acccece1f\"\n - \ },\n {\n \"left\": \"1f90edbcbfa213ed46e72a8e49eab014b241b28d976c714d3fa30f21905ca5d3\"\n - \ },\n {\n \"left\": \"857d72f85ae89b33045c42903d1c734eb3441fb03a1a3f6f4d34c85214a007d1\"\n - \ },\n {\n \"left\": \"4612203c4ef12cbcd118d55d3bb002de29c8c0f2f890be1d17f8787616bfbac4\"\n - \ },\n {\n \"left\": \"09e133afb1022496ed845867002503542072673095d3f0971a7d59b68d01d5ed\"\n - \ },\n {\n \"left\": \"350d1ee3e0e7c1956d536f0ba67a81b793eefd5f6fba139f5a739fafeb5fa098\"\n - \ }\n ],\n \"root\": \"7ee955b1cd95db63532638aed8ff3c18b3ddbd3df18f6a5001f00e5312987868\",\n - \ \"signature\": \"MEYCIQCm5xgKPm+3v2TUCLQaDRyVwUpqHzy3hcC1cOuwRrVYPQIhANVvtpsAHwL5Y8zGC023ETBN3A3Ry/tTGUoY5EHBggcy\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.795\"\n}" - headers: - content-length: - - '1050' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.796' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry from Python SDK","subLedgerId":"132","transactionId":"2.796"}' - headers: - content-length: - - '96' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.796' - status: - code: 200 - message: OK -- request: - body: '{"contents": "Test sub-ledger entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: - - '21' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.797' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.797/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.797"}' - headers: - content-length: - - '43' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.797' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.797/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.797"}' - headers: - content-length: - - '45' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.798' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry 2 from Python SDK","subLedgerId":"132","transactionId":"2.798"}' - headers: - content-length: - - '98' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.798' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.795?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test sub-ledger entry from Python - SDK\",\n \"subLedgerId\": \"132\",\n \"transactionId\": \"2.795\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '152' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.798' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_range_query.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_range_query.yaml deleted file mode 100644 index cfc6fec6b873..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_range_query.yaml +++ /dev/null @@ -1,6975 +0,0 @@ -interactions: -- request: - body: '{"contents": "message-0"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.799' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-1"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.800' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-2"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.801' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-3"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.802' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-4"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.803' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-5"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.804' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-6"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.805' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-7"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.806' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-8"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.807' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-9"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.808' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-10"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.810' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-11"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.811' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-12"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.812' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-13"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.813' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-14"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.814' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-15"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.815' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-16"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.816' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-17"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.818' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-18"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.819' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-19"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.820' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-20"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.821' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-21"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.822' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-22"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.823' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-23"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.824' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-24"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.825' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-25"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.826' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-26"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.828' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-27"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.829' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-28"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.830' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-29"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.831' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-30"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.832' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-31"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.833' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-32"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.834' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-33"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.835' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-34"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.837' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-35"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.838' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-36"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.839' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-37"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.840' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-38"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.841' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-39"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.842' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-40"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.843' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-41"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.844' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-42"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.846' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-43"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.847' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-44"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.848' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-45"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.849' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-46"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.850' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-47"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.851' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-48"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.852' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-49"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.854' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-50"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.855' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-51"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.856' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-52"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.857' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-53"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.858' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-54"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.859' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-55"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.860' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-56"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.862' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-57"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.863' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-58"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.864' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-59"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.865' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-60"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.866' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-61"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.867' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-62"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.868' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-63"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.869' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-64"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.871' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-65"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.872' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-66"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.873' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-67"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.874' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-68"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.875' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-69"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.876' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-70"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.877' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-71"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.878' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-72"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.880' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-73"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.881' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-74"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.882' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-75"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.883' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-76"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.884' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-77"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.885' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-78"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.886' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-79"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.887' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-80"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.888' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-81"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.890' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-82"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.891' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-83"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.892' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-84"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.893' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-85"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.894' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-86"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.895' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-87"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.896' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-88"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.897' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-89"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.898' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-90"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.899' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-91"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.900' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-92"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.902' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-93"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.903' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-94"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.904' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-95"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.905' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-96"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.906' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-97"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.907' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-98"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.908' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-99"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.910' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-100"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.911' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-101"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.912' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-102"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.913' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-103"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.914' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-104"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.915' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-105"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.916' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-106"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.918' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-107"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.919' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-108"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.920' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-109"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.921' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-110"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.922' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-111"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.923' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-112"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.924' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-113"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.925' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-114"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.926' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-115"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.928' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-116"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.929' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-117"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.930' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-118"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.931' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-119"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.932' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-120"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.933' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-121"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.934' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-122"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.935' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-123"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.936' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-124"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.937' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-125"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.938' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-126"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.939' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-127"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.941' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-128"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.942' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-129"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.943' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-130"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.944' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-131"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.945' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-132"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.946' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-133"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.947' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-134"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.948' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-135"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.949' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-136"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.950' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-137"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.952' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-138"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.953' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-139"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.954' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-140"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.955' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-141"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.956' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-142"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.957' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-143"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.958' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-144"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.959' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-145"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.960' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-146"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.961' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-147"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.962' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-148"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.964' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-149"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.965' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-150"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.966' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-151"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.967' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-152"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.968' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-153"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.969' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-154"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.970' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-155"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.971' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-156"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.972' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-157"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.974' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-158"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.975' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-159"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.976' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-160"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.977' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-161"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.978' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-162"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.979' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-163"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.980' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-164"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.981' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-165"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.983' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-166"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.984' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-167"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.985' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-168"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.986' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-169"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.987' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-170"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.988' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-171"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.989' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-172"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.991' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-173"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.992' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-174"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.993' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-175"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.994' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-176"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.995' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-177"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.996' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-178"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.997' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-179"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.998' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-180"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.999' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-181"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1000' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-182"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1001' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-183"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1002' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-184"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1004' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-185"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1005' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-186"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1006' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-187"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1007' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-188"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1008' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-189"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1009' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-190"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1010' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-191"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1011' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-192"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1012' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-193"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1013' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-194"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1014' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-195"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1015' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-196"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1016' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-197"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1018' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-198"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1019' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-199"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1020' - status: - code: 200 - message: OK -- request: - body: '{"contents": "message-200"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: - - '19' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.799 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.799\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.799 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.900\",\n - \ \"entries\": [\n {\n \"contents\": \"message-0\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.799\"\n },\n {\n \"contents\": - \"message-5\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.804\"\n - \ },\n {\n \"contents\": \"message-10\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.810\"\n },\n {\n \"contents\": - \"message-15\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.815\"\n - \ },\n {\n \"contents\": \"message-20\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.821\"\n },\n {\n \"contents\": - \"message-25\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.826\"\n - \ },\n {\n \"contents\": \"message-30\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.832\"\n },\n {\n \"contents\": - \"message-35\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.838\"\n - \ },\n {\n \"contents\": \"message-40\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.843\"\n },\n {\n \"contents\": - \"message-45\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.849\"\n - \ },\n {\n \"contents\": \"message-50\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.855\"\n },\n {\n \"contents\": - \"message-55\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.860\"\n - \ },\n {\n \"contents\": \"message-60\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.866\"\n },\n {\n \"contents\": - \"message-65\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.872\"\n - \ },\n {\n \"contents\": \"message-70\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.877\"\n },\n {\n \"contents\": - \"message-75\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.883\"\n - \ },\n {\n \"contents\": \"message-80\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.888\"\n },\n {\n \"contents\": - \"message-85\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.894\"\n - \ },\n {\n \"contents\": \"message-90\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.899\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.900 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1001\",\n - \ \"entries\": [\n {\n \"contents\": \"message-95\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.905\"\n },\n {\n \"contents\": - \"message-100\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.911\"\n },\n {\n \"contents\": \"message-105\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.916\"\n },\n {\n \"contents\": - \"message-110\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.922\"\n },\n {\n \"contents\": \"message-115\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.928\"\n },\n {\n \"contents\": - \"message-120\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.933\"\n },\n {\n \"contents\": \"message-125\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.938\"\n },\n {\n \"contents\": - \"message-130\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.944\"\n },\n {\n \"contents\": \"message-135\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.949\"\n },\n {\n \"contents\": - \"message-140\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.955\"\n },\n {\n \"contents\": \"message-145\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.960\"\n },\n {\n \"contents\": - \"message-150\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.966\"\n },\n {\n \"contents\": \"message-155\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.971\"\n },\n {\n \"contents\": - \"message-160\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.977\"\n },\n {\n \"contents\": \"message-165\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.983\"\n },\n {\n \"contents\": - \"message-170\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.988\"\n },\n {\n \"contents\": \"message-175\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.994\"\n },\n {\n \"contents\": - \"message-180\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.999\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '1993' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1001 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-185\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1005\"\n },\n - \ {\n \"contents\": \"message-190\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.1010\"\n },\n {\n \"contents\": \"message-195\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1015\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '353' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.800 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.800\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.800 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.901\",\n - \ \"entries\": [\n {\n \"contents\": \"message-1\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.800\"\n },\n {\n \"contents\": - \"message-6\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.805\"\n - \ },\n {\n \"contents\": \"message-11\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.811\"\n },\n {\n \"contents\": - \"message-16\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.816\"\n - \ },\n {\n \"contents\": \"message-21\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.822\"\n },\n {\n \"contents\": - \"message-26\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.828\"\n - \ },\n {\n \"contents\": \"message-31\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.833\"\n },\n {\n \"contents\": - \"message-36\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.839\"\n - \ },\n {\n \"contents\": \"message-41\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.844\"\n },\n {\n \"contents\": - \"message-46\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.850\"\n - \ },\n {\n \"contents\": \"message-51\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.856\"\n },\n {\n \"contents\": - \"message-56\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.862\"\n - \ },\n {\n \"contents\": \"message-61\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.867\"\n },\n {\n \"contents\": - \"message-66\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.873\"\n - \ },\n {\n \"contents\": \"message-71\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.878\"\n },\n {\n \"contents\": - \"message-76\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.884\"\n - \ },\n {\n \"contents\": \"message-81\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.890\"\n },\n {\n \"contents\": - \"message-86\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.895\"\n - \ },\n {\n \"contents\": \"message-91\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.900\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2075' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.901 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1002\",\n - \ \"entries\": [\n {\n \"contents\": \"message-96\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.906\"\n },\n {\n \"contents\": - \"message-101\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.912\"\n },\n {\n \"contents\": \"message-106\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.918\"\n },\n {\n \"contents\": - \"message-111\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.923\"\n },\n {\n \"contents\": \"message-116\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.929\"\n },\n {\n \"contents\": - \"message-121\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.934\"\n },\n {\n \"contents\": \"message-126\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.939\"\n },\n {\n \"contents\": - \"message-131\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.945\"\n },\n {\n \"contents\": \"message-136\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.950\"\n },\n {\n \"contents\": - \"message-141\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.956\"\n },\n {\n \"contents\": \"message-146\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.961\"\n },\n {\n \"contents\": - \"message-151\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.967\"\n },\n {\n \"contents\": \"message-156\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.972\"\n },\n {\n \"contents\": - \"message-161\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.978\"\n },\n {\n \"contents\": \"message-166\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.984\"\n },\n {\n \"contents\": - \"message-171\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.989\"\n },\n {\n \"contents\": \"message-176\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.995\"\n },\n {\n \"contents\": - \"message-181\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1000\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '1994' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1021' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1002 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1002\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '123' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1002 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-186\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1006\"\n },\n - \ {\n \"contents\": \"message-191\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.1011\"\n },\n {\n \"contents\": \"message-196\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1016\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '353' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.801 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.801\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.801 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.902\",\n - \ \"entries\": [\n {\n \"contents\": \"message-2\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.801\"\n },\n {\n \"contents\": - \"message-7\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.806\"\n - \ },\n {\n \"contents\": \"message-12\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.812\"\n },\n {\n \"contents\": - \"message-17\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.818\"\n - \ },\n {\n \"contents\": \"message-22\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.823\"\n },\n {\n \"contents\": - \"message-27\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.829\"\n - \ },\n {\n \"contents\": \"message-32\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.834\"\n },\n {\n \"contents\": - \"message-37\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.840\"\n - \ },\n {\n \"contents\": \"message-42\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.846\"\n },\n {\n \"contents\": - \"message-47\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.851\"\n - \ },\n {\n \"contents\": \"message-52\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.857\"\n },\n {\n \"contents\": - \"message-57\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.863\"\n - \ },\n {\n \"contents\": \"message-62\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.868\"\n },\n {\n \"contents\": - \"message-67\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.874\"\n - \ },\n {\n \"contents\": \"message-72\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.880\"\n },\n {\n \"contents\": - \"message-77\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.885\"\n - \ },\n {\n \"contents\": \"message-82\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.891\"\n },\n {\n \"contents\": - \"message-87\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.896\"\n - \ }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '1973' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.902 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1003\",\n - \ \"entries\": [\n {\n \"contents\": \"message-92\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.902\"\n },\n {\n \"contents\": - \"message-97\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.907\"\n - \ },\n {\n \"contents\": \"message-102\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.913\"\n },\n {\n \"contents\": - \"message-107\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.919\"\n },\n {\n \"contents\": \"message-112\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.924\"\n },\n {\n \"contents\": - \"message-117\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.930\"\n },\n {\n \"contents\": \"message-122\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.935\"\n },\n {\n \"contents\": - \"message-127\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.941\"\n },\n {\n \"contents\": \"message-132\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.946\"\n },\n {\n \"contents\": - \"message-137\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.952\"\n },\n {\n \"contents\": \"message-142\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.957\"\n },\n {\n \"contents\": - \"message-147\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.962\"\n },\n {\n \"contents\": \"message-152\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.968\"\n },\n {\n \"contents\": - \"message-157\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.974\"\n },\n {\n \"contents\": \"message-162\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.979\"\n },\n {\n \"contents\": - \"message-167\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.985\"\n },\n {\n \"contents\": \"message-172\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.991\"\n },\n {\n \"contents\": - \"message-177\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.996\"\n },\n {\n \"contents\": \"message-182\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1001\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2096' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1003 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-187\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1007\"\n },\n - \ {\n \"contents\": \"message-192\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.1012\"\n },\n {\n \"contents\": \"message-197\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1018\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '353' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.802 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.802\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.802 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.802\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.802 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.903\",\n - \ \"entries\": [\n {\n \"contents\": \"message-3\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.802\"\n },\n {\n \"contents\": - \"message-8\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.807\"\n - \ },\n {\n \"contents\": \"message-13\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.813\"\n },\n {\n \"contents\": - \"message-18\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.819\"\n - \ },\n {\n \"contents\": \"message-23\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.824\"\n },\n {\n \"contents\": - \"message-28\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.830\"\n - \ },\n {\n \"contents\": \"message-33\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.835\"\n },\n {\n \"contents\": - \"message-38\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.841\"\n - \ },\n {\n \"contents\": \"message-43\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.847\"\n },\n {\n \"contents\": - \"message-48\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.852\"\n - \ },\n {\n \"contents\": \"message-53\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.858\"\n },\n {\n \"contents\": - \"message-58\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.864\"\n - \ },\n {\n \"contents\": \"message-63\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.869\"\n },\n {\n \"contents\": - \"message-68\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.875\"\n - \ },\n {\n \"contents\": \"message-73\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.881\"\n },\n {\n \"contents\": - \"message-78\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.886\"\n - \ },\n {\n \"contents\": \"message-83\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.892\"\n },\n {\n \"contents\": - \"message-88\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.897\"\n - \ }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '1973' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.903 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1004\",\n - \ \"entries\": [\n {\n \"contents\": \"message-93\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.903\"\n },\n {\n \"contents\": - \"message-98\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.908\"\n - \ },\n {\n \"contents\": \"message-103\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.914\"\n },\n {\n \"contents\": - \"message-108\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.920\"\n },\n {\n \"contents\": \"message-113\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.925\"\n },\n {\n \"contents\": - \"message-118\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.931\"\n },\n {\n \"contents\": \"message-123\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.936\"\n },\n {\n \"contents\": - \"message-128\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.942\"\n },\n {\n \"contents\": \"message-133\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.947\"\n },\n {\n \"contents\": - \"message-138\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.953\"\n },\n {\n \"contents\": \"message-143\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.958\"\n },\n {\n \"contents\": - \"message-148\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.964\"\n },\n {\n \"contents\": \"message-153\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.969\"\n },\n {\n \"contents\": - \"message-158\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.975\"\n },\n {\n \"contents\": \"message-163\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.980\"\n },\n {\n \"contents\": - \"message-168\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.986\"\n },\n {\n \"contents\": \"message-173\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.992\"\n },\n {\n \"contents\": - \"message-178\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.997\"\n },\n {\n \"contents\": \"message-183\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1002\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2096' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1004 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-188\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1008\"\n },\n - \ {\n \"contents\": \"message-193\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.1013\"\n },\n {\n \"contents\": \"message-198\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1019\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '353' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.803 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.803\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.803 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.803\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.803 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.904\",\n - \ \"entries\": [\n {\n \"contents\": \"message-4\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.803\"\n },\n {\n \"contents\": - \"message-9\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.808\"\n - \ },\n {\n \"contents\": \"message-14\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.814\"\n },\n {\n \"contents\": - \"message-19\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.820\"\n - \ },\n {\n \"contents\": \"message-24\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.825\"\n },\n {\n \"contents\": - \"message-29\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.831\"\n - \ },\n {\n \"contents\": \"message-34\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.837\"\n },\n {\n \"contents\": - \"message-39\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.842\"\n - \ },\n {\n \"contents\": \"message-44\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.848\"\n },\n {\n \"contents\": - \"message-49\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.854\"\n - \ },\n {\n \"contents\": \"message-54\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.859\"\n },\n {\n \"contents\": - \"message-59\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.865\"\n - \ },\n {\n \"contents\": \"message-64\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.871\"\n },\n {\n \"contents\": - \"message-69\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.876\"\n - \ },\n {\n \"contents\": \"message-74\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.882\"\n },\n {\n \"contents\": - \"message-79\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.887\"\n - \ },\n {\n \"contents\": \"message-84\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.893\"\n },\n {\n \"contents\": - \"message-89\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.898\"\n - \ }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '1973' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.904 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.904\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: - - '122' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.904 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1005\",\n - \ \"entries\": [\n {\n \"contents\": \"message-94\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.904\"\n },\n {\n \"contents\": - \"message-99\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.910\"\n - \ },\n {\n \"contents\": \"message-104\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.915\"\n },\n {\n \"contents\": - \"message-109\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.921\"\n },\n {\n \"contents\": \"message-114\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.926\"\n },\n {\n \"contents\": - \"message-119\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.932\"\n },\n {\n \"contents\": \"message-124\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.937\"\n },\n {\n \"contents\": - \"message-129\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.943\"\n },\n {\n \"contents\": \"message-134\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.948\"\n },\n {\n \"contents\": - \"message-139\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.954\"\n },\n {\n \"contents\": \"message-144\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.959\"\n },\n {\n \"contents\": - \"message-149\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.965\"\n },\n {\n \"contents\": \"message-154\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.970\"\n },\n {\n \"contents\": - \"message-159\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.976\"\n },\n {\n \"contents\": \"message-164\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.981\"\n },\n {\n \"contents\": - \"message-169\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.987\"\n },\n {\n \"contents\": \"message-174\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.993\"\n },\n {\n \"contents\": - \"message-179\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.998\"\n },\n {\n \"contents\": \"message-184\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1004\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '2096' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1005 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-189\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1009\"\n },\n - \ {\n \"contents\": \"message-194\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.1014\"\n },\n {\n \"contents\": \"message-199\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1020\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: - - '353' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1022' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_user_management.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_user_management.yaml deleted file mode 100644 index 40239dc0140b..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_user_management.yaml +++ /dev/null @@ -1,166 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Contributor"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '31' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '78' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1023' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '78' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1023' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: - - '0' - x-ms-ccf-transaction-id: - - '2.1025' - status: - code: 204 - message: No Content -- request: - body: '{"assignedRole": "Reader"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '73' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1026' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: - - '73' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1026' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: - - '0' - x-ms-ccf-transaction-id: - - '2.1027' - status: - code: 204 - message: No Content -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_verification_methods.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_verification_methods.yaml deleted file mode 100644 index bbf5bbe8f755..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate.test_verification_methods.yaml +++ /dev/null @@ -1,371 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview - response: - body: - string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB+DCCAX2gAwIBAgIQbqIwsiHHQlWkhweK0NbPODAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjAxMTExMjAyNDUwWhcN\nMjExMTExMjAzNDUwWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAATTFBoe5FRZTXSQn5ZGl7BV40FpF6fvK3mj\nuDbh3BpAFCC9eXIU9nrGEEoaWH2n++c0TXuaR9TlXEm1ms47YMGmvr/epdI2Qgd6\nBC6bwYfMoRFVH/+G+itRj70ywY+lqrmjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBQefKdvzGwngW5bffiMcfFhoBYtNzAdBgNVHQ4EFgQUHnynb8xsJ4FuW334jHHx\nYaAWLTcwCgYIKoZIzj0EAwMDaQAwZgIxAKb40n899np5eoAei4YatmJ9P2kdGyGP\nqQBslkobR/Gb++QAHbFoD4m2tANPtpmYJAIxANklOHFie1OSLVwzl3n8zBbt1+KX\naH1qYPDr3MzPfvSBq7ckBGem2C6EEX4ratWAGQ==\n-----END - CERTIFICATE-----","id":"eec5d23a0f376538a34cccb35705cad4850741dcf82cd9ec39d3972aabc58a72"}]}' - headers: - content-length: - - '860' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1027' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview - response: - body: - string: '{"digest":"f1167f64777c56b6e2d14615b6b2ada50a5db07b83ae724500f7a7313c9461da","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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const - groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} - is not a valid URL.`);\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(\"?\");\n if - (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type - = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) - {\n throw new Error(`${field} must be an array`);\n }\n } else if - (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw - new Error(`${field} must be an integer`);\n }\n } else if (typeof value - !== type) {\n throw new Error(`${field} must be of type ${type} but is - ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if - (!members.includes(value)) {\n throw new Error(`${field} must be one of - ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if - (low !== null && value < low) {\n throw new Error(`${field} must be greater - than ${low}`);\n }\n if (high !== null && value > high) {\n throw new - Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, - min, max, field) {\n if (min !== null && value.length < min) {\n throw - new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if - (max !== null && value.length > max) {\n throw new Error(`${field} must - be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) - {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal - does not accept any argument, found \"${args}\"`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, - k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if - (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} - has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if - (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return - activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, - \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for - (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", - `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, - \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, - `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) - {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const - pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END - CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction - checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) - {\n throw new Error(\n `${field} must be a valid X509 certificate - (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) - {\n let proposals = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n const - proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n proposalsMap.forEach((v, - k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) - {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === - \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, - ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions - = new Map([\n [\n \"set_constitution\",\n new Action(\n function - (args) {\n checkType(args.constitution, \"string\");\n },\n function - (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, - \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } - else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 - = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const - rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if - (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } - else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const - ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n },\n function (args) {\n const rawMemberId - = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if - (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const - memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember - = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 - && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const - activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) - {\n throw new Error(\n `Number of active recovery - members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold - (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if - (isActiveMember && 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 \"set_member_data\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function - (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let - members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info - = members_info.get(member_id);\n if (member_info === undefined) {\n throw - new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, - \"object?\", \"user_data\");\n },\n function (args) {\n let - userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n },\n function (args) {\n const user_id = - ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function - (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId - = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function - (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n let - userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new - Action(\n function (args) {\n checkType(args.recovery_threshold, - \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, - 1, 254, \"threshold\");\n },\n function (args) {\n const - rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\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[\"public:ccf.gov.service.info\"].get(\n getSingletonKvKey()\n );\n if - (rawService === undefined) {\n throw new Error(\"Service information - could not be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if - (service.status === \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot - set recovery threshold if service is ${service.status}`\n );\n } - else if (service.status === \"Open\") {\n let activeRecoveryMembersCount - = getActiveRecoveryMembersCount();\n if (args.recovery_threshold - > activeRecoveryMembersCount) {\n throw new Error(\n `Cannot - set recovery threshold to ${args.recovery_threshold}: recovery threshold would - be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n\n config.recovery_threshold - = args.recovery_threshold;\n ccf.kv[\"public:ccf.gov.service.config\"].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n function - (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \"set_js_app\",\n new - Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, - \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, - \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) - {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, - \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", - `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, - \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", - `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) - {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for - (const [method, info] of Object.entries(endpoint)) {\n const prefix2 - = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, - \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, - \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", - \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", - \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, - \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for - (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, - \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if - (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw - new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n },\n function - (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const - endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should - expose .clear()\n modulesMap.forEach((_, k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n\n const bundle - = args.bundle;\n for (const module of bundle.modules) {\n const - path = \"/\" + 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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module - = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, - infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new - Action(\n function (args) { },\n function (args) {\n const - modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const endpointsMap - = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should expose .clear()\n modulesMap.forEach((_, - k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, - bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n },\n function (args) {\n const name = args.name;\n const - nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, - \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, - [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", - \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, - \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, - \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) - {\n throw new Error(\n \"ca_cert_bundle_name is missing - but required if auto_refresh is true\"\n );\n }\n let - url;\n try {\n url = parseUrl(args.issuer);\n } - catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh - is true\");\n }\n if (url.scheme != \"https\") {\n throw - new Error(\n \"issuer must be a URL starting with https:// if - auto_refresh is true\"\n );\n }\n if (url.query - || url.fragment) {\n throw new Error(\n \"issuer must - be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) - {\n throw new Error(\n `No CA cert bundle found with - name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, - metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function - (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const - metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if - (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} - not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const - jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n },\n function (args) {\n const issuerBuf = - ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) - {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \"add_node_code\",\n new - Action(\n function (args) {\n checkType(args.new_code_id, \"string\", - \"new_code_id\");\n checkType(args.existing_code_id, \"string\", \"existing_code_id\");\n },\n function - (args, proposalId) {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if - (existingCode === undefined) {\n throw new Error(`Code required to - exist is not present: ${args.existing_code_id}`);\n }\n\n const - newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"transition_node_to_trusted\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const - nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === - \"Pending\") {\n nodeInfo.status = \"Trusted\";\n nodeInfo.ledger_secret_seqno - = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \"remove_node_code\",\n new - Action(\n function (args) {\n checkType(args.code_id_to_remove, - \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, - \"string\", \"remaining_code_id\");\n },\n function (args) {\n const - remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if - (remainingCode === undefined) {\n throw new Error(`Code required - to remain is not present: ${args.remaining_code_id}`);\n }\n\n const - codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status - = \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, - \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function - (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport - function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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[\"public:ccf.gov.members.info\"].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 // Some actions can always be called by operators.\n const allowedOperatorActions - = [\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 - === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if - (memberData && memberData.is_operator) {\n return true;\n }\n } else - if (action.name === \"remove_member\") {\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)[\"actions\"];\n\n // - Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote - && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding - operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, - key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if - (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // - A proposal is an operator change if it''s only applying operator actions.\n const - isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members - can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount - / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator - changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) - {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function - validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let - position = 0;\n for (const action of proposal[\"actions\"]) {\n const - definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } - catch (e) {\n errors.push(\n `${action.name} at position ${position} - failed validation: ${e}\\n${e.stack}`\n );\n }\n } else {\n errors.push(`${action.name}: - no such action`);\n }\n position++;\n }\n return { valid: errors.length - === 0, description: errors.join(\", \") };\n}\n"}' - headers: - content-length: - - '30912' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1027' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview - response: - body: - string: '{"currentNodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","enclaveQuotes":{"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074fca16e1b382cc4d9313fca5acbf408b0000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b29f6c95262f276c27d647ad544333f705abc0d492c1bb6c8c5e85cd5349cf800000000000000000000000000000000000000000000000000000000000000003410000061af278ff696604a85f21ef449253c0d0053cefafddc13716293cde909aa5258b6f21ed480e8411418632b768a16a790c4efee2b69278a2b72ccc8411a59fa6e8eb0721568eb8eefb5ffe48d4c0535ccbd637f6998f30d252334d093bfe489707cef9b5abbe51428ff6feb0d5590723896f7e3d8466e7c4c7f661f5588b1cbc011110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045566c39ee9249e7f197a87256fd7267ac67bec7f27e6133d95306656244366e00000000000000000000000000000000000000000000000000000000000000007d1cada36a9e54bde941973bd2de03d5304bffdd775474aec6d38207272d9226a3e9e0314555d3960507f3224cf7d2009d75c8b968071fc31094a3dfb999c1e42000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436167417749424167495545646d6b4833625131367152525856766e73307369596b3979495577436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4449784d4449794d5455774e466f58445449344d4449784d4449794d5455770a4e466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414152680a5247587236365079506673764a55444a666158563841575957586768454e6b784638614d6d3471396a5a543546356d2f4d446b466365724a735a486c6d2b58710a4471673138452f344f416e39622f70344e366d796f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d42304741315564446751574242537956634a3754335950586f383059535762493759504e514233506a414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e4151454545475a445038395a483248673435704f4f5337372b564d776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b45304244514543415149424554415142677371686b69472b45304244514543416749424554415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454245524167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445351417752674968414a497245793530694b564857596f70573844500a56525366306859546f7232535830674b4f517569354f644241694541354d6351674a7a615550497a456342714c7970554a646a6a5a6e694c77686458387a75520a496458303244593d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee"},"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074873041a31fa9e99c28726074c95f0110000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cbf1112f99fb6a724779ee53b9caf70408fa5408bb7f309ae29ce550b583b7a0000000000000000000000000000000000000000000000000000000000000000341000004d5c886623f85f5223e27226dd322449239a5c3cccc355503a18f85d62b7823d2d0bc53f9c631483f96a85a5b9c55a30bcfa90cdb697d7fee0d7dd41ed111917f90fc89d9b26a4f817549ca484f845ccdd2e7a58317ef86498dc72f884122fcb744c534915ab067517627d73b1984d14196a6cb2ecc8f86bf62a81b535213e0411110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f588dbf7520c9e3cc41fff530db8b42141a25b1f84f167963cb1305d0557d130000000000000000000000000000000000000000000000000000000000000000cc63294e9101303c80d2cf7b5ff71a272506220378e2f50331a69cbf1eab6b76fc4b70eb794e6650c41220f4dbb5c2ab583ec153d1eddf72f5b34fc82b8621542000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436567417749424167495641495a565a7a647836376f5348596b535a47696b2f7a764f715a4d554d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d5463774e5441304e444e61467730794f44417a4d5463774e5441300a4e444e614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4f63727649474473437751544e6535344135436c444d3864542f78627a4c476b50614932617352555a56392b3367712b5855626d486731724631462f534f6d700a6337576759624737747a70716e662b7a67324e4250614f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e564851344546675155685539616b6630615270427168507145587378754e736a2f6672457744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b453042445145424242435070554b3474472b5243415148592b7353395a76644d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434944644e6a44357953615a6f703678436f6344620a424f752f6976504550647663326b6a78356a744b79715a374169454135666c716a51596c5235435339746b2f3678777a7a4a514331794f34374f4556776950430a2f44306756384d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076"},"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f060754a876d8093c9425005f2e6815d530010000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cffd2506bd7388597f99ac20e4a744e498ff0ef505108c34368f1f731247e43000000000000000000000000000000000000000000000000000000000000000034100000c369dfe6412619ce5c1bf9026f7fcbfdd79ae58aa1053c2cad78356e614240701f60ba69220f9cbd8592d40cbf1f477a13a253dbb45bd242580ccb9f11f912ea06834e14e82c9982eb6cee7471e3b13721661ece0a68458b0948b26ed53322b58dbf3252283ce9fe4703d59aff2003d8f94c5b61722eefd439c735d7e40b0e9a11110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000751ade3621fe0e0e62fdfda76b32e7524bd87388a96e0a98ace244c95a8965b500000000000000000000000000000000000000000000000000000000000000000322ce315e71a60490bddf773f32b059f4cce7b435d550e2c1cd34aa7faf1cf4d06858ceb9ff5b8fa2aa9d3ba7a564c53853ca78ea6e1175e02b185f94ec4e852000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d49494567544343424365674177494241674956414c546d71796a394e4363724f414844654849486f6c754d565758464d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d6a4d774f544d304e546c61467730794f44417a4d6a4d774f544d300a4e546c614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a715165687944707854673273444b6849772b64454f2b42647536527039586f516e6c3359322f6a32497455566e524374704236484c707943325a45614d6853610a4b716c6f436476715674426872504f7364377374474b4f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e5648513445466751552f724673795665793276384e58594e354178754c766177586868347744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b4530424451454242424132346f6d696e7451356a58772f325543756237766b4d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543494252454b346b4c5559532b766149336436536d0a6668564f613642726d4c43316d50314b7265346f52456262416945416d78325a496f506f36584838303839576668746f6539356b6345733432507050343152370a643544467167513d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3"}}}' - headers: - content-length: - - '28866' - content-type: - - application/json - x-ms-ccf-transaction-id: - - '2.1027' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow.yaml deleted file mode 100644 index 238d98cb4f6d..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow.yaml +++ /dev/null @@ -1,325 +0,0 @@ -interactions: -- request: - body: '{"contents": "Test entry from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: '29' - content-type: application/json - x-ms-ccf-transaction-id: '2.1029' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.1029"}' - headers: - content-length: '44' - content-type: application/json - x-ms-ccf-transaction-id: '2.1029' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1029"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1029"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"5cf485ec21f398fd025077c2ad75335a4d7c31bfd787ad316e15bc2f78691395\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"f229b93d42d471109213ef98e3a168e05a1acbbdb1e03ad4b4f4343cb5dbb8b3\"\n - \ },\n {\n \"left\": \"16ed45ea85cf705f04751ffe7fd5707bed9bb5d3baf3d5ba812b7a7bd9ba7e9f\"\n - \ },\n {\n \"left\": \"0314522aa67ef677e0bf2fabe920327ae8154caf86b2932bf25b6bd8f571c4aa\"\n - \ }\n ],\n \"root\": \"baf3e71f115579327577a778ecdef979d301abd4998f2c08565322ab66f74c91\",\n - \ \"signature\": \"MEQCIGOWxNreBzGi4kI7x31LPoGgvcFdOurPF5S9rYLBWfZjAiA8P1AaI+73khSLzaT2LRCsLUfoP5e0BYAjbL8+t8nptw==\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.1029\"\n}" - headers: - content-length: '751' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry from Python SDK","subLedgerId":"subledger:0","transactionId":"2.1030"}' - headers: - content-length: '94' - content-type: application/json - x-ms-ccf-transaction-id: '2.1030' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview -- request: - body: '{"contents": "Test entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '44' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview - response: - body: - string: '{"subLedgerId":"subledger:0"}' - headers: - content-length: '29' - content-type: application/json - x-ms-ccf-transaction-id: '2.1031' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1031/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.1031"}' - headers: - content-length: '44' - content-type: application/json - x-ms-ccf-transaction-id: '2.1031' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1031/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1031/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.1031"}' - headers: - content-length: '44' - content-type: application/json - x-ms-ccf-transaction-id: '2.1032' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1031/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1031/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1031"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1032' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1031/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview - response: - body: - string: '{"contents":"Test entry 2 from Python SDK","subLedgerId":"subledger:0","transactionId":"2.1032"}' - headers: - content-length: '96' - content-type: application/json - x-ms-ccf-transaction-id: '2.1032' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1029?api-version=0.1-preview - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test entry from Python SDK\",\n - \ \"subLedgerId\": \"subledger:0\",\n \"transactionId\": \"2.1029\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: '150' - content-type: application/json - x-ms-ccf-transaction-id: '2.1032' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1029?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow_with_sub_ledger_id.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow_with_sub_ledger_id.yaml deleted file mode 100644 index 05ab6c0dc73f..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_append_entry_flow_with_sub_ledger_id.yaml +++ /dev/null @@ -1,305 +0,0 @@ -interactions: -- request: - body: '{"contents": "Test sub-ledger entry from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '53' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: '21' - content-type: application/json - x-ms-ccf-transaction-id: '2.1033' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.1033"}' - headers: - content-length: '44' - content-type: application/json - x-ms-ccf-transaction-id: '2.1033' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1033"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1033"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"\",\n \"node_id\": \"\",\n - \ \"proof\": [],\n \"root\": \"\",\n \"signature\": \"\"\n },\n \"state\": - \"Loading\",\n \"transactionId\": \"\"\n}" - headers: - content-length: '155' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview - response: - body: - string: "{\n \"receipt\": {\n \"leaf\": \"79e67ec6f6b8b929fe8428126b9265bc8ace2b0232fbef1897336e0e8fea7188\",\n - \ \"node_id\": \"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3\",\n - \ \"proof\": [\n {\n \"left\": \"ff7c7be60c3baa09e2cd29b101353e6f8a5842523c749dd8e0a87916f14c9979\"\n - \ },\n {\n \"left\": \"b81383d8da2b2e67c75c8a1540b4852fede46b9464dcc9a4cdddd8186e66ec6b\"\n - \ },\n {\n \"left\": \"0314522aa67ef677e0bf2fabe920327ae8154caf86b2932bf25b6bd8f571c4aa\"\n - \ }\n ],\n \"root\": \"4a068db7b522844bb609a9db832570aabe2896c70e613ee1b06c0f1fcc7b8978\",\n - \ \"signature\": \"MEYCIQCj0omBHVFVEeApi7Ba3z+w2/k5XN6KgcgPYzC2eN8G9AIhAMKwxeXN0lS7NsmIuKW8ilMMqOrQQYztGlAEWa+t8MlA\"\n - \ },\n \"state\": \"Ready\",\n \"transactionId\": \"2.1033\"\n}" - headers: - content-length: '751' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033/receipt?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry from Python SDK","subLedgerId":"132","transactionId":"2.1034"}' - headers: - content-length: '97' - content-type: application/json - x-ms-ccf-transaction-id: '2.1034' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 -- request: - body: '{"contents": "Test sub-ledger entry 2 from Python SDK"}' - headers: - Accept: - - application/json - Content-Length: - - '55' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"subLedgerId":"132"}' - headers: - content-length: '21' - content-type: application/json - x-ms-ccf-transaction-id: '2.1035' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1035/status?api-version=0.1-preview - response: - body: - string: '{"state":"Pending","transactionId":"2.1035"}' - headers: - content-length: '44' - content-type: application/json - x-ms-ccf-transaction-id: '2.1035' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1035/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1035/status?api-version=0.1-preview - response: - body: - string: '{"state":"Committed","transactionId":"2.1035"}' - headers: - content-length: '46' - content-type: application/json - x-ms-ccf-transaction-id: '2.1036' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1035/status?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: '{"contents":"Test sub-ledger entry 2 from Python SDK","subLedgerId":"132","transactionId":"2.1036"}' - headers: - content-length: '99' - content-type: application/json - x-ms-ccf-transaction-id: '2.1036' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/current?api-version=0.1-preview&subLedgerId=132 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions/2.1033?api-version=0.1-preview&subLedgerId=132 - response: - body: - string: "{\n \"entry\": {\n \"contents\": \"Test sub-ledger entry from Python - SDK\",\n \"subLedgerId\": \"132\",\n \"transactionId\": \"2.1033\"\n - \ },\n \"state\": \"Ready\"\n}" - headers: - content-length: '153' - content-type: application/json - x-ms-ccf-transaction-id: '2.1036' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions/2.1033?api-version=0.1-preview&subLedgerId=132 -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_range_query.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_range_query.yaml deleted file mode 100644 index fda22afd1c88..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_range_query.yaml +++ /dev/null @@ -1,5794 +0,0 @@ -interactions: -- request: - body: '{"contents": "message-0"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1037' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-1"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1038' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-2"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1039' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-3"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1040' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-4"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1042' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-5"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1043' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-6"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1044' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-7"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1045' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-8"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1047' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-9"}' - headers: - Accept: - - application/json - Content-Length: - - '25' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1048' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-10"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1049' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-11"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1050' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-12"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1051' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-13"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1053' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-14"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1054' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-15"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1055' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-16"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1056' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-17"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1058' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-18"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1059' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-19"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1060' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-20"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1061' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-21"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1063' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-22"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1064' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-23"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1065' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-24"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1066' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-25"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1068' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-26"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1069' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-27"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1070' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-28"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1072' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-29"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1073' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-30"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1074' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-31"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1075' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-32"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1077' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-33"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1078' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-34"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1079' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-35"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1080' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-36"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1081' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-37"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1083' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-38"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1084' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-39"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1085' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-40"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1086' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-41"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1088' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-42"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1089' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-43"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1090' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-44"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1091' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-45"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1093' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-46"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1094' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-47"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1095' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-48"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1096' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-49"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1098' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-50"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1099' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-51"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1100' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-52"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1101' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-53"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1103' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-54"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1104' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-55"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1105' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-56"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1106' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-57"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1108' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-58"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1109' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-59"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1110' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-60"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1111' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-61"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1113' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-62"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1114' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-63"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1115' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-64"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1116' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-65"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1117' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-66"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1119' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-67"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1120' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-68"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1121' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-69"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1122' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-70"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1124' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-71"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1125' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-72"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1126' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-73"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1127' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-74"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1129' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-75"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1130' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-76"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1131' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-77"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1133' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-78"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1134' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-79"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1135' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-80"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1136' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-81"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1138' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-82"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1139' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-83"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1140' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-84"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1141' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-85"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1143' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-86"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1144' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-87"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1145' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-88"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1146' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-89"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1148' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-90"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1149' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-91"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1150' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-92"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1151' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-93"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1153' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-94"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1154' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-95"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1155' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-96"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1156' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-97"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1158' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-98"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1159' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-99"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1160' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-100"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1161' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-101"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1163' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-102"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1164' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-103"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1165' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-104"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1166' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-105"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1168' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-106"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1169' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-107"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1170' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-108"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1171' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-109"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1173' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-110"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1174' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-111"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1175' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-112"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1176' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-113"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1178' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-114"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1179' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-115"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1180' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-116"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1181' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-117"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1183' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-118"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1184' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-119"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1185' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-120"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1186' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-121"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1187' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-122"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1189' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-123"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1190' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-124"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1191' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-125"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1192' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-126"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1194' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-127"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1195' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-128"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1196' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-129"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1197' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-130"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1199' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-131"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1200' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-132"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1201' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-133"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1202' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-134"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1204' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-135"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1205' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-136"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1206' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-137"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1207' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-138"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1208' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-139"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1210' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-140"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1211' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-141"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1212' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-142"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1213' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-143"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1215' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-144"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1216' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-145"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1217' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-146"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1218' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-147"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1220' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-148"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1221' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-149"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1222' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-150"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1223' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-151"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1225' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-152"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1226' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-153"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1227' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-154"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1228' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-155"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1229' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-156"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1231' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-157"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1232' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-158"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1233' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-159"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1234' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-160"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1236' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-161"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1237' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-162"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1238' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-163"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1239' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-164"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1240' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-165"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1242' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-166"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1243' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-167"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1244' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-168"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1245' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-169"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1247' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-170"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1248' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-171"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1249' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-172"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1250' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-173"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1251' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-174"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1253' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-175"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1254' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-176"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1255' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-177"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1256' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-178"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1258' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-179"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1259' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-180"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1260' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-181"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1261' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-182"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1263' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-183"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1264' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-184"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1265' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-185"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1266' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-186"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1268' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-187"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1269' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-188"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1270' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-189"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1271' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-190"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1272' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-191"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1274' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-192"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1275' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-193"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1276' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-194"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1277' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-195"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1279' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: '{"contents": "message-196"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 - response: - body: - string: '{"subLedgerId":"1"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1280' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1 -- request: - body: '{"contents": "message-197"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 - response: - body: - string: '{"subLedgerId":"2"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1281' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2 -- request: - body: '{"contents": "message-198"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 - response: - body: - string: '{"subLedgerId":"3"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1282' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3 -- request: - body: '{"contents": "message-199"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 - response: - body: - string: '{"subLedgerId":"4"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1283' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4 -- request: - body: '{"contents": "message-200"}' - headers: - Accept: - - application/json - Content-Length: - - '27' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: POST - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 - response: - body: - string: '{"subLedgerId":"0"}' - headers: - content-length: '19' - content-type: application/json - x-ms-ccf-transaction-id: '2.1285' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1285' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1285' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1285' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1138\",\n - \ \"entries\": [\n {\n \"contents\": \"message-0\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1037\"\n },\n {\n \"contents\": - \"message-5\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1043\"\n - \ },\n {\n \"contents\": \"message-10\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1049\"\n },\n {\n \"contents\": - \"message-15\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1055\"\n - \ },\n {\n \"contents\": \"message-20\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1061\"\n },\n {\n \"contents\": - \"message-25\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1068\"\n - \ },\n {\n \"contents\": \"message-30\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1074\"\n },\n {\n \"contents\": - \"message-35\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1080\"\n - \ },\n {\n \"contents\": \"message-40\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1086\"\n },\n {\n \"contents\": - \"message-45\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1093\"\n - \ },\n {\n \"contents\": \"message-50\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1099\"\n },\n {\n \"contents\": - \"message-55\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1105\"\n - \ },\n {\n \"contents\": \"message-60\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1111\"\n },\n {\n \"contents\": - \"message-65\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1117\"\n - \ },\n {\n \"contents\": \"message-70\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1124\"\n },\n {\n \"contents\": - \"message-75\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1130\"\n - \ },\n {\n \"contents\": \"message-80\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1136\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1889' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1037 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1138 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239\",\n - \ \"entries\": [\n {\n \"contents\": \"message-85\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1143\"\n },\n {\n \"contents\": - \"message-90\",\n \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1149\"\n - \ },\n {\n \"contents\": \"message-95\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1155\"\n },\n {\n \"contents\": - \"message-100\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1161\"\n },\n {\n \"contents\": \"message-105\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1168\"\n },\n {\n \"contents\": - \"message-110\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1174\"\n },\n {\n \"contents\": \"message-115\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1180\"\n },\n {\n \"contents\": - \"message-120\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1186\"\n },\n {\n \"contents\": \"message-125\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1192\"\n },\n {\n \"contents\": - \"message-130\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1199\"\n },\n {\n \"contents\": \"message-135\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1205\"\n },\n {\n \"contents\": - \"message-140\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1211\"\n },\n {\n \"contents\": \"message-145\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1217\"\n },\n {\n \"contents\": - \"message-150\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1223\"\n },\n {\n \"contents\": \"message-155\",\n \"subLedgerId\": - \"0\",\n \"transactionId\": \"2.1229\"\n },\n {\n \"contents\": - \"message-160\",\n \"subLedgerId\": \"0\",\n \"transactionId\": - \"2.1236\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1801' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1138 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-165\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1242\"\n },\n - \ {\n \"contents\": \"message-170\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.1248\"\n },\n {\n \"contents\": \"message-175\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1254\"\n },\n - \ {\n \"contents\": \"message-180\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.1260\"\n },\n {\n \"contents\": \"message-185\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1266\"\n },\n - \ {\n \"contents\": \"message-190\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.1272\"\n },\n {\n \"contents\": \"message-195\",\n - \ \"subLedgerId\": \"0\",\n \"transactionId\": \"2.1279\"\n },\n - \ {\n \"contents\": \"message-200\",\n \"subLedgerId\": \"0\",\n - \ \"transactionId\": \"2.1285\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '873' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=0&fromTransactionId=2.1239 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1139\",\n - \ \"entries\": [\n {\n \"contents\": \"message-1\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1038\"\n },\n {\n \"contents\": - \"message-6\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1044\"\n - \ },\n {\n \"contents\": \"message-11\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1050\"\n },\n {\n \"contents\": - \"message-16\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1056\"\n - \ },\n {\n \"contents\": \"message-21\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1063\"\n },\n {\n \"contents\": - \"message-26\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1069\"\n - \ },\n {\n \"contents\": \"message-31\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1075\"\n },\n {\n \"contents\": - \"message-36\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1081\"\n - \ },\n {\n \"contents\": \"message-41\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1088\"\n },\n {\n \"contents\": - \"message-46\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1094\"\n - \ },\n {\n \"contents\": \"message-51\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1100\"\n },\n {\n \"contents\": - \"message-56\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1106\"\n - \ },\n {\n \"contents\": \"message-61\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1113\"\n },\n {\n \"contents\": - \"message-66\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1119\"\n - \ },\n {\n \"contents\": \"message-71\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1125\"\n },\n {\n \"contents\": - \"message-76\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1131\"\n - \ },\n {\n \"contents\": \"message-81\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1138\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1889' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1038 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1139 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240\",\n - \ \"entries\": [\n {\n \"contents\": \"message-86\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1144\"\n },\n {\n \"contents\": - \"message-91\",\n \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1150\"\n - \ },\n {\n \"contents\": \"message-96\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1156\"\n },\n {\n \"contents\": - \"message-101\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1163\"\n },\n {\n \"contents\": \"message-106\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1169\"\n },\n {\n \"contents\": - \"message-111\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1175\"\n },\n {\n \"contents\": \"message-116\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1181\"\n },\n {\n \"contents\": - \"message-121\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1187\"\n },\n {\n \"contents\": \"message-126\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1194\"\n },\n {\n \"contents\": - \"message-131\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1200\"\n },\n {\n \"contents\": \"message-136\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1206\"\n },\n {\n \"contents\": - \"message-141\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1212\"\n },\n {\n \"contents\": \"message-146\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1218\"\n },\n {\n \"contents\": - \"message-151\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1225\"\n },\n {\n \"contents\": \"message-156\",\n \"subLedgerId\": - \"1\",\n \"transactionId\": \"2.1231\"\n },\n {\n \"contents\": - \"message-161\",\n \"subLedgerId\": \"1\",\n \"transactionId\": - \"2.1237\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1801' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1139 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-166\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1243\"\n },\n - \ {\n \"contents\": \"message-171\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.1249\"\n },\n {\n \"contents\": \"message-176\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1255\"\n },\n - \ {\n \"contents\": \"message-181\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.1261\"\n },\n {\n \"contents\": \"message-186\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1268\"\n },\n - \ {\n \"contents\": \"message-191\",\n \"subLedgerId\": \"1\",\n - \ \"transactionId\": \"2.1274\"\n },\n {\n \"contents\": \"message-196\",\n - \ \"subLedgerId\": \"1\",\n \"transactionId\": \"2.1280\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '769' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=1&fromTransactionId=2.1240 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1039 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1039\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1039 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1039 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140\",\n - \ \"entries\": [\n {\n \"contents\": \"message-2\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1039\"\n },\n {\n \"contents\": - \"message-7\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1045\"\n - \ },\n {\n \"contents\": \"message-12\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1051\"\n },\n {\n \"contents\": - \"message-17\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1058\"\n - \ },\n {\n \"contents\": \"message-22\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1064\"\n },\n {\n \"contents\": - \"message-27\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1070\"\n - \ },\n {\n \"contents\": \"message-32\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1077\"\n },\n {\n \"contents\": - \"message-37\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1083\"\n - \ },\n {\n \"contents\": \"message-42\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1089\"\n },\n {\n \"contents\": - \"message-47\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1095\"\n - \ },\n {\n \"contents\": \"message-52\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1101\"\n },\n {\n \"contents\": - \"message-57\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1108\"\n - \ },\n {\n \"contents\": \"message-62\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1114\"\n },\n {\n \"contents\": - \"message-67\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1120\"\n - \ },\n {\n \"contents\": \"message-72\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1126\"\n },\n {\n \"contents\": - \"message-77\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1133\"\n - \ },\n {\n \"contents\": \"message-82\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1139\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1889' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1039 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241\",\n - \ \"entries\": [\n {\n \"contents\": \"message-87\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1145\"\n },\n {\n \"contents\": - \"message-92\",\n \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1151\"\n - \ },\n {\n \"contents\": \"message-97\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1158\"\n },\n {\n \"contents\": - \"message-102\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1164\"\n },\n {\n \"contents\": \"message-107\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1170\"\n },\n {\n \"contents\": - \"message-112\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1176\"\n },\n {\n \"contents\": \"message-117\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1183\"\n },\n {\n \"contents\": - \"message-122\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1189\"\n },\n {\n \"contents\": \"message-127\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1195\"\n },\n {\n \"contents\": - \"message-132\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1201\"\n },\n {\n \"contents\": \"message-137\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1207\"\n },\n {\n \"contents\": - \"message-142\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1213\"\n },\n {\n \"contents\": \"message-147\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1220\"\n },\n {\n \"contents\": - \"message-152\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1226\"\n },\n {\n \"contents\": \"message-157\",\n \"subLedgerId\": - \"2\",\n \"transactionId\": \"2.1232\"\n },\n {\n \"contents\": - \"message-162\",\n \"subLedgerId\": \"2\",\n \"transactionId\": - \"2.1238\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1801' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1140 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-167\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1244\"\n },\n - \ {\n \"contents\": \"message-172\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.1250\"\n },\n {\n \"contents\": \"message-177\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1256\"\n },\n - \ {\n \"contents\": \"message-182\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.1263\"\n },\n {\n \"contents\": \"message-187\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1269\"\n },\n - \ {\n \"contents\": \"message-192\",\n \"subLedgerId\": \"2\",\n - \ \"transactionId\": \"2.1275\"\n },\n {\n \"contents\": \"message-197\",\n - \ \"subLedgerId\": \"2\",\n \"transactionId\": \"2.1281\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '769' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=2&fromTransactionId=2.1241 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141\",\n - \ \"entries\": [\n {\n \"contents\": \"message-3\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1040\"\n },\n {\n \"contents\": - \"message-8\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1047\"\n - \ },\n {\n \"contents\": \"message-13\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1053\"\n },\n {\n \"contents\": - \"message-18\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1059\"\n - \ },\n {\n \"contents\": \"message-23\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1065\"\n },\n {\n \"contents\": - \"message-28\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1072\"\n - \ },\n {\n \"contents\": \"message-33\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1078\"\n },\n {\n \"contents\": - \"message-38\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1084\"\n - \ },\n {\n \"contents\": \"message-43\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1090\"\n },\n {\n \"contents\": - \"message-48\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1096\"\n - \ },\n {\n \"contents\": \"message-53\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1103\"\n },\n {\n \"contents\": - \"message-58\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1109\"\n - \ },\n {\n \"contents\": \"message-63\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1115\"\n },\n {\n \"contents\": - \"message-68\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1121\"\n - \ },\n {\n \"contents\": \"message-73\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1127\"\n },\n {\n \"contents\": - \"message-78\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1134\"\n - \ },\n {\n \"contents\": \"message-83\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1140\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1889' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1040 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242\",\n - \ \"entries\": [\n {\n \"contents\": \"message-88\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1146\"\n },\n {\n \"contents\": - \"message-93\",\n \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1153\"\n - \ },\n {\n \"contents\": \"message-98\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1159\"\n },\n {\n \"contents\": - \"message-103\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1165\"\n },\n {\n \"contents\": \"message-108\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1171\"\n },\n {\n \"contents\": - \"message-113\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1178\"\n },\n {\n \"contents\": \"message-118\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1184\"\n },\n {\n \"contents\": - \"message-123\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1190\"\n },\n {\n \"contents\": \"message-128\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1196\"\n },\n {\n \"contents\": - \"message-133\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1202\"\n },\n {\n \"contents\": \"message-138\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1208\"\n },\n {\n \"contents\": - \"message-143\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1215\"\n },\n {\n \"contents\": \"message-148\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1221\"\n },\n {\n \"contents\": - \"message-153\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1227\"\n },\n {\n \"contents\": \"message-158\",\n \"subLedgerId\": - \"3\",\n \"transactionId\": \"2.1233\"\n },\n {\n \"contents\": - \"message-163\",\n \"subLedgerId\": \"3\",\n \"transactionId\": - \"2.1239\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1801' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1141 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-168\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1245\"\n },\n - \ {\n \"contents\": \"message-173\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.1251\"\n },\n {\n \"contents\": \"message-178\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1258\"\n },\n - \ {\n \"contents\": \"message-183\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.1264\"\n },\n {\n \"contents\": \"message-188\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1270\"\n },\n - \ {\n \"contents\": \"message-193\",\n \"subLedgerId\": \"3\",\n - \ \"transactionId\": \"2.1276\"\n },\n {\n \"contents\": \"message-198\",\n - \ \"subLedgerId\": \"3\",\n \"transactionId\": \"2.1282\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '769' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=3&fromTransactionId=2.1242 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1042 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1042\",\n - \ \"state\": \"Loading\"\n}" - headers: - content-length: '123' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1042 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1042 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1143\",\n - \ \"entries\": [\n {\n \"contents\": \"message-4\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1042\"\n },\n {\n \"contents\": - \"message-9\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1048\"\n - \ },\n {\n \"contents\": \"message-14\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1054\"\n },\n {\n \"contents\": - \"message-19\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1060\"\n - \ },\n {\n \"contents\": \"message-24\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1066\"\n },\n {\n \"contents\": - \"message-29\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1073\"\n - \ },\n {\n \"contents\": \"message-34\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1079\"\n },\n {\n \"contents\": - \"message-39\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1085\"\n - \ },\n {\n \"contents\": \"message-44\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1091\"\n },\n {\n \"contents\": - \"message-49\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1098\"\n - \ },\n {\n \"contents\": \"message-54\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1104\"\n },\n {\n \"contents\": - \"message-59\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1110\"\n - \ },\n {\n \"contents\": \"message-64\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1116\"\n },\n {\n \"contents\": - \"message-69\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1122\"\n - \ },\n {\n \"contents\": \"message-74\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1129\"\n },\n {\n \"contents\": - \"message-79\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1135\"\n - \ },\n {\n \"contents\": \"message-84\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1141\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1889' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1042 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1143 - response: - body: - string: "{\n \"@nextLink\": \"/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1244\",\n - \ \"entries\": [\n {\n \"contents\": \"message-89\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1148\"\n },\n {\n \"contents\": - \"message-94\",\n \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1154\"\n - \ },\n {\n \"contents\": \"message-99\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1160\"\n },\n {\n \"contents\": - \"message-104\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1166\"\n },\n {\n \"contents\": \"message-109\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1173\"\n },\n {\n \"contents\": - \"message-114\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1179\"\n },\n {\n \"contents\": \"message-119\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1185\"\n },\n {\n \"contents\": - \"message-124\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1191\"\n },\n {\n \"contents\": \"message-129\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1197\"\n },\n {\n \"contents\": - \"message-134\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1204\"\n },\n {\n \"contents\": \"message-139\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1210\"\n },\n {\n \"contents\": - \"message-144\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1216\"\n },\n {\n \"contents\": \"message-149\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1222\"\n },\n {\n \"contents\": - \"message-154\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1228\"\n },\n {\n \"contents\": \"message-159\",\n \"subLedgerId\": - \"4\",\n \"transactionId\": \"2.1234\"\n },\n {\n \"contents\": - \"message-164\",\n \"subLedgerId\": \"4\",\n \"transactionId\": - \"2.1240\"\n }\n ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '1801' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1143 -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1244 - response: - body: - string: "{\n \"entries\": [\n {\n \"contents\": \"message-169\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1247\"\n },\n - \ {\n \"contents\": \"message-174\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.1253\"\n },\n {\n \"contents\": \"message-179\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1259\"\n },\n - \ {\n \"contents\": \"message-184\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.1265\"\n },\n {\n \"contents\": \"message-189\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1271\"\n },\n - \ {\n \"contents\": \"message-194\",\n \"subLedgerId\": \"4\",\n - \ \"transactionId\": \"2.1277\"\n },\n {\n \"contents\": \"message-199\",\n - \ \"subLedgerId\": \"4\",\n \"transactionId\": \"2.1283\"\n }\n - \ ],\n \"state\": \"Ready\"\n}" - headers: - content-length: '769' - content-type: application/json - x-ms-ccf-transaction-id: '2.1286' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/transactions?api-version=0.1-preview&subLedgerId=4&fromTransactionId=2.1244 -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_user_management.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_user_management.yaml deleted file mode 100644 index b9fadac5ddec..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_user_management.yaml +++ /dev/null @@ -1,128 +0,0 @@ -interactions: -- request: - body: '{"assignedRole": "Contributor"}' - headers: - Accept: - - application/json - Content-Length: - - '31' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '78' - content-type: application/json - x-ms-ccf-transaction-id: '2.1287' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Contributor","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '78' - content-type: application/json - x-ms-ccf-transaction-id: '2.1288' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: '0' - x-ms-ccf-transaction-id: '2.1289' - status: - code: 204 - message: No Content - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: '{"assignedRole": "Reader"}' - headers: - Accept: - - application/json - Content-Length: - - '26' - Content-Type: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: PATCH - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '73' - content-type: application/json - x-ms-ccf-transaction-id: '2.1290' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '{"assignedRole":"Reader","userId":"000000000000000000000000000000000000"}' - headers: - content-length: '73' - content-type: application/json - x-ms-ccf-transaction-id: '2.1290' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: DELETE - uri: https://fake-confidential-ledger.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview - response: - body: - string: '' - headers: - content-length: '0' - x-ms-ccf-transaction-id: '2.1292' - status: - code: 204 - message: No Content - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/users/000000000000000000000000000000000000?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_verification_methods.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_verification_methods.yaml deleted file mode 100644 index 526db5b1a3c6..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_confidential_ledger_client_certificate_async.test_verification_methods.yaml +++ /dev/null @@ -1,353 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/members?api-version=0.1-preview - response: - body: - string: '{"members":[{"certificate":"-----BEGIN CERTIFICATE-----\nMIIB+DCCAX2gAwIBAgIQbqIwsiHHQlWkhweK0NbPODAKBggqhkjOPQQDAzAgMR4w\nHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkwHhcNMjAxMTExMjAyNDUwWhcN\nMjExMTExMjAzNDUwWjAgMR4wHAYDVQQDExVDQ0YgR292ZXJub3IgSWRlbnRpdHkw\ndjAQBgcqhkjOPQIBBgUrgQQAIgNiAATTFBoe5FRZTXSQn5ZGl7BV40FpF6fvK3mj\nuDbh3BpAFCC9eXIU9nrGEEoaWH2n++c0TXuaR9TlXEm1ms47YMGmvr/epdI2Qgd6\nBC6bwYfMoRFVH/+G+itRj70ywY+lqrmjfDB6MA4GA1UdDwEB/wQEAwIHgDAJBgNV\nHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW\ngBQefKdvzGwngW5bffiMcfFhoBYtNzAdBgNVHQ4EFgQUHnynb8xsJ4FuW334jHHx\nYaAWLTcwCgYIKoZIzj0EAwMDaQAwZgIxAKb40n899np5eoAei4YatmJ9P2kdGyGP\nqQBslkobR/Gb++QAHbFoD4m2tANPtpmYJAIxANklOHFie1OSLVwzl3n8zBbt1+KX\naH1qYPDr3MzPfvSBq7ckBGem2C6EEX4ratWAGQ==\n-----END - CERTIFICATE-----","id":"eec5d23a0f376538a34cccb35705cad4850741dcf82cd9ec39d3972aabc58a72"}]}' - headers: - content-length: '860' - content-type: application/json - x-ms-ccf-transaction-id: '2.1292' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/governance/members?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/governance/constitution?api-version=0.1-preview - response: - body: - string: '{"digest":"f1167f64777c56b6e2d14615b6b2ada50a5db07b83ae724500f7a7313c9461da","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 \"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?\"\n );\n const - groups = url.match(re);\n if (!groups) {\n throw new TypeError(`${url} - is not a valid URL.`);\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(\"?\");\n if - (optional) {\n if (value === null || value === undefined) {\n return;\n }\n type - = type.slice(0, -1);\n }\n if (type === \"array\") {\n if (!Array.isArray(value)) - {\n throw new Error(`${field} must be an array`);\n }\n } else if - (type === \"integer\") {\n if (!Number.isInteger(value)) {\n throw - new Error(`${field} must be an integer`);\n }\n } else if (typeof value - !== type) {\n throw new Error(`${field} must be of type ${type} but is - ${typeof value}`);\n }\n}\n\nfunction checkEnum(value, members, field) {\n if - (!members.includes(value)) {\n throw new Error(`${field} must be one of - ${members}`);\n }\n}\n\nfunction checkBounds(value, low, high, field) {\n if - (low !== null && value < low) {\n throw new Error(`${field} must be greater - than ${low}`);\n }\n if (high !== null && value > high) {\n throw new - Error(`${field} must be lower than ${high}`);\n }\n}\n\nfunction checkLength(value, - min, max, field) {\n if (min !== null && value.length < min) {\n throw - new Error(`${field} must be an array of minimum ${min} elements`);\n }\n if - (max !== null && value.length > max) {\n throw new Error(`${field} must - be an array of maximum ${max} elements`);\n }\n}\n\nfunction checkNone(args) - {\n if (args !== null && args !== undefined) {\n throw new Error(`Proposal - does not accept any argument, found \"${args}\"`);\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[\"public:ccf.gov.members.encryption_public_keys\"].forEach((_, - k) => {\n let rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(k);\n if - (rawMemberInfo === undefined) {\n throw new Error(`Recovery member ${ccf.bufToStr(k)} - has no information`);\n }\n\n const memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n if - (memberInfo.status === \"Active\") {\n activeRecoveryMembersCount++;\n }\n });\n return - activeRecoveryMembersCount;\n}\n\nfunction checkJwks(value, field) {\n checkType(value, - \"object\", field);\n checkType(value.keys, \"array\", `${field}.keys`);\n for - (const [i, jwk] of value.keys.entries()) {\n checkType(jwk.kid, \"string\", - `${field}.keys[${i}].kid`);\n checkType(jwk.kty, \"string\", `${field}.keys[${i}].kty`);\n checkType(jwk.x5c, - \"array\", `${field}.keys[${i}].x5c`);\n checkLength(jwk.x5c, 1, null, - `${field}.keys[${i}].x5c`);\n for (const [j, b64der] of jwk.x5c.entries()) - {\n checkType(b64der, \"string\", `${field}.keys[${i}].x5c[${j}]`);\n const - pem =\n \"-----BEGIN CERTIFICATE-----\\n\" +\n b64der +\n \"\\n-----END - CERTIFICATE-----\";\n checkX509CertChain(pem, `${field}.keys[${i}].x5c[${j}]`);\n }\n }\n}\n\nfunction - checkX509CertChain(value, field) {\n if (!ccf.isValidX509CertBundle(value)) - {\n throw new Error(\n `${field} must be a valid X509 certificate - (chain) in PEM format`\n );\n }\n}\n\nfunction invalidateOtherOpenProposals(proposalIdToRetain) - {\n let proposals = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n const - proposalsMap = ccf.kv[\"public:ccf.gov.proposals_info.js\"];\n proposalsMap.forEach((v, - k) => {\n let proposalId = ccf.bufToStr(k);\n if (proposalId !== proposalIdToRetain) - {\n let info = ccf.bufToJsonCompatible(v);\n if (info.state === - \"Open\") {\n info.state = \"Dropped\";\n proposalsMap.set(k, - ccf.jsonCompatibleToBuf(info));\n }\n }\n });\n}\n\nconst actions - = new Map([\n [\n \"set_constitution\",\n new Action(\n function - (args) {\n checkType(args.constitution, \"string\");\n },\n function - (args, proposalId) {\n ccf.kv[\"public:ccf.gov.constitution\"].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 \"set_member\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.member_data, - \"object?\", \"member_data\");\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[\"public:ccf.gov.members.certs\"].set(\n rawMemberId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.encryption_pub_key == null) {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n } - else {\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].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 - = \"Accepted\";\n ccf.kv[\"public:ccf.gov.members.info\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(member_info)\n );\n\n const - rawSignature = ccf.kv[\"public:ccf.internal.signatures\"].get(\n getSingletonKvKey()\n );\n if - (rawSignature === undefined) {\n ccf.kv[\"public:ccf.gov.members.acks\"].set(rawMemberId);\n } - else {\n const signature = ccf.bufToJsonCompatible(rawSignature);\n const - ack = {};\n ack.state_digest = signature.root;\n ccf.kv[\"public:ccf.gov.members.acks\"].set(\n rawMemberId,\n ccf.jsonCompatibleToBuf(ack)\n );\n }\n }\n ),\n ],\n [\n \"remove_member\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n },\n function (args) {\n const rawMemberId - = ccf.strToBuf(args.member_id);\n const rawMemberInfo = ccf.kv[\"public:ccf.gov.members.info\"].get(\n rawMemberId\n );\n if - (rawMemberInfo === undefined) {\n return; // Idempotent\n }\n\n const - memberInfo = ccf.bufToJsonCompatible(rawMemberInfo);\n const isActiveMember - = memberInfo.status == \"Active\";\n\n const isRecoveryMember = ccf.kv[\n \"public:ccf.gov.members.encryption_public_keys\"\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 - && isRecoveryMember) {\n const rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\n }\n\n const config = ccf.bufToJsonCompatible(rawConfig);\n const - activeRecoveryMembersCountAfter =\n getActiveRecoveryMembersCount() - - 1;\n if (activeRecoveryMembersCountAfter < config.recovery_threshold) - {\n throw new Error(\n `Number of active recovery - members (${activeRecoveryMembersCountAfter}) would be less than recovery threshold - (${config.recovery_threshold})`\n );\n }\n }\n\n ccf.kv[\"public:ccf.gov.members.info\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.encryption_public_keys\"].delete(\n rawMemberId\n );\n ccf.kv[\"public:ccf.gov.members.certs\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.members.acks\"].delete(rawMemberId);\n ccf.kv[\"public:ccf.gov.history\"].delete(rawMemberId);\n\n if - (isActiveMember && 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 \"set_member_data\",\n new - Action(\n function (args) {\n checkType(args.member_id, \"string\", - \"member_id\");\n checkType(args.member_data, \"object\", \"member_data\");\n },\n\n function - (args) {\n let member_id = ccf.strToBuf(args.member_id);\n let - members_info = ccf.kv[\"public:ccf.gov.members.info\"];\n let member_info - = members_info.get(member_id);\n if (member_info === undefined) {\n throw - new Error(`Member ${args.member_id} does not exist`);\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 \"set_user\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n checkType(args.user_data, - \"object?\", \"user_data\");\n },\n function (args) {\n let - userId = ccf.pemToId(args.cert);\n let rawUserId = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].set(\n rawUserId,\n ccf.strToBuf(args.cert)\n );\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n rawUserId,\n ccf.jsonCompatibleToBuf(args.user_data)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n }\n ),\n ],\n [\n \"remove_user\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n },\n function (args) {\n const user_id = - ccf.strToBuf(args.user_id);\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(user_id);\n ccf.kv[\"public:ccf.gov.users.info\"].delete(user_id);\n }\n ),\n ],\n [\n \"remove_user_by_cert\",\n new - Action(\n function (args) {\n checkX509CertChain(args.cert, \"cert\");\n },\n function - (args) {\n let userId = ccf.pemToId(args.cert);\n let rawUserId - = ccf.strToBuf(userId);\n\n ccf.kv[\"public:ccf.gov.users.certs\"].delete(\n rawUserId\n );\n ccf.kv[\"public:ccf.gov.users.info\"].delete(rawUserId);\n }\n ),\n ],\n [\n \"set_user_data\",\n new - Action(\n function (args) {\n checkType(args.user_id, \"string\", - \"user_id\");\n checkType(args.user_data, \"object?\", \"user_data\");\n },\n function - (args) {\n const userId = ccf.strToBuf(args.user_id);\n\n if - (args.user_data !== null && args.user_data !== undefined) {\n let - userInfo = {};\n userInfo.user_data = args.user_data;\n ccf.kv[\"public:ccf.gov.users.info\"].set(\n userId,\n ccf.jsonCompatibleToBuf(userInfo)\n );\n } - else {\n ccf.kv[\"public:ccf.gov.users.info\"].delete(userId);\n }\n }\n ),\n ],\n [\n \"set_recovery_threshold\",\n new - Action(\n function (args) {\n checkType(args.recovery_threshold, - \"integer\", \"threshold\");\n checkBounds(args.recovery_threshold, - 1, 254, \"threshold\");\n },\n function (args) {\n const - rawConfig = ccf.kv[\"public:ccf.gov.service.config\"].get(\n getSingletonKvKey()\n );\n if - (rawConfig === undefined) {\n throw new Error(\"Service configuration - could not be found\");\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[\"public:ccf.gov.service.info\"].get(\n getSingletonKvKey()\n );\n if - (rawService === undefined) {\n throw new Error(\"Service information - could not be found\");\n }\n\n const service = ccf.bufToJsonCompatible(rawService);\n\n if - (service.status === \"WaitingForRecoveryShares\") {\n throw new Error(\n `Cannot - set recovery threshold if service is ${service.status}`\n );\n } - else if (service.status === \"Open\") {\n let activeRecoveryMembersCount - = getActiveRecoveryMembersCount();\n if (args.recovery_threshold - > activeRecoveryMembersCount) {\n throw new Error(\n `Cannot - set recovery threshold to ${args.recovery_threshold}: recovery threshold would - be greater than the number of recovery members ${activeRecoveryMembersCount}`\n );\n }\n }\n\n config.recovery_threshold - = args.recovery_threshold;\n ccf.kv[\"public:ccf.gov.service.config\"].set(\n getSingletonKvKey(),\n ccf.jsonCompatibleToBuf(config)\n );\n\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_recovery_shares_refresh\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n function - (args) {\n ccf.node.triggerRecoverySharesRefresh();\n }\n ),\n ],\n [\n \"trigger_ledger_rekey\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.triggerLedgerRekey();\n }\n ),\n ],\n [\n \"transition_service_to_open\",\n new - Action(\n function (args) {\n checkNone(args);\n },\n\n function - (args) {\n ccf.node.transitionServiceToOpen();\n }\n ),\n ],\n [\n \"set_js_app\",\n new - Action(\n function (args) {\n const bundle = args.bundle;\n checkType(bundle, - \"object\", \"bundle\");\n\n let prefix = \"bundle.modules\";\n checkType(bundle.modules, - \"array\", prefix);\n for (const [i, module] of bundle.modules.entries()) - {\n checkType(module, \"object\", `${prefix}[${i}]`);\n checkType(module.name, - \"string\", `${prefix}[${i}].name`);\n checkType(module.module, \"string\", - `${prefix}[${i}].module`);\n }\n\n prefix = \"bundle.metadata\";\n checkType(bundle.metadata, - \"object\", prefix);\n checkType(bundle.metadata.endpoints, \"object\", - `${prefix}.endpoints`);\n for (const [url, endpoint] of Object.entries(\n bundle.metadata.endpoints\n )) - {\n checkType(endpoint, \"object\", `${prefix}.endpoints[\"${url}\"]`);\n for - (const [method, info] of Object.entries(endpoint)) {\n const prefix2 - = `${prefix}.endpoints[\"${url}\"][\"${method}\"]`;\n checkType(info, - \"object\", prefix2);\n checkType(info.js_module, \"string\", `${prefix2}.js_module`);\n checkType(info.js_function, - \"string\", `${prefix2}.js_function`);\n checkEnum(\n info.mode,\n [\"readwrite\", - \"readonly\", \"historical\"],\n `${prefix2}.mode`\n );\n checkEnum(\n info.forwarding_required,\n [\"sometimes\", - \"always\", \"never\"],\n `${prefix2}.forwarding_required`\n );\n checkType(info.openapi, - \"object?\", `${prefix2}.openapi`);\n checkType(\n info.openapi_hidden,\n \"boolean?\",\n `${prefix2}.openapi_hidden`\n );\n checkType(\n info.authn_policies,\n \"array\",\n `${prefix2}.authn_policies`\n );\n for - (const [i, policy] of info.authn_policies.entries()) {\n checkType(policy, - \"string\", `${prefix2}.authn_policies[${i}]`);\n }\n if - (!bundle.modules.some((m) => m.name === info.js_module)) {\n throw - new Error(`module ''${info.js_module}'' not found in bundle`);\n }\n }\n }\n },\n function - (args) {\n const modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const - endpointsMap = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should - expose .clear()\n modulesMap.forEach((_, k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n\n const bundle - = args.bundle;\n for (const module of bundle.modules) {\n const - path = \"/\" + 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 = `${method.toUpperCase()} ${url}`;\n const keyBuf = ccf.strToBuf(key);\n\n info.js_module - = \"/\" + info.js_module;\n const infoBuf = ccf.jsonCompatibleToBuf(info);\n endpointsMap.set(keyBuf, - infoBuf);\n }\n }\n }\n ),\n ],\n [\n \"remove_js_app\",\n new - Action(\n function (args) { },\n function (args) {\n const - modulesMap = ccf.kv[\"public:ccf.gov.modules\"];\n const endpointsMap - = ccf.kv[\"public:ccf.gov.endpoints\"];\n // kv should expose .clear()\n modulesMap.forEach((_, - k) => {\n modulesMap.delete(k);\n });\n endpointsMap.forEach((_, - k) => {\n endpointsMap.delete(k);\n });\n }\n ),\n ],\n [\n \"set_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n checkX509CertChain(args.cert_bundle, \"cert_bundle\");\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[\"public:ccf.gov.tls.ca_cert_bundles\"].set(nameBuf, - bundleBuf);\n }\n ),\n ],\n [\n \"remove_ca_cert_bundle\",\n new - Action(\n function (args) {\n checkType(args.name, \"string\", - \"name\");\n },\n function (args) {\n const name = args.name;\n const - nameBuf = ccf.strToBuf(name);\n ccf.kv[\"public:ccf.gov.tls.ca_cert_bundles\"].delete(nameBuf);\n }\n ),\n ],\n [\n \"set_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkType(args.auto_refresh, \"boolean?\", \"auto_refresh\");\n checkType(args.ca_cert_bundle_name, - \"string?\", \"ca_cert_bundle_name\");\n checkEnum(args.key_filter, - [\"all\", \"sgx\"], \"key_filter\");\n checkType(args.key_policy, \"object?\", - \"key_policy\");\n if (args.key_policy) {\n checkType(\n args.key_policy.sgx_claims,\n \"object?\",\n \"key_policy.sgx_claims\"\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, \"string\", `key_policy.sgx_claims[\"${name}\"]`);\n }\n }\n }\n checkType(args.jwks, - \"object?\", \"jwks\");\n if (args.jwks) {\n checkJwks(args.jwks, - \"jwks\");\n }\n if (args.auto_refresh) {\n if (!args.ca_cert_bundle_name) - {\n throw new Error(\n \"ca_cert_bundle_name is missing - but required if auto_refresh is true\"\n );\n }\n let - url;\n try {\n url = parseUrl(args.issuer);\n } - catch (e) {\n throw new Error(\"issuer must be a URL if auto_refresh - is true\");\n }\n if (url.scheme != \"https\") {\n throw - new Error(\n \"issuer must be a URL starting with https:// if - auto_refresh is true\"\n );\n }\n if (url.query - || url.fragment) {\n throw new Error(\n \"issuer must - be a URL without query/fragment if auto_refresh is true\"\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[\"public:ccf.gov.tls.ca_cert_bundles\"].has(\n caCertBundleNameBuf\n )\n ) - {\n throw new Error(\n `No CA cert bundle found with - name ''${caCertBundleName}''`\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[\"public:ccf.gov.jwt.issuers\"].set(issuerBuf, - metadataBuf);\n }\n ),\n ],\n [\n \"set_jwt_public_signing_keys\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n checkJwks(args.jwks, \"jwks\");\n },\n function - (args) {\n const issuer = args.issuer;\n const issuerBuf = ccf.strToBuf(issuer);\n const - metadataBuf = ccf.kv[\"public:ccf.gov.jwt.issuers\"].get(issuerBuf);\n if - (metadataBuf === undefined) {\n throw new Error(`issuer ${issuer} - not found`);\n }\n const metadata = ccf.bufToJsonCompatible(metadataBuf);\n const - jwks = args.jwks;\n ccf.setJwtPublicSigningKeys(issuer, metadata, jwks);\n }\n ),\n ],\n [\n \"remove_jwt_issuer\",\n new - Action(\n function (args) {\n checkType(args.issuer, \"string\", - \"issuer\");\n },\n function (args) {\n const issuerBuf = - ccf.strToBuf(args.issuer);\n if (!ccf.kv[\"public:ccf.gov.jwt.issuers\"].delete(issuerBuf)) - {\n return;\n }\n ccf.removeJwtPublicSigningKeys(args.issuer);\n }\n ),\n ],\n [\n \"add_node_code\",\n new - Action(\n function (args) {\n checkType(args.new_code_id, \"string\", - \"new_code_id\");\n checkType(args.existing_code_id, \"string\", \"existing_code_id\");\n },\n function - (args, proposalId) {\n const existingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.existing_code_id)\n );\n if - (existingCode === undefined) {\n throw new Error(`Code required to - exist is not present: ${args.existing_code_id}`);\n }\n\n const - newCodeId = ccf.strToBuf(args.new_code_id);\n const ALLOWED = ccf.jsonCompatibleToBuf(\"AllowedToJoin\");\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].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 \"transition_node_to_trusted\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node === undefined) {\n throw new Error(`No such node: ${args.node_id}`);\n }\n const - nodeInfo = ccf.bufToJsonCompatible(node);\n if (nodeInfo.status === - \"Pending\") {\n nodeInfo.status = \"Trusted\";\n nodeInfo.ledger_secret_seqno - = ccf.network.getLatestLedgerSecretSeqno();\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(nodeInfo)\n );\n }\n }\n ),\n ],\n [\n \"remove_node_code\",\n new - Action(\n function (args) {\n checkType(args.code_id_to_remove, - \"string\", \"code_id_to_remove\");\n checkType(args.remaining_code_id, - \"string\", \"remaining_code_id\");\n },\n function (args) {\n const - remainingCode = ccf.kv[\"public:ccf.gov.nodes.code_ids\"].get(\n ccf.strToBuf(args.remaining_code_id)\n );\n if - (remainingCode === undefined) {\n throw new Error(`Code required - to remain is not present: ${args.remaining_code_id}`);\n }\n\n const - codeIdToRemove = ccf.strToBuf(args.code_id_to_remove);\n ccf.kv[\"public:ccf.gov.nodes.code_ids\"].delete(codeIdToRemove);\n }\n ),\n ],\n [\n \"remove_node\",\n new - Action(\n function (args) {\n checkType(args.node_id, \"string\", - \"node_id\");\n },\n function (args) {\n const node = ccf.kv[\"public:ccf.gov.nodes.info\"].get(\n ccf.strToBuf(args.node_id)\n );\n if - (node !== undefined) {\n const node_obj = ccf.bufToJsonCompatible(node);\n node_obj.status - = \"Retired\";\n ccf.kv[\"public:ccf.gov.nodes.info\"].set(\n ccf.strToBuf(args.node_id),\n ccf.jsonCompatibleToBuf(node_obj)\n );\n }\n }\n ),\n ],\n [\n \"set_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n checkType(args.data, - \"object\", \"data\");\n },\n function (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].set(\n ccf.strToBuf(args.id),\n ccf.jsonCompatibleToBuf(args.data)\n );\n }\n ),\n ],\n [\n \"remove_service_principal\",\n new - Action(\n function (args) {\n checkType(args.id, \"string\", \"id\");\n },\n function - (args) {\n ccf.kv[\"public:ccf.gov.service_principals\"].delete(\n ccf.strToBuf(args.id)\n );\n }\n ),\n ],\n]);\nexport - function apply(proposal, proposalId) {\n const proposed_actions = JSON.parse(proposal)[\"actions\"];\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[\"public:ccf.gov.members.info\"].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 // Some actions can always be called by operators.\n const allowedOperatorActions - = [\n \"remove_ca_cert_bundle\",\n \"remove_jwt_issuer\",\n \"remove_node\",\n \"remove_service_principal\",\n \"remove_user\",\n \"remove_user_by_cert\",\n \"set_ca_cert_bundle\",\n \"set_js_app\",\n \"set_jwt_issuer\",\n \"set_jwt_public_signing_keys\",\n \"set_service_principal\",\n \"set_user\",\n \"set_user_data\",\n \"transition_node_to_trusted\",\n \"transition_service_to_open\"\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 - === \"set_member\") {\n const memberData = action.args[\"member_data\"];\n if - (memberData && memberData.is_operator) {\n return true;\n }\n } else - if (action.name === \"remove_member\") {\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)[\"actions\"];\n\n // - Count member votes.\n const memberVoteCount = votes.filter(\n (v) => v.vote - && !isOperator(v.member_id)\n ).length;\n\n // Count active members, excluding - operators.\n let activeMemberCount = 0;\n ccf.kv[\"public:ccf.gov.members.info\"].forEach((value, - key) => {\n const memberId = ccf.bufToStr(key);\n const info = ccf.bufToJsonCompatible(value);\n if - (info.status === \"Active\" && !isOperator(memberId)) {\n activeMemberCount++;\n }\n });\n\n // - A proposal is an operator change if it''s only applying operator actions.\n const - isOperatorChange = actions.every(canOperatorPass);\n\n // A majority of members - can always accept a proposal.\n if (memberVoteCount > Math.floor(activeMemberCount - / 2)) {\n return \"Accepted\";\n }\n\n // Operators proposing operator - changes can accept them without a vote.\n if (isOperatorChange && isOperator(proposerId)) - {\n return \"Accepted\";\n }\n\n return \"Open\";\n}\nexport function - validate(input) {\n let proposal = JSON.parse(input);\n let errors = [];\n let - position = 0;\n for (const action of proposal[\"actions\"]) {\n const - definition = actions.get(action.name);\n if (definition) {\n try {\n definition.validate(action.args);\n } - catch (e) {\n errors.push(\n `${action.name} at position ${position} - failed validation: ${e}\\n${e.stack}`\n );\n }\n } else {\n errors.push(`${action.name}: - no such action`);\n }\n position++;\n }\n return { valid: errors.length - === 0, description: errors.join(\", \") };\n}\n"}' - headers: - content-length: '30912' - content-type: application/json - x-ms-ccf-transaction-id: '2.1292' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/governance/constitution?api-version=0.1-preview -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) - method: GET - uri: https://fake-confidential-ledger.azure.com/app/enclaveQuotes?api-version=0.1-preview - response: - body: - string: '{"currentNodeId":"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3","enclaveQuotes":{"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074fca16e1b382cc4d9313fca5acbf408b0000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b29f6c95262f276c27d647ad544333f705abc0d492c1bb6c8c5e85cd5349cf800000000000000000000000000000000000000000000000000000000000000003410000061af278ff696604a85f21ef449253c0d0053cefafddc13716293cde909aa5258b6f21ed480e8411418632b768a16a790c4efee2b69278a2b72ccc8411a59fa6e8eb0721568eb8eefb5ffe48d4c0535ccbd637f6998f30d252334d093bfe489707cef9b5abbe51428ff6feb0d5590723896f7e3d8466e7c4c7f661f5588b1cbc011110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045566c39ee9249e7f197a87256fd7267ac67bec7f27e6133d95306656244366e00000000000000000000000000000000000000000000000000000000000000007d1cada36a9e54bde941973bd2de03d5304bffdd775474aec6d38207272d9226a3e9e0314555d3960507f3224cf7d2009d75c8b968071fc31094a3dfb999c1e42000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436167417749424167495545646d6b4833625131367152525856766e73307369596b3979495577436759494b6f5a497a6a3045417749770a6354456a4d4345474131554541777761535735305a577767553064594946424453794251636d396a5a584e7a6233496751304578476a415942674e5642416f4d0a45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155450a4341774351304578437a414a42674e5642415954416c56544d423458445449784d4449784d4449794d5455774e466f58445449344d4449784d4449794d5455770a4e466f77634445694d434147413155454177775a535735305a5777675530645949464244537942445a584a3061575a70593246305a5445614d426747413155450a43677752535735305a577767513239796347397959585270623234784644415342674e564241634d43314e68626e526849454e7359584a684d517377435159440a5651514944414a445154454c4d416b474131554542684d4356564d775754415442676371686b6a4f5051494242676771686b6a4f50514d4242774e43414152680a5247587236365079506673764a55444a666158563841575957586768454e6b784638614d6d3471396a5a543546356d2f4d446b466365724a735a486c6d2b58710a4471673138452f344f416e39622f70344e366d796f3449436d7a434341706377487759445652306a42426777466f4155304f6971326e58582b53354a463567380a6578526c304e587957553077587759445652306642466777566a42556f464b6755495a4f6148523063484d364c79396863476b7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253397a5a3367765932567964476c6d61574e6864476c76626939324d6939775932746a636d772f593245390a63484a765932567a633239794d42304741315564446751574242537956634a3754335950586f383059535762493759504e514233506a414f42674e56485138420a4166384542414d434273417744415944565230544151482f42414977414443434164514743537147534962345451454e4151534341635577676748424d4234470a43697147534962345451454e4151454545475a445038395a483248673435704f4f5337372b564d776767466b42676f71686b69472b453042445145434d4949420a5644415142677371686b69472b45304244514543415149424554415142677371686b69472b45304244514543416749424554415142677371686b69472b4530420a4451454341774942416a415142677371686b69472b45304244514543424149424244415142677371686b69472b453042445145434251494241544152426773710a686b69472b4530424451454342674943414941774541594c4b6f5a496876684e4151304241676343415159774541594c4b6f5a496876684e41513042416767430a415141774541594c4b6f5a496876684e4151304241676b43415141774541594c4b6f5a496876684e4151304241676f43415141774541594c4b6f5a496876684e0a4151304241677343415141774541594c4b6f5a496876684e4151304241677743415141774541594c4b6f5a496876684e4151304241673043415141774541594c0a4b6f5a496876684e4151304241673443415141774541594c4b6f5a496876684e4151304241673843415141774541594c4b6f5a496876684e41513042416841430a415141774541594c4b6f5a496876684e415130424168454341516f774877594c4b6f5a496876684e4151304241684945454245524167514267415941414141410a41414141414141774541594b4b6f5a496876684e4151304241775143414141774641594b4b6f5a496876684e4151304242415147414a4275315141414d4138470a43697147534962345451454e4151554b41514177436759494b6f5a497a6a3045417749445351417752674968414a497245793530694b564857596f70573844500a56525366306859546f7232535830674b4f517569354f644241694541354d6351674a7a615550497a456342714c7970554a646a6a5a6e694c77686458387a75520a496458303244593d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006010d6eef406e3e96aa4d07c16192bb8584e1e694637e0b466818525191c99ee"},"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"6f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f06074873041a31fa9e99c28726074c95f0110000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cbf1112f99fb6a724779ee53b9caf70408fa5408bb7f309ae29ce550b583b7a0000000000000000000000000000000000000000000000000000000000000000341000004d5c886623f85f5223e27226dd322449239a5c3cccc355503a18f85d62b7823d2d0bc53f9c631483f96a85a5b9c55a30bcfa90cdb697d7fee0d7dd41ed111917f90fc89d9b26a4f817549ca484f845ccdd2e7a58317ef86498dc72f884122fcb744c534915ab067517627d73b1984d14196a6cb2ecc8f86bf62a81b535213e0411110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f588dbf7520c9e3cc41fff530db8b42141a25b1f84f167963cb1305d0557d130000000000000000000000000000000000000000000000000000000000000000cc63294e9101303c80d2cf7b5ff71a272506220378e2f50331a69cbf1eab6b76fc4b70eb794e6650c41220f4dbb5c2ab583ec153d1eddf72f5b34fc82b8621542000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949456754434342436567417749424167495641495a565a7a647836376f5348596b535a47696b2f7a764f715a4d554d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d5463774e5441304e444e61467730794f44417a4d5463774e5441300a4e444e614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a4f63727649474473437751544e6535344135436c444d3864542f78627a4c476b50614932617352555a56392b3367712b5855626d486731724631462f534f6d700a6337576759624737747a70716e662b7a67324e4250614f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e564851344546675155685539616b6630615270427168507145587378754e736a2f6672457744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b453042445145424242435070554b3474472b5243415148592b7353395a76644d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d4555434944644e6a44357953615a6f703678436f6344620a424f752f6976504550647663326b6a78356a744b79715a374169454135666c716a51596c5235435339746b2f3678777a7a4a514331794f34374f4556776950430a2f44306756384d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f64617461006f88f664c95b668980edb03b579287685709610b8cc35bcd93b2ba60c887f076"},"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3":{"mrenclave":"e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a576","nodeId":"a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3","quoteVersion":"OE_SGX_v1","raw":"030002000000000005000a00939a7233f79c4ca9940a0db3957f060754a876d8093c9425005f2e6815d530010000000011110305ff8006000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000700000000000000e7bc49902931149e29e9649cce0891ac468fdfc59326440b3297ef9134a8a5760000000000000000000000000000000000000000000000000000000000000000434dc2c9b2b780e91369417ed54a892538854f04160d4f3e8a9c96786538e37f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007cffd2506bd7388597f99ac20e4a744e498ff0ef505108c34368f1f731247e43000000000000000000000000000000000000000000000000000000000000000034100000c369dfe6412619ce5c1bf9026f7fcbfdd79ae58aa1053c2cad78356e614240701f60ba69220f9cbd8592d40cbf1f477a13a253dbb45bd242580ccb9f11f912ea06834e14e82c9982eb6cee7471e3b13721661ece0a68458b0948b26ed53322b58dbf3252283ce9fe4703d59aff2003d8f94c5b61722eefd439c735d7e40b0e9a11110305ff800600000000000000000000000000000000000000000000000000000000000000000000000000000000001500000000000000070000000000000060d85af28be8d1c40a08d98b009d5f8acc1384a385cf460800e478791d1a979c00000000000000000000000000000000000000000000000000000000000000008c4f5775d796503e96137f77c68a829a0056ac8ded70140b081b094490c57bff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000751ade3621fe0e0e62fdfda76b32e7524bd87388a96e0a98ace244c95a8965b500000000000000000000000000000000000000000000000000000000000000000322ce315e71a60490bddf773f32b059f4cce7b435d550e2c1cd34aa7faf1cf4d06858ceb9ff5b8fa2aa9d3ba7a564c53853ca78ea6e1175e02b185f94ec4e852000000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0500cc0d00002d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d49494567544343424365674177494241674956414c546d71796a394e4363724f414844654849486f6c754d565758464d416f4743437147534d343942414d430a4d484578497a416842674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b0a4442464a626e526c6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e560a4241674d416b4e424d517377435159445651514745774a56557a4165467730794d54417a4d6a4d774f544d304e546c61467730794f44417a4d6a4d774f544d300a4e546c614d484178496a416742674e5642414d4d47556c756447567349464e4857434251513073675132567964476c6d61574e6864475578476a415942674e560a42416f4d45556c756447567349454e76636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b470a413155454341774351304578437a414a42674e5642415954416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a304441516344516741450a715165687944707854673273444b6849772b64454f2b42647536527039586f516e6c3359322f6a32497455566e524374704236484c707943325a45614d6853610a4b716c6f436476715674426872504f7364377374474b4f434170737767674b584d42384741315564497751594d426141464e446f71747031312f6b75535265590a504873555a644456386c6c4e4d46384741315564487752594d465977564b42536f464347546d68306448427a4f693876595842704c6e527964584e305a57527a0a5a584a3261574e6c63793570626e526c6243356a62323076633264344c324e6c636e52705a6d6c6a5958527062323476646a497663474e7259334a7350324e680a5058427962324e6c63334e76636a416442674e5648513445466751552f724673795665793276384e58594e354178754c766177586868347744675944565230500a4151482f42415144416762414d41774741315564457745422f7751434d4141776767485542676b71686b69472b45304244514545676748464d494942775441650a42676f71686b69472b4530424451454242424132346f6d696e7451356a58772f325543756237766b4d4949425a41594b4b6f5a496876684e41513042416a43430a415651774541594c4b6f5a496876684e4151304241674543415245774541594c4b6f5a496876684e4151304241674943415245774541594c4b6f5a496876684e0a4151304241674d43415149774541594c4b6f5a496876684e4151304241675143415151774541594c4b6f5a496876684e4151304241675543415145774551594c0a4b6f5a496876684e4151304241675943416743414d42414743797147534962345451454e41514948416745474d42414743797147534962345451454e415149490a416745414d42414743797147534962345451454e4151494a416745414d42414743797147534962345451454e4151494b416745414d42414743797147534962340a5451454e4151494c416745414d42414743797147534962345451454e4151494d416745414d42414743797147534962345451454e4151494e416745414d4241470a43797147534962345451454e4151494f416745414d42414743797147534962345451454e41514950416745414d42414743797147534962345451454e415149510a416745414d42414743797147534962345451454e415149524167454b4d42384743797147534962345451454e41514953424241524551494541594147414141410a41414141414141414d42414743697147534962345451454e41514d45416741414d42514743697147534962345451454e415151454267435162745541414441500a42676f71686b69472b45304244514546436745414d416f4743437147534d343942414d43413067414d455543494252454b346b4c5559532b766149336436536d0a6668564f613642726d4c43316d50314b7265346f52456262416945416d78325a496f506f36584838303839576668746f6539356b6345733432507050343152370a643544467167513d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436c7a4343416a36674177494241674956414e446f71747031312f6b7553526559504873555a644456386c6c4e4d416f4743437147534d343942414d430a4d476778476a415942674e5642414d4d45556c756447567349464e48574342536232393049454e424d526f77474159445651514b4442464a626e526c624342440a62334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e424d5173770a435159445651514745774a56557a4165467730784f4441314d6a45784d4451314d4468614677307a4d7a41314d6a45784d4451314d4468614d484578497a41680a42674e5642414d4d476b6c756447567349464e48574342515130736755484a765932567a6332397949454e424d526f77474159445651514b4442464a626e526c0a6243424462334a7762334a6864476c76626a45554d424947413155454277774c553246756447456751327868636d4578437a414a42674e564241674d416b4e420a4d517377435159445651514745774a56557a425a4d424d4742797147534d34394167454743437147534d34394177454841304941424c39712b4e4d7032494f670a74646c31626b2f75575a352b5447516d38614369387a373866732b664b435133642b75447a586e56544154325a68444369667949754a77764e33774e427039690a484253534d4a4d4a72424f6a6762737767626777487759445652306a42426777466f4155496d554d316c71644e496e7a6737535655723951477a6b6e427177770a556759445652306642457377535442486f45576751345a426148523063484d364c79396a5a584a3061575a70593246305a584d7564484a316333526c5a484e6c0a636e5a705932567a4c6d6c75644756734c6d4e766253394a626e526c62464e4857464a76623352445153356a636d7777485159445652304f42425945464e446f0a71747031312f6b7553526559504873555a644456386c6c4e4d41344741315564447745422f77514541774942426a415342674e5648524d4241663845434441470a4151482f416745414d416f4743437147534d343942414d43413063414d45514349432f396a2b3834542b487a74564f2f734f5142574a6253642b2f327565784b0a342b6141306a6346424c63704169413364684d72463563443532743646714d764149706a385864476d79326265656c6a4c4a4b2b707a706352413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949436a6a4343416a53674177494241674955496d554d316c71644e496e7a6737535655723951477a6b6e42717777436759494b6f5a497a6a3045417749770a614445614d4267474131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e760a636e4276636d4630615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a0a42674e5642415954416c56544d423458445445344d4455794d5445774e4445784d566f5844544d7a4d4455794d5445774e4445784d466f77614445614d4267470a4131554541777752535735305a5777675530645949464a766233516751304578476a415942674e5642416f4d45556c756447567349454e76636e4276636d46300a615739754d5251774567594456515148444174545957353059534244624746795954454c4d416b47413155454341774351304578437a414a42674e56424159540a416c56544d466b77457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414543366e45774d4449595a4f6a2f69505773437a61454b69370a314f694f534c52466857476a626e42564a66566e6b59347533496a6b4459594c304d784f346d717379596a6c42616c54565978465032734a424b357a6c4b4f420a757a43427544416642674e5648534d4547444157674251695a517a575770303069664f44744a5653763141624f5363477244425342674e5648523845537a424a0a4d45656752614244686b466f64485277637a6f764c324e6c636e52705a6d6c6a5958526c63793530636e567a6447566b63325679646d6c6a5a584d75615735300a5a577775593239744c306c756447567355306459556d397664454e424c6d4e796244416442674e564851344546675155496d554d316c71644e496e7a673753560a55723951477a6b6e4271777744675944565230504151482f42415144416745474d42494741315564457745422f7751494d4159424166384341514577436759490a4b6f5a497a6a30454177494453414177525149675151732f30387279636450617543466b3855505158434d416c736c6f4265374e7761514754636470613045430a495143557438534776784b6d6a70634d2f7a3057503944766f3868326b3564753169574464426b416e2b306969413d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a0001000000000000000100000000000000100000000000000020000000000000007367785f7265706f72745f6461746100a18f4dd33a4861d5b0eb1c28fd101d55aa72999327aaa3615e98aa618702e5b3"}}}' - headers: - content-length: '28866' - content-type: application/json - x-ms-ccf-transaction-id: '2.1292' - status: - code: 200 - message: OK - url: https://sdk-test-ledger-prod.eastus.cloudapp.azure.com/app/enclaveQuotes?api-version=0.1-preview -version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client.test_get_ledger_identity.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client.test_get_ledger_identity.yaml index b6f506ca4de0..431a1e19cbc8 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client.test_get_ledger_identity.yaml +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client.test_get_ledger_identity.yaml @@ -9,28 +9,28 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://eastus.identity.confidential-ledger.core.azure.com/ledgerIdentity/fake-ledger-id?api-version=0.1-preview + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 response: body: - string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBezCCASGgAwIBAgIRAL/+TT7iOY+UWa5Uh484vRYwCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABG4t5blH9yUsJB4Ywm0VcsxxiFTdiWffd4w+m8r3GRfV0i6qaHT44dVK\nrMQH7ymSGCtz5PHqUQhy8ZJWAepDDKijUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFD+OVuRiS6dJICYtesS2Shx/KIEEMB8GA1UdIwQYMBaAFD+OVuRiS6dJICYt\nesS2Shx/KIEEMAoGCCqGSM49BAMCA0gAMEUCICrLXfKPC1DmKdcTKnZwhiEoPvMi\nRboMeODv/0hlL67gAiEA5gvNwskSiYefETGihWTouTqL+uyhDb4s3/R5XcIHaQQ=\n-----END - CERTIFICATE-----\n\u0000","ledgerId":"fake-ledger-id"}' + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' headers: content-type: - application/json; charset=utf-8 date: - - Wed, 12 May 2021 15:41:17 GMT + - Fri, 01 Jul 2022 23:08:13 GMT server: - Kestrel transfer-encoding: - chunked x-ms-image-digest: - - sha256:60f2a1ff266b1862d6547883fa34945b0a60cd1d8a03a720e69fd7fc59283d36 + - sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e x-ms-image-tag: - - latest-20210511024948901-55150065 + - 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 x-ms-machinename: - - identityservice-6db5f69478-9ntln + - identityservice-6499ffbf45-jh62d status: code: 200 message: OK diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client_async.test_get_ledger_identity.yaml b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client_async.test_get_ledger_identity.yaml index 603405db6aa9..d7988bb182a4 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client_async.test_get_ledger_identity.yaml +++ b/sdk/confidentialledger/azure-confidentialledger/tests/recordings/test_identity_service_client_async.test_get_ledger_identity.yaml @@ -4,34 +4,24 @@ interactions: headers: Accept: - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive User-Agent: - - azsdk-python-confidentialledger/1.0.0b1 Python/3.9.1 (macOS-10.16-x86_64-i386-64bit) + - azsdk-python-confidentialledger-identity-service/1.0.0 Python/3.8.10 (Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29) method: GET - uri: https://eastus.identity.confidential-ledger.core.azure.com/ledgerIdentity/fake-ledger-id?api-version=0.1-preview + uri: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/fake?api-version=2022-05-13 response: body: - string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBezCCASGgAwIBAgIRAL/+TT7iOY+UWa5Uh484vRYwCgYIKoZIzj0EAwIwFjEU\nMBIGA1UEAwwLQ0NGIE5ldHdvcmswHhcNMjEwMzExMDAwMDAwWhcNMjMwNjExMjM1\nOTU5WjAWMRQwEgYDVQQDDAtDQ0YgTmV0d29yazBZMBMGByqGSM49AgEGCCqGSM49\nAwEHA0IABG4t5blH9yUsJB4Ywm0VcsxxiFTdiWffd4w+m8r3GRfV0i6qaHT44dVK\nrMQH7ymSGCtz5PHqUQhy8ZJWAepDDKijUDBOMAwGA1UdEwQFMAMBAf8wHQYDVR0O\nBBYEFD+OVuRiS6dJICYtesS2Shx/KIEEMB8GA1UdIwQYMBaAFD+OVuRiS6dJICYt\nesS2Shx/KIEEMAoGCCqGSM49BAMCA0gAMEUCICrLXfKPC1DmKdcTKnZwhiEoPvMi\nRboMeODv/0hlL67gAiEA5gvNwskSiYefETGihWTouTqL+uyhDb4s3/R5XcIHaQQ=\n-----END - CERTIFICATE-----\n\u0000","ledgerId":"fake-ledger-id"}' + string: '{"ledgerTlsCertificate":"-----BEGIN CERTIFICATE-----\nMIIBeTCCASCgAwIBAgIQcTrTRLjb9eOoGTXSvOEgxjAKBggqhkjOPQQDAjAWMRQw\nEgYDVQQDDAtDQ0YgTmV0d29yazAeFw0yMjA2MjcxNjA3MjNaFw0yMjA5MjUxNjA3\nMjJaMBYxFDASBgNVBAMMC0NDRiBOZXR3b3JrMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEyn3oh7/D+m/yuzdWNSEh3ZOupuUiO6U7MIcwiM6RBZ3nsWQHGeVyT0Ai\n+7cYDtPGo/8VRio+Brknl7VALE3q9aNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4E\nFgQUh1gNHgpIlTONmFbFX7HeG1rcT6gwHwYDVR0jBBgwFoAUh1gNHgpIlTONmFbF\nX7HeG1rcT6gwCgYIKoZIzj0EAwIDRwAwRAIgdd7rQszgGJ+jtjuiECigiFxoAvDk\nOPPBwTvMsE8TzsYCIDgYQ1mGHyZ52NXgoxPfqVVFTive8JIsjeQuczMZFq+9\n-----END + CERTIFICATE-----\n","ledgerId":"fake"}' headers: - content-type: - - application/json; charset=utf-8 - date: - - Wed, 12 May 2021 15:41:17 GMT - server: - - Kestrel - transfer-encoding: - - chunked - x-ms-image-digest: - - sha256:60f2a1ff266b1862d6547883fa34945b0a60cd1d8a03a720e69fd7fc59283d36 - x-ms-image-tag: - - latest-20210511024948901-55150065 - x-ms-machinename: - - identityservice-6db5f69478-xgwr4 + content-type: application/json; charset=utf-8 + date: Fri, 01 Jul 2022 23:08:14 GMT + server: Kestrel + transfer-encoding: chunked + x-ms-image-digest: sha256:7a76c9097c3450987501c23e71a3e16b89f727059ab6de727807ac97b808810e + x-ms-image-tag: 1.0.01999.541-e02672ed644876c9cf10c5494e0203a0dc9da070 + x-ms-machinename: identityservice-6499ffbf45-g48zc status: code: 200 message: OK + url: https://identity.confidential-ledger.core.azure.com/ledgerIdentity/lyshi-python-sdk?api-version=2022-05-13 version: 1 diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client.py new file mode 100644 index 000000000000..4716af37a56f --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client.py @@ -0,0 +1,370 @@ +import hashlib +import os +import time + +from azure.confidentialledger import ( + ConfidentialLedgerCertificateCredential, + ConfidentialLedgerClient, +) + +from _shared.constants import USER_CERTIFICATE_THUMBPRINT +from _shared.testcase import ConfidentialLedgerPreparer, ConfidentialLedgerTestCase + + +class ConfidentialLedgerClientTest(ConfidentialLedgerTestCase): + def create_confidentialledger_client(self, endpoint, ledger_id, is_aad, fetch_tls_cert=True): + if fetch_tls_cert: # If True, explicitly fetch the ledger TLS certificate. + self.set_ledger_identity(ledger_id) + else: + # Remove the file so the client sees it doesn't exist and creates it. + os.remove(self.network_certificate_path) + + # The ACL instance should already have the potential AAD user added as an Administrator. + credential = self.get_credential(ConfidentialLedgerClient) + client = self.create_client_from_credential( + ConfidentialLedgerClient, + credential=credential, + endpoint=endpoint, + # self.network_certificate_path is set via self.set_ledger_identity + ledger_certificate_path=self.network_certificate_path, # type: ignore + ) + + if not is_aad: + # Add the certificate-based user. + client.create_or_update_user( + USER_CERTIFICATE_THUMBPRINT, {"assignedRole": "Administrator"} + ) + + # Sleep to make sure all replicas know the user is added. + time.sleep(3) + + credential = ConfidentialLedgerCertificateCredential( + certificate_path=self.user_certificate_path + ) + client = ConfidentialLedgerClient( + credential=credential, + endpoint=endpoint, + # self.network_certificate_path is set via self.set_ledger_identity + ledger_certificate_path=self.network_certificate_path, # type: ignore + ) + + return client + + @ConfidentialLedgerPreparer() + def test_append_entry_flow_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + self.append_entry_flow_actions(client) + + @ConfidentialLedgerPreparer() + def test_append_entry_flow_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + self.append_entry_flow_actions(client) + + def append_entry_flow_actions(self, client): + entry_contents = "Test entry from Python SDK" + append_result = client.create_ledger_entry({"contents": entry_contents}) + assert append_result["transactionId"] + assert append_result["collectionId"] + + append_result_sub_ledger_id = append_result["collectionId"] + append_result_transaction_id = append_result["transactionId"] + + poller = client.begin_wait_for_commit( + transaction_id=append_result_transaction_id + ) + poller.wait() + + transaction_status = client.get_transaction_status( + transaction_id=append_result_transaction_id + ) + assert transaction_status["transactionId"] == append_result_transaction_id + assert transaction_status["state"] == "Committed" + + poller = client.begin_get_receipt(transaction_id=append_result_transaction_id) + receipt = poller.result() + assert receipt["transactionId"] == append_result_transaction_id + assert receipt["receipt"] + + latest_entry = client.get_current_ledger_entry() + # The transaction ids may not be equal in the unfortunate edge case where an internal + # operation occurs after the ledger append (e.g. because a node was restarted). Then, + # the latest id will be higher. + latest_entry_view = int(latest_entry["transactionId"].split(".")[0]) + latest_entry_seqno = int(latest_entry["transactionId"].split(".")[-1]) + append_result_view = int(append_result_transaction_id.split(".")[0]) + append_result_seqno = int(append_result_transaction_id.split(".")[-1]) + assert latest_entry_view >= append_result_view and latest_entry_seqno >= append_result_seqno + assert latest_entry["contents"] == entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = client.begin_create_ledger_entry( + {"contents": "Test entry 2 from Python SDK"} + ) + poller.wait() + + latest_entry = client.get_current_ledger_entry() + assert latest_entry["transactionId"] != append_result_transaction_id + assert latest_entry["contents"] != entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = client.begin_get_ledger_entry( + transaction_id=append_result_transaction_id + ) + original_entry = poller.result() + assert original_entry["entry"]["transactionId"] == append_result_transaction_id + assert original_entry["entry"]["contents"] == entry_contents + assert original_entry["entry"]["collectionId"] == append_result_sub_ledger_id + + @ConfidentialLedgerPreparer() + def test_append_entry_flow_with_collection_id_aad_user( + self, confidentialledger_endpoint, confidentialledger_id + ): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + self.append_entry_flow_with_collection_id_actions(client) + + @ConfidentialLedgerPreparer() + def test_append_entry_flow_with_collection_id_cert_user( + self, confidentialledger_endpoint, confidentialledger_id + ): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + self.append_entry_flow_with_collection_id_actions(client) + + def append_entry_flow_with_collection_id_actions(self, client): + collection_id = "132" + entry_contents = f"Test entry from Python SDK. Collection: {collection_id}" + append_result = client.create_ledger_entry( + {"contents": entry_contents}, + collection_id=collection_id, + ) + assert append_result["transactionId"] + assert append_result["collectionId"] == collection_id + + append_result_sub_ledger_id = append_result["collectionId"] + append_result_transaction_id = append_result["transactionId"] + + poller = client.begin_wait_for_commit( + transaction_id=append_result_transaction_id + ) + poller.wait() + + transaction_status = client.get_transaction_status( + transaction_id=append_result_transaction_id + ) + assert transaction_status + assert transaction_status["state"] == "Committed" + + poller = client.begin_get_receipt(transaction_id=append_result_transaction_id) + receipt = poller.result() + assert receipt["transactionId"] == append_result_transaction_id + assert receipt["receipt"] + + latest_entry = client.get_current_ledger_entry(collection_id=collection_id) + # The transaction ids may not be equal in the unfortunate edge case where an internal + # operation occurs after the ledger append (e.g. because a node was restarted). Then, + # the latest id will be higher. + latest_entry_view = int(latest_entry["transactionId"].split(".")[0]) + latest_entry_seqno = int(latest_entry["transactionId"].split(".")[-1]) + append_result_view = int(append_result_transaction_id.split(".")[0]) + append_result_seqno = int(append_result_transaction_id.split(".")[-1]) + assert latest_entry_view >= append_result_view and latest_entry_seqno >= append_result_seqno + assert latest_entry["contents"] == entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = client.begin_create_ledger_entry( + {"contents": f"Test entry 2 from Python SDK. Collection: {collection_id}"}, + collection_id=collection_id, + ) + poller.wait() + + latest_entry = client.get_current_ledger_entry(collection_id=collection_id) + assert latest_entry["transactionId"] != append_result_transaction_id + assert latest_entry["contents"] != entry_contents + assert latest_entry["collectionId"] == collection_id + + poller = client.begin_get_ledger_entry( + transaction_id=append_result_transaction_id, + collection_id=collection_id, + ) + original_entry = poller.result() + assert original_entry["entry"]["transactionId"] == append_result_transaction_id + assert original_entry["entry"]["contents"] == entry_contents + assert original_entry["entry"]["collectionId"] == append_result_sub_ledger_id + + collections = client.list_collections() + collection_ids = set() + for collection in collections: + collection_ids.add(collection["collectionId"]) + assert collection_id in collection_ids + + @ConfidentialLedgerPreparer() + def test_range_query_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + self.range_query_actions(client) + + @ConfidentialLedgerPreparer() + def test_range_query_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + self.range_query_actions(client) + + def range_query_actions(self, client): + num_collections = 5 + + # Send 2 messages per collection. No need to test pagination over many pages because: + # 1. Each page is 1000 entries, so we'd have to send 1001 * num_collections messages and + # and read them all; not ideal! + # 2. The pagination _should_ be tested often enough because the first response is typically + # not ready, with a nextLink pointing at the original query and an empty list of entires, + # as the historical query is just starting. + num_messages_sent = num_collections * 2 + + messages = {m: [] for m in range(num_collections)} + for i in range(num_messages_sent): + message = "message-{0}".format(i) + kwargs = ( + {} if num_collections == 0 else {"collection_id": "{0}".format(i % num_collections)} + ) + + if i != num_messages_sent - 1: + append_result = client.create_ledger_entry({"contents": message}, **kwargs) + else: + append_poller = client.begin_create_ledger_entry({"contents": message}, **kwargs) + append_result = append_poller.result() + + messages[i % num_collections].append( + (append_result["transactionId"], message, kwargs) + ) + + num_matched = 0 + for i in range(num_collections): + query_result = client.list_ledger_entries( + from_transaction_id=messages[i][0][0], + to_transaction_id=messages[i][-1][0], + **messages[i][0][2], + ) + for index, historical_entry in enumerate(query_result): + assert historical_entry["transactionId"] == messages[i][index][0] + assert historical_entry["contents"] == messages[i][index][1] + collection_id = messages[i][index][2].get("collection_id", None) + if collection_id is not None: + assert historical_entry["collectionId"] == collection_id + + num_matched += 1 + + assert num_matched == num_messages_sent + + @ConfidentialLedgerPreparer() + def test_user_management_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + self.user_management_actions(client) + + @ConfidentialLedgerPreparer() + def test_user_management_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + self.user_management_actions(client) + + def user_management_actions(self, client): + aad_user_id = "0" * 36 # AAD Object Ids have length 36 + cert_user_id = ( + "7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4" + ":77:30:1F" + ) + for user_id in [aad_user_id, cert_user_id]: + user = client.create_or_update_user( + user_id, {"assignedRole": "Contributor"} + ) + assert user["userId"] == user_id + assert user["assignedRole"] == "Contributor" + + time.sleep(3) # Let the PATCH user operation be committed, just in case. + + user = client.get_user(user_id) + assert user["userId"] == user_id + assert user["assignedRole"] == "Contributor" + + user = client.create_or_update_user(user_id, {"assignedRole": "Reader"}) + assert user["userId"] == user_id + assert user["assignedRole"] == "Reader" + + time.sleep(3) # Let the PATCH user operation be committed, just in case. + + user = client.get_user(user_id) + assert user["userId"] == user_id + assert user["assignedRole"] == "Reader" + + client.delete_user(user_id) + + @ConfidentialLedgerPreparer() + def test_verification_methods_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + self.verification_methods_actions(client) + + @ConfidentialLedgerPreparer() + def test_verification_methods_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + self.verification_methods_actions(client) + + def verification_methods_actions(self, client): + consortium = client.list_consortium_members() + consortium_size = 0 + for member in consortium: + assert member["certificate"] + assert member["id"] + consortium_size += 1 + assert consortium_size == 1 + + constitution = client.get_constitution() + assert constitution["script"] + assert constitution["digest"] + assert ( + constitution["digest"].lower() == + hashlib.sha256(constitution["script"].encode()).hexdigest().lower() + ) + + ledger_enclaves = client.get_enclave_quotes() + assert len(ledger_enclaves["enclaveQuotes"]) == 3 + assert ledger_enclaves["currentNodeId"] in ledger_enclaves["enclaveQuotes"] + for node_id, quote in ledger_enclaves["enclaveQuotes"].items(): + assert node_id == quote["nodeId"] + assert quote["nodeId"] + assert quote["mrenclave"] + assert quote["raw"] + assert quote["quoteVersion"] + + @ConfidentialLedgerPreparer() + def test_tls_cert_convenience_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True, fetch_tls_cert=False, + ) + self.tls_cert_convenience_actions(client) + + @ConfidentialLedgerPreparer() + def test_tls_cert_convenience_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False, fetch_tls_cert=False, + ) + self.tls_cert_convenience_actions(client) + + def tls_cert_convenience_actions(self, client): + # It's sufficient to use any arbitrary endpoint to test the TLS connection. + constitution = client.get_constitution() + assert constitution["script"] diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad.py deleted file mode 100644 index 5028bd67574d..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad.py +++ /dev/null @@ -1,34 +0,0 @@ -from azure.confidentialledger import ( - ConfidentialLedgerClient, - ConfidentialLedgerCertificateCredential, - LedgerUserRole, -) - -from _shared.client_test_common import ConfidentialLedgerClientTestMixin - -AAD_USER_OBJECT_ID = "a" * 36 - - -class AadCredentialClientTest(ConfidentialLedgerClientTestMixin.BaseTest): - def setUp(self): - super(AadCredentialClientTest, self).setUp() - self.client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=self.get_credential(ConfidentialLedgerClient), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) - - client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=ConfidentialLedgerCertificateCredential( - self.user_certificate_path - ), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) - - aad_object_id = self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_AAD_USER_OBJECT_ID", AAD_USER_OBJECT_ID - ) - client.create_or_update_user(aad_object_id, LedgerUserRole.ADMINISTRATOR) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad_async.py deleted file mode 100644 index 165f89bf5333..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_aad_async.py +++ /dev/null @@ -1,45 +0,0 @@ -import asyncio -import time - -from azure.confidentialledger import ( - ConfidentialLedgerCertificateCredential, - LedgerUserRole, -) -from azure.confidentialledger.aio import ConfidentialLedgerClient - -from _shared.client_test_common_async import AsyncConfidentialLedgerClientTestMixin - -AAD_USER_OBJECT_ID = "a" * 36 - - -class AsyncAadCredentialClientTest( - AsyncConfidentialLedgerClientTestMixin.AsyncBaseTest -): - def setUp(self): - super().setUp() - self.client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=self.get_credential(ConfidentialLedgerClient, is_async=True), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) - - client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=ConfidentialLedgerCertificateCredential( - self.user_certificate_path - ), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) - - aad_object_id = self.set_value_to_scrub( - "CONFIDENTIAL_LEDGER_AAD_USER_OBJECT_ID", AAD_USER_OBJECT_ID - ) - - # Since setUp cannot be async - task = asyncio.ensure_future( - client.create_or_update_user(aad_object_id, LedgerUserRole.ADMINISTRATOR) - ) - while not task.done: - time.sleep(0.5) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_async.py new file mode 100644 index 000000000000..bd7f52c611a4 --- /dev/null +++ b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_async.py @@ -0,0 +1,426 @@ +import asyncio +import hashlib +import os + +from azure.confidentialledger.aio import ConfidentialLedgerClient +from azure.confidentialledger import ConfidentialLedgerCertificateCredential + +from _shared.constants import USER_CERTIFICATE_THUMBPRINT +from _shared.testcase import ConfidentialLedgerPreparer, ConfidentialLedgerTestCase + + +class ConfidentialLedgerClientTest(ConfidentialLedgerTestCase): + async def create_confidentialledger_client( + self, endpoint, ledger_id, is_aad, fetch_tls_cert=True + ): + if fetch_tls_cert: # If True, explicitly fetch the ledger TLS certificate. + self.set_ledger_identity(ledger_id) + else: + # Remove the file so the client sees it doesn't exist and creates it. + os.remove(self.network_certificate_path) + + # The ACL instance should already have the potential AAD user added as an Administrator. + credential = self.get_credential(ConfidentialLedgerClient, is_async=True) + client = self.create_client_from_credential( + ConfidentialLedgerClient, + credential=credential, + endpoint=endpoint, + # self.network_certificate_path is set via self.set_ledger_identity + ledger_certificate_path=self.network_certificate_path, # type: ignore + ) + + if not is_aad: + # Add the certificate-based user. + try: + await client.create_or_update_user( + USER_CERTIFICATE_THUMBPRINT, {"assignedRole": "Administrator"} + ) + finally: + await client.close() + + # Sleep to make sure all replicas know the user is added. + await asyncio.sleep(3) + + credential = ConfidentialLedgerCertificateCredential( + certificate_path=self.user_certificate_path + ) + client = ConfidentialLedgerClient( + credential=credential, + endpoint=endpoint, + # self.network_certificate_path is set via self.set_ledger_identity + ledger_certificate_path=self.network_certificate_path, # type: ignore + ) + + return client + + @ConfidentialLedgerPreparer() + async def test_append_entry_flow_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + try: + await self.append_entry_flow_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_append_entry_flow_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + try: + await self.append_entry_flow_actions(client) + finally: + await client.close() + + async def append_entry_flow_actions(self, client): + entry_contents = "Test entry from Python SDK" + append_result = await client.create_ledger_entry({"contents": entry_contents}) + assert append_result["transactionId"] + assert append_result["collectionId"] + + append_result_sub_ledger_id = append_result["collectionId"] + append_result_transaction_id = append_result["transactionId"] + + poller = await client.begin_wait_for_commit( + transaction_id=append_result_transaction_id + ) + await poller.wait() + + transaction_status = await client.get_transaction_status( + transaction_id=append_result_transaction_id + ) + assert transaction_status["transactionId"] == append_result_transaction_id + assert transaction_status["state"] == "Committed" + + poller = await client.begin_get_receipt( + transaction_id=append_result_transaction_id + ) + receipt = await poller.result() + assert receipt["transactionId"] == append_result_transaction_id + assert receipt["receipt"] + + latest_entry = await client.get_current_ledger_entry() + # The transaction ids may not be equal in the unfortunate edge case where an internal + # operation occurs after the ledger append (e.g. because a node was restarted). Then, + # the latest id will be higher. + latest_entry_view = int(latest_entry["transactionId"].split(".")[0]) + latest_entry_seqno = int(latest_entry["transactionId"].split(".")[-1]) + append_result_view = int(append_result_transaction_id.split(".")[0]) + append_result_seqno = int(append_result_transaction_id.split(".")[-1]) + assert latest_entry_view >= append_result_view and latest_entry_seqno >= append_result_seqno + assert latest_entry["contents"] == entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = await client.begin_create_ledger_entry( + {"contents": "Test entry 2 from Python SDK"} + ) + await poller.wait() + + latest_entry = await client.get_current_ledger_entry() + assert latest_entry["transactionId"] != append_result_transaction_id + assert latest_entry["contents"] != entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = await client.begin_get_ledger_entry( + transaction_id=append_result_transaction_id + ) + original_entry = await poller.result() + assert original_entry["entry"]["transactionId"] == append_result_transaction_id + assert original_entry["entry"]["contents"] == entry_contents + assert original_entry["entry"]["collectionId"] == append_result_sub_ledger_id + + @ConfidentialLedgerPreparer() + async def test_append_entry_flow_with_collection_id_aad_user( + self, confidentialledger_endpoint, confidentialledger_id + ): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + try: + await self.append_entry_flow_with_collection_id_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_append_entry_flow_with_collection_id_cert_user( + self, confidentialledger_endpoint, confidentialledger_id + ): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + try: + await self.append_entry_flow_with_collection_id_actions(client) + finally: + await client.close() + + async def append_entry_flow_with_collection_id_actions(self, client): + collection_id = "132" + entry_contents = f"Test entry from Python SDK. Collection: {collection_id}" + append_result = await client.create_ledger_entry( + {"contents": entry_contents}, + collection_id=collection_id, + ) + assert append_result["transactionId"] + assert append_result["collectionId"] == collection_id + + append_result_sub_ledger_id = append_result["collectionId"] + append_result_transaction_id = append_result["transactionId"] + + poller = await client.begin_wait_for_commit( + transaction_id=append_result_transaction_id + ) + await poller.wait() + + transaction_status = await client.get_transaction_status( + transaction_id=append_result_transaction_id + ) + assert transaction_status + assert transaction_status["state"] == "Committed" + + poller = await client.begin_get_receipt( + transaction_id=append_result_transaction_id + ) + receipt = await poller.result() + assert receipt["transactionId"] == append_result_transaction_id + assert receipt["receipt"] + + latest_entry = await client.get_current_ledger_entry( + collection_id=collection_id + ) + # The transaction ids may not be equal in the unfortunate edge case where an internal + # operation occurs after the ledger append (e.g. because a node was restarted). Then, + # the latest id will be higher. + latest_entry_view = int(latest_entry["transactionId"].split(".")[0]) + latest_entry_seqno = int(latest_entry["transactionId"].split(".")[-1]) + append_result_view = int(append_result_transaction_id.split(".")[0]) + append_result_seqno = int(append_result_transaction_id.split(".")[-1]) + assert latest_entry_view >= append_result_view and latest_entry_seqno >= append_result_seqno + assert latest_entry["contents"] == entry_contents + assert latest_entry["collectionId"] == append_result_sub_ledger_id + + poller = await client.begin_create_ledger_entry( + {"contents": f"Test entry 2 from Python SDK. Collection: {collection_id}"}, + collection_id=collection_id, + ) + await poller.wait() + + latest_entry = await client.get_current_ledger_entry( + collection_id=collection_id + ) + assert latest_entry["transactionId"] != append_result_transaction_id + assert latest_entry["contents"] != entry_contents + assert latest_entry["collectionId"] == collection_id + + poller = await client.begin_get_ledger_entry( + transaction_id=append_result_transaction_id, + collection_id=collection_id, + ) + original_entry = await poller.result() + assert original_entry["entry"]["transactionId"] == append_result_transaction_id + assert original_entry["entry"]["contents"] == entry_contents + assert original_entry["entry"]["collectionId"] == append_result_sub_ledger_id + + collections = client.list_collections() + collection_ids = set() + async for collection in collections: + collection_ids.add(collection["collectionId"]) + assert collection_id in collection_ids + + @ConfidentialLedgerPreparer() + async def test_range_query_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + try: + await self.range_query_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_range_query_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + try: + await self.range_query_actions(client) + finally: + await client.close() + + async def range_query_actions(self, client): + num_collections = 5 + + # Send 2 messages per collection. No need to test pagination over many pages because: + # 1. Each page is 1000 entries, so we'd have to send 1001 * num_collections messages and + # and read them all; not ideal! + # 2. The pagination _should_ be tested often enough because the first response is typically + # not ready, with a nextLink pointing at the original query and an empty list of entires, + # as the historical query is just starting. + num_messages_sent = num_collections * 2 + + messages = {m: [] for m in range(num_collections)} + for i in range(num_messages_sent): + message = "message-{0}".format(i) + kwargs = ( + {} if num_collections == 0 else {"collection_id": "{0}".format(i % num_collections)} + ) + + if i != num_messages_sent - 1: + append_result = await client.create_ledger_entry( + {"contents": message}, **kwargs + ) + else: + append_poller = await client.begin_create_ledger_entry( + {"contents": message}, + **kwargs + ) + append_result = await append_poller.result() + + messages[i % num_collections].append( + (append_result["transactionId"], message, kwargs) + ) + + num_matched = 0 + for i in range(num_collections): + query_result = client.list_ledger_entries( + from_transaction_id=messages[i][0][0], + to_transaction_id=messages[i][-1][0], + **messages[i][0][2], + ) + index = 0 + async for historical_entry in query_result: + assert historical_entry["transactionId"] == messages[i][index][0] + assert historical_entry["contents"] == messages[i][index][1] + collection_id = messages[i][index][2].get("collection_id", None) + if collection_id is not None: + assert historical_entry["collectionId"] == collection_id + + index += 1 + num_matched += 1 + + assert num_matched == num_messages_sent + + @ConfidentialLedgerPreparer() + async def test_user_management_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + try: + await self.user_management_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_user_management_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + try: + await self.user_management_actions(client) + finally: + await client.close() + + async def user_management_actions(self, client): + aad_user_id = "0" * 36 # AAD Object Ids have length 36 + cert_user_id = ( + "7F:75:58:60:70:A8:B6:15:A2:CD:24:55:25:B9:64:49:F8:BF:F0:E3:4D:92:EA:B2:8C:30:E6:2D:F4" + ":77:30:1F" + ) + for user_id in [aad_user_id, cert_user_id]: + user = await client.create_or_update_user( + user_id, {"assignedRole": "Contributor"} + ) + assert user["userId"] == user_id + assert user["assignedRole"] == "Contributor" + + await asyncio.sleep(3) # Let the PATCH user operation be committed, just in case. + + user = await client.get_user(user_id) + assert user["userId"] == user_id + assert user["assignedRole"] == "Contributor" + + user = await client.create_or_update_user( + user_id, {"assignedRole": "Reader"} + ) + assert user["userId"] == user_id + assert user["assignedRole"] == "Reader" + + await asyncio.sleep(3) # Let the PATCH user operation be committed, just in case. + + user = await client.get_user(user_id) + assert user["userId"] == user_id + assert user["assignedRole"] == "Reader" + + await client.delete_user(user_id) + + @ConfidentialLedgerPreparer() + async def test_verification_methods_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True + ) + try: + await self.verification_methods_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_verification_methods_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False + ) + try: + await self.verification_methods_actions(client) + finally: + await client.close() + + async def verification_methods_actions(self, client): + consortium = client.list_consortium_members() + consortium_size = 0 + async for member in consortium: + assert member["certificate"] + assert member["id"] + consortium_size += 1 + assert consortium_size == 1 + + constitution = await client.get_constitution() + assert constitution["script"] + assert constitution["digest"] + assert ( + constitution["digest"].lower() == + hashlib.sha256(constitution["script"].encode()).hexdigest().lower() + ) + + ledger_enclaves = await client.get_enclave_quotes() + assert len(ledger_enclaves["enclaveQuotes"]) == 3 + assert ledger_enclaves["currentNodeId"] in ledger_enclaves["enclaveQuotes"] + for node_id, quote in ledger_enclaves["enclaveQuotes"].items(): + assert node_id == quote["nodeId"] + assert quote["nodeId"] + assert quote["mrenclave"] + assert quote["raw"] + assert quote["quoteVersion"] + + @ConfidentialLedgerPreparer() + async def test_tls_cert_convenience_aad_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=True, fetch_tls_cert=False, + ) + try: + await self.tls_cert_convenience_actions(client) + finally: + await client.close() + + @ConfidentialLedgerPreparer() + async def test_tls_cert_convenience_cert_user(self, confidentialledger_endpoint, confidentialledger_id): + client = await self.create_confidentialledger_client( + confidentialledger_endpoint, confidentialledger_id, is_aad=False, fetch_tls_cert=False, + ) + try: + await self.tls_cert_convenience_actions(client) + finally: + await client.close() + + async def tls_cert_convenience_actions(self, client): + # It's sufficient to use any arbitrary endpoint to test the TLS connection. + constitution = await client.get_constitution() + assert constitution["script"] diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate.py deleted file mode 100644 index cd3258ff4082..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate.py +++ /dev/null @@ -1,19 +0,0 @@ -from azure.confidentialledger import ( - ConfidentialLedgerClient, - ConfidentialLedgerCertificateCredential, -) - -from _shared.client_test_common import ConfidentialLedgerClientTestMixin - - -class CertificateCredentialClientTest(ConfidentialLedgerClientTestMixin.BaseTest): - def setUp(self): - super(CertificateCredentialClientTest, self).setUp() - self.client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=ConfidentialLedgerCertificateCredential( - self.user_certificate_path - ), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate_async.py deleted file mode 100644 index 80dd5d3e771c..000000000000 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_confidential_ledger_client_certificate_async.py +++ /dev/null @@ -1,21 +0,0 @@ -from azure.confidentialledger import ( - ConfidentialLedgerCertificateCredential, -) -from azure.confidentialledger.aio import ConfidentialLedgerClient - -from _shared.client_test_common_async import AsyncConfidentialLedgerClientTestMixin - - -class AsyncCertificateCredentialClientTest( - AsyncConfidentialLedgerClientTestMixin.AsyncBaseTest -): - def setUp(self): - super(AsyncCertificateCredentialClientTest, self).setUp() - self.client = self.create_client_from_credential( - ConfidentialLedgerClient, - credential=ConfidentialLedgerCertificateCredential( - self.user_certificate_path - ), - ledger_certificate_path=self.network_certificate_path, - endpoint=self.confidential_ledger_url, - ) diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client.py index 16de7e600493..d8d5a2e16433 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client.py @@ -1,38 +1,25 @@ -import sys +from devtools_testutils import AzureTestCase -from azure.confidentialledger.identity_service import ( - ConfidentialLedgerIdentityServiceClient, - LedgerIdentity, +from azure.confidentialledger.certificate import ( + ConfidentialLedgerCertificateClient, ) -from _shared.constants import NETWORK_CERTIFICATE -from _shared.testcase import ConfidentialLedgerTestCase +from _shared.testcase import ConfidentialLedgerPreparer -LEDGER_ID = "fake-ledger-id" - -class ConfidentialLedgerIdentityServiceClientTest(ConfidentialLedgerTestCase): - def setUp(self): - super(ConfidentialLedgerIdentityServiceClientTest, self).setUp() - - self.ledger_id = self.set_value_to_scrub("CONFIDENTIAL_LEDGER_ID", LEDGER_ID) - - def test_get_ledger_identity(self): +class ConfidentialLedgerCertificateClientTest(AzureTestCase): + @ConfidentialLedgerPreparer() + def test_get_ledger_identity(self, confidentialledger_id): client = self.create_client_from_credential( - ConfidentialLedgerIdentityServiceClient, + ConfidentialLedgerCertificateClient, credential=None, - identity_service_url="https://eastus.identity.confidential-ledger.core.azure.com", ) - network_identity = client.get_ledger_identity( - ledger_id=self.ledger_id - ) # type: LedgerIdentity - - self.assertEqual(network_identity.ledger_id, self.ledger_id) - - cert_recv = network_identity.ledger_tls_certificate - # Ledger certificate comes back as unicode in Python 2.7. - if sys.version_info < (3, 0): - cert_recv = cert_recv.strip("\n\x00").encode("ascii") + network_identity = ( + client.get_ledger_identity( + ledger_id=confidentialledger_id + ) + ) - self.assertEqual(cert_recv, NETWORK_CERTIFICATE) + assert network_identity["ledgerId"] == confidentialledger_id + assert network_identity["ledgerTlsCertificate"] diff --git a/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client_async.py b/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client_async.py index 50cc06c91450..bd440a99292c 100644 --- a/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client_async.py +++ b/sdk/confidentialledger/azure-confidentialledger/tests/test_identity_service_client_async.py @@ -1,37 +1,28 @@ from devtools_testutils import AzureTestCase -from azure.confidentialledger.identity_service import LedgerIdentity -from azure.confidentialledger.identity_service.aio import ( - ConfidentialLedgerIdentityServiceClient, +from azure.confidentialledger.certificate.aio import ( + ConfidentialLedgerCertificateClient, ) -from _shared.constants import NETWORK_CERTIFICATE -from _shared.testcase_async import AsyncConfidentialLedgerTestCase +from _shared.testcase import ConfidentialLedgerPreparer -LEDGER_ID = "fake-ledger-id" - -class ConfidentialLedgerIdentityServiceClientTest(AsyncConfidentialLedgerTestCase): - def setUp(self): - super(ConfidentialLedgerIdentityServiceClientTest, self).setUp() - - self.ledger_id = self.set_value_to_scrub("CONFIDENTIAL_LEDGER_ID", LEDGER_ID) - - @AzureTestCase.await_prepared_test - async def test_get_ledger_identity(self): +class ConfidentialLedgerCertificateClientTest(AzureTestCase): + @ConfidentialLedgerPreparer() + async def test_get_ledger_identity(self, confidentialledger_id): client = self.create_client_from_credential( - ConfidentialLedgerIdentityServiceClient, + ConfidentialLedgerCertificateClient, credential=None, - identity_service_url="https://eastus.identity.confidential-ledger.core.azure.com", - ) - - network_identity = await client.get_ledger_identity( - ledger_id=self.ledger_id - ) # type: LedgerIdentity - self.assertEqual(network_identity.ledger_id, self.ledger_id) - self.assertEqual( - network_identity.ledger_tls_certificate, - NETWORK_CERTIFICATE, ) - await client.close() + try: + network_identity = ( + await client.get_ledger_identity( + ledger_id=confidentialledger_id + ) + ) + + assert network_identity["ledgerId"] == confidentialledger_id + assert network_identity["ledgerTlsCertificate"] + finally: + await client.close() diff --git a/sdk/confidentialledger/test-resources.bicep b/sdk/confidentialledger/test-resources.bicep index d940ddd2b526..136b34f7f5d7 100644 --- a/sdk/confidentialledger/test-resources.bicep +++ b/sdk/confidentialledger/test-resources.bicep @@ -1,13 +1,18 @@ @description('Ledger Name') @minLength(3) @maxLength(24) -param ledgerName string = resourceGroup().name +param ledgerName string = 'pysdkci-${uniqueString(resourceGroup().id)}' +// resourceGroup().name is too long +// uniqueString is 13 characters long +// https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-string#uniquestring +// Prepend a string to easy identification + ledger name must start with a letter. @description('The client OID to grant access to test resources.') param testApplicationOid string -@description('The location of the resource. By default, this is the same as the resource group.') -param location string = resourceGroup().location +@description('The location of the resource. Currently, not all regions are supported.') +param location string = 'eastus' +// Explicitly set a region due to regional restrictions e.g. ACL is not currently available in westus var azureConfidentialLedgerUrl = 'https://${ledgerName}.confidential-ledger.azure.com' @@ -26,3 +31,4 @@ resource ledgerName_resource 'Microsoft.ConfidentialLedger/ledgers@2022-05-13' = } output CONFIDENTIALLEDGER_ENDPOINT string = azureConfidentialLedgerUrl +output CONFIDENTIALLEDGER_ID string = ledgerName diff --git a/sdk/confidentialledger/tests.yml b/sdk/confidentialledger/tests.yml index 675009dd888c..c7ec10fb4a4b 100644 --- a/sdk/confidentialledger/tests.yml +++ b/sdk/confidentialledger/tests.yml @@ -9,5 +9,9 @@ stages: - TestSamples=.*/true MaxParallel: 1 EnvVars: + AZURE_SUBSCRIPTION_ID: $(provisioner-subscription) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script \ No newline at end of file diff --git a/shared_requirements.txt b/shared_requirements.txt index 7f0d2716d75f..27bdba7945bb 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -381,6 +381,8 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-mgmt-nginx azure-mgmt-core>=1.3.0,<2.0.0 #override azure-mgmt-netapp azure-mgmt-core>=1.3.0,<2.0.0 #override azure-mgmt-consumption azure-mgmt-core>=1.3.1,<2.0.0 +#override azure-confidentialledger azure-core<2.0.0,>=1.24.0 +#override azure-confidentialledger isodate<1.0.0,>=0.6.1 #override azure-mgmt-extendedlocation msrest>=0.6.21 #override azure-mgmt-extendedlocation azure-mgmt-core>=1.3.1,<2.0.0 #override azure-mgmt-education msrest>=0.6.21