Library for Cosmian MSE to bootstrap Flask application
Project description
MicroService Encryption Lib SGX
Overview
MSE lib SGX bootstraps the execution of an encrypted ASGI/WSGI Python web application for Gramine.
The library is responsible for:
- Configuring the SSL certificates with either:
- RA-TLS, a self-signed certificate including the Intel SGX quote in an X.509 v3 extension
- Custom, the private key and full keychain is provided by the application owner
- No SSL, the secure channel may be managed elsewhere by an SSL proxy
- Decrypting Python modules encrypted with XSala20-Poly1305 AEAD
- Running the ASGI/WSGI Python web application with hypercorn
Technical details
The flow to run an encrypted Python web application is the following:
- A first self-signed HTTPS server using RA-TLS is launched waiting to receive a JSON payload with:
- UUID, a unique application identifier provided to
mse-bootstrap
as an argument - the decryption key of the code
- Optionally the private key corresponding to the certificate provided to
mse-bootstrap
(for Custom certificate)
- UUID, a unique application identifier provided to
- If the UUID and decryption key are the expected one, the configuration server is stopped, the code is decrypted and finally run as a new server
Installation
$ pip install mse-lib-sgx
Usage
$ mse-bootstrap --help
usage: mse-bootstrap [-h] --host HOST --port PORT --app-dir APP_DIR --uuid UUID [--version]
[--debug]
(--self-signed EXPIRATION_DATE | --no-ssl | --certificate CERTIFICATE_PATH)
application
Bootstrap ASGI/WSGI Python web application for Gramine
positional arguments:
application Application to dispatch to as path.to.module:instance.path
optional arguments:
-h, --help show this help message and exit
--host HOST Hostname of the configuration serverIf `--self-signed`, it's also the
hostname of the app server
--port PORT Port of the server
--app-dir APP_DIR Path the microservice application. Read only directory.
--uuid UUID Unique application UUID.
--version show program's version number and exit
--debug Debug mode without SGX
--self-signed EXPIRATION_DATE
Generate a self-signed certificate for the app. Specify the expiration
date of the certificate as a timestamp since Epoch
--no-ssl Don't use HTTPS connection
--certificate CERTIFICATE_PATH
Use the given certificate for the SSL connection. the private key will
be sent using the configuration server
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
mse_lib_sgx-1.1.tar.gz
(11.6 kB
view details)
Built Distribution
mse_lib_sgx-1.1-py3-none-any.whl
(11.6 kB
view details)
File details
Details for the file mse_lib_sgx-1.1.tar.gz
.
File metadata
- Download URL: mse_lib_sgx-1.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96d7eb62bfd25464440f4f92882e501fdff8ff1413946bd32d9be3ae4eec5298 |
|
MD5 | efde326c51f2614d3671f821286659bf |
|
BLAKE2b-256 | cdce6811382ab50f1dead7743f7b8a2aaafcdf9bf27d344ab8eab91a4b898db5 |
File details
Details for the file mse_lib_sgx-1.1-py3-none-any.whl
.
File metadata
- Download URL: mse_lib_sgx-1.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396fd74ea5c7e9aac1c7bfd31541664e5155309e1e1b399a73e638aad8daacbb |
|
MD5 | 14b332f16121bbd37af2a174aa00a0ce |
|
BLAKE2b-256 | f26f229a95a2b7a341c2f81e7f5939a1f8b85a41d4fd7634fc61840a225f2aaa |