Cosmian Enclave Lib SGX
Overview
Cosmian Enclave 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 AE
- 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
cenclave-bootstrapas an argument - the decryption key of the code
- Optionally the private key corresponding to the certificate provided to
cenclave-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 cenclave-lib-sgx
Usage
$ cenclave-bootstrap --help
usage: cenclave-bootstrap [-h] [--host HOST] [--client-certificate CLIENT_CERTIFICATE] [--port PORT]
[--subject SUBJECT] [--san SAN] --app-dir APP_DIR --id ID [--timeout TIMEOUT]
[--version] [--debug]
(--ratls EXPIRATION_DATE | --no-ssl | --certificate CERTIFICATE_PATH)
application
Bootstrap ASGI/WSGI Python web application for Gramine
positional arguments:
application ASGI application path (as module:app)
options:
-h, --help show this help message and exit
--host HOST hostname of the server
--client-certificate CLIENT_CERTIFICATE
For client certificate authentication (PEM encoded)
--port PORT port of the server
--subject SUBJECT Subject as RFC 4514 string for the RA-TLS certificate
--san SAN Subject Alternative Name in the RA-TLS certificate
--app-dir APP_DIR path of the python web application
--id ID identifier of the application as UUID in RFC 4122
--timeout TIMEOUT seconds before closing the configuration server
--version show program's version number and exit
--debug debug mode with more logging
--ratls EXPIRATION_DATE
generate a self-signed certificate for RA-TLS with a specific expiration date (Unix time)
--no-ssl use HTTP without SSL
--certificate CERTIFICATE_PATH
custom certificate used for the SSL connection, private key must be sent through the
configuration server
Metadata
Release files for cenclave-lib-sgx 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cenclave_lib_sgx-1.1.1.tar.gz | 15.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cenclave_lib_sgx-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.2 kB
Release files / cenclave_lib_sgx-1.1.1.tar.gz
| Download URL | cenclave_lib_sgx-1.1.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71c265081df33868fa6518f6e1ae29d04657c568568dac35f05807cd5fe647f9
|
|
BLAKE2b-256 checksum How to use checksums |
de4a3cf080feeccaabce8799765f5d05371470f37ad786904f9fb3982cc24ae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / cenclave_lib_sgx-1.1.1-py3-none-any.whl
| Download URL | cenclave_lib_sgx-1.1.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50376ef8499f9c3e44f4dda0171a856f3cca117e25e493098b539218d64da635
|
|
BLAKE2b-256 checksum How to use checksums |
fcda8bb4ba611d8d6739c51b34740cd59f5f906a69214693ae7df306bb59003d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for cenclave-lib-sgx 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.