🎉 Initial Release of Fjall-SGX
Fjall-SGX is an encrypted LSM-tree key-value store designed to run inside Intel SGX enclaves. This initial release provides a functional database with HTTP REST API interface, suitable for development and testing in SGX simulation mode.
🚀 Features
Core Database Engine
- LSM-Tree Architecture: Log-Structured Merge-tree with in-memory MemTable and persistent SSTables
- SGX Enclave Protection: All sensitive data operations occur within the SGX trusted execution environment
- Encryption at Rest: Data is encrypted before leaving the enclave boundary (prepared for future hardware mode)
- Memory Management: Configurable MemTable size with automatic flushing to SSTables
- Storage Abstraction: Pluggable storage backends via trait-based design
HTTP REST API Server
- Simple HTTP Interface: Built with
tiny_httpfor minimal dependencies - RESTful Endpoints:
PUT /kv/<key>- Store key-value pairsGET /kv/<key>- Retrieve values by keyDELETE /kv/<key>- Delete key-value pairsGET /health- Health check endpoint
- JSON Error Responses: Structured error messages for better debugging
- Logging: Comprehensive logging with
env_logger(RUST_LOG support)
SGX Integration
- Simulation Mode Support: Works in SGX_MODE=SW for development without hardware
- Conditional Compilation: Feature flags for SW vs HW mode
- Untrusted File I/O: Direct filesystem access from enclave using
std::untrusted::fs - Enclave Configuration:
- 128MB heap size for database operations
- 8MB stack size
- 10 TCS threads for concurrent operations
Developer Experience
- Docker Support: Pre-built Docker images for easy deployment
- Comprehensive Documentation: README, API docs, and architecture guides
- Test Scripts: Automated testing with
test_api.sh - Makefile Build System: Simple
makecommand to build entire project
📦 Docker Release
Pre-built Docker images are now available on Docker Hub:
docker pull felixfaisal/fjall-sgx:latest
docker run -p 8080:8080 -ti felixfaisal/fjall-sgx:latestImage Details:
- Base: Ubuntu 20.04
- SGX SDK: v2.17.1
- Rust: nightly-2023-11-17
- Size: ~4GB (includes full SGX development environment)
- Mode: Software simulation (SGX_MODE=SW)
The Docker image automatically:
- Starts the AESM service
- Builds the project from source
- Launches the HTTP server on port 8080
🙏 Acknowledgments
- Inspired by Fjall
- Built on Apache Teaclave SGX SDK
- Uses Intel SGX SDK v2.17