Microsoft Corporation Azure Confidential Ledger Certificate Client Library for Python
Project description
Azure Confidential Ledger Certificate client library for Python
The Confidential Ledger Certificate client library is used to retrieve the TLS certificate required for connecting to a Confidential Ledger.
Getting started
Install the package
python -m pip install azure-confidentialledger-certificate
Prerequisites
- Python 3.9 or later is required to use this package.
- You need an Azure subscription to use this package.
- An existing Confidential Ledger instance.
Key concepts
Clients may authenticate with a client certificate in mutual TLS instead of via an Azure Active Directory token. Use the get_ledger_identity() method on the ConfidentialLedgerCertificateClient to retrieve the certificate.
Examples
Get a ledger certificate for authentication using the ConfidentialLedgerCertificateClient from the azure-confidentialledger-certificate package, save the certificate, pass the certificate path to the ConfidentialLedgerCertificateCredential from the azure-confidentialledger package, and pass the credential to the ConfidentialLedgerClient for authentication:
from azure.confidentialledger.certificate import ConfidentialLedgerCertificateClient
from azure.confidentialledger import (
ConfidentialLedgerCertificateCredential,
ConfidentialLedgerClient,
)
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 = ConfidentialLedgerCertificateCredential(
certificate_path="Path to user certificate PEM file"
)
ledger_client = ConfidentialLedgerClient(
endpoint="https://my-ledger-id.confidential-ledger.azure.com",
credential=credential,
ledger_certificate_path=ledger_tls_cert_file_name
)
Troubleshooting
Confidential Ledger clients raise exceptions defined in azure-core.
Next steps
Use the certificate retrieved using this library with the azure-confidentialledger package. The Azure Confidential Ledger client library has several code samples that show common scenario operations.
Additional Documentation
For more extensive documentation on Azure Confidential Ledger, see the API reference documentation. You may also read more about Microsoft Research's open-source Confidential Consortium Framework.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Release History
1.0.0b1 (2025-10-13)
Other Changes
- Initial version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azure_confidentialledger_certificate-1.0.0b1.tar.gz.
File metadata
- Download URL: azure_confidentialledger_certificate-1.0.0b1.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32aa0e85f9b3195367d437e63296b3b010d7a3dbf31e382a1dfa35b4d9d0c38d
|
|
| MD5 |
8347f79738fffd457de13b818403b484
|
|
| BLAKE2b-256 |
46b06d64d55dd93ac33fb131b5e626ca7069a15fbfbc212855ead6ef90ea8ddd
|
File details
Details for the file azure_confidentialledger_certificate-1.0.0b1-py3-none-any.whl.
File metadata
- Download URL: azure_confidentialledger_certificate-1.0.0b1-py3-none-any.whl
- Upload date:
- Size: 51.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
106439967a412e31aaf3beaeb865ee64463f2e4d6f213bea5489964dc1fe6366
|
|
| MD5 |
c26d4eb7714721c3ab07288d19ece96f
|
|
| BLAKE2b-256 |
74c039b1e509128bdf47813090a5106e279143e23ff1e7077c6aebbfe843c0ba
|