772df1613b
* Refactor library * Make sure it works with Python3 * Update readme & fix tests * Fix travis * Review updates v1 * Add requirements-dev * Create constructor methods |
||
---|---|---|
azure_encryption_helper | ||
images | ||
samples | ||
scripts | ||
tests | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.py | ||
tox.ini |
README.md
Custom Data Encryption
Azure Custom Data Encryption Library provides a light weight SDK for securing your encryption keys with asymetrical RSA keys.
Installation
pip install git+https://github.com/microsoft/custom-azure-data-encryption.git
High Level Overview
Encryption
Decryption
This encryption library seemlessly ties into Azure Key Vault for easy use!
Quick Start
You can look at demo.py for the reference on how to use this library.
Tests
To run tests:
pip install .
pip install -r requirements.txt
pytest
Samples
Prerequisites
python 2.7 or 3.6+
virtualenv
for managing python packages between projects.
Run Samples
-
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
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.