Custom azure data encryption
Перейти к файлу
Kirill Logachev 772df1613b
Refactor the library (#5)
* Refactor library

* Make sure it works with Python3

* Update readme & fix tests

* Fix travis

* Review updates v1

* Add requirements-dev

* Create constructor methods
2019-03-26 11:11:25 -07:00
azure_encryption_helper Refactor the library (#5) 2019-03-26 11:11:25 -07:00
images migration to vsts 2018-07-03 15:02:30 -07:00
samples Refactor the library (#5) 2019-03-26 11:11:25 -07:00
scripts Refactor the library (#5) 2019-03-26 11:11:25 -07:00
tests Refactor the library (#5) 2019-03-26 11:11:25 -07:00
.gitignore add travis 2018-07-03 15:07:20 -07:00
.travis.yml Refactor the library (#5) 2019-03-26 11:11:25 -07:00
LICENSE Initial commit 2018-07-03 14:16:13 -07:00
README.md Refactor the library (#5) 2019-03-26 11:11:25 -07:00
requirements-dev.txt Refactor the library (#5) 2019-03-26 11:11:25 -07:00
requirements.txt Refactor the library (#5) 2019-03-26 11:11:25 -07:00
setup.py Refactor the library (#5) 2019-03-26 11:11:25 -07:00
tox.ini migration to vsts 2018-07-03 15:02:30 -07:00

README.md

Custom Data Encryption

Build Status

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

High Level Encryption

Decryption

High Level 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

  1. Clone Repository

  2. Create virtual environment using python 2.7 interpreter

    virtualenv --python=/usr/bin/python2.7 sample_virtual_env
    
  3. Install Dependencies

    pip install .
    
  4. 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.
    
  5. Set the subscription you would like to provision the resources on

    az account set -s <Your Subscrition Name or Id>
    
  6. Provision a Service Principal and Key Vault by running deploy.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>
    
  7. 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.