Azure Custom Data Encryption Library provides a light weight SDK for securing your encryption keys with asymetrical RSA keys.
pip install git+https://github.com/microsoft/custom-azure-data-encryption.git
This encryption library seemlessly ties into Azure Key Vault for easy use!
You can look at demo.py for the reference on how to use this library.
To run tests:
pip install .
pip install -r requirements.txt
pytest
python 2.7 or 3.6+
virtualenv
for managing python packages between projects.
-
Clone Repository
-
Create virtual environment using python 2.7 interpreter
virtualenv --python=/usr/bin/python2.7 sample_virtual_env
-
Install Dependencies
pip install .
-
Log in and use the Azure CLI
az login To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <Your Code> to authenticate.
-
Set the subscription you would like to provision the resources on
az account set -s <Your Subscrition Name or Id>
-
Provision a
Service Principal
andKey Vault
by runningdeploy.sh
- Run
export
commands printed by the script when finished.
bash scripts/deploy.sh Enter resource group name: sample-rg Enter key vault name: sample-kv Enter location (westus, westus2, eastus, ...): westus ... export AZURE_TENANT_ID=<guid> export AZURE_CLIENT_ID=<guid> export AZURE_CLIENT_SECRET=<guid> export VAULT_URI=<key_vault_uri> export KEY_NAME=sample-key export KEY_VERSION=<key_version>
- Run
-
Run Sample from root directory
python samples/demo.py
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 [email protected] with any additional questions or comments.