Skip to content

docs: add TEE analysis for issue #168#169

Open
forkline-bot[bot] wants to merge 4 commits intomasterfrom
docs/168-tee-analysis
Open

docs: add TEE analysis for issue #168#169
forkline-bot[bot] wants to merge 4 commits intomasterfrom
docs/168-tee-analysis

Conversation

@forkline-bot
Copy link

@forkline-bot forkline-bot bot commented Mar 6, 2026

Summary

  • Comprehensive analysis of TEE solutions for securing Passless authenticator
  • Evaluates Enarx, Gramine, Occlum, Confidential Containers, and Intel SGX SDK
  • Recommends Gramine with Intel SGX as primary solution

Recommendations

  1. Primary: Gramine with Intel SGX - Production-ready, runs unmodified binaries, minimal user experience impact
  2. Keep TPM 2.0 Backend - Hardware binding without requiring TEE-capable hardware
  3. Future: AMD SEV - For cloud deployment scenarios

Key Findings

Solution Feasibility Status
Gramine HIGH Active, release June 2025
Occlum MEDIUM Active, Rust-based LibOS
Enarx LOW No releases since 2023, requires WASM
Confidential Containers LOW Kubernetes-focused, overkill for single-node
Intel SGX SDK LOW Requires significant code refactoring

Resolves: #168

Analyze TEE solutions (Enarx, Gramine, Occlum, Confidential Containers)
for securing Passless authenticator. Recommend Gramine with Intel SGX
as primary solution for users with compatible hardware.
@forkline-bot forkline-bot bot mentioned this pull request Mar 6, 2026
@forkline-bot
Copy link
Author

forkline-bot bot commented Mar 6, 2026

CI Fix Applied

I've pushed a fix for the CI failure. The changes should trigger a new CI run.

Commit:

Waiting for CI to re-run...

@forkline-bot forkline-bot bot force-pushed the docs/168-tee-analysis branch from 58d89c7 to f677d49 Compare March 6, 2026 10:04
@forkline-bot
Copy link
Author

forkline-bot bot commented Mar 6, 2026

CI Fix Applied

I've pushed a fix for the CI failure. The changes should trigger a new CI run.

Commit:

Waiting for CI to re-run...

@pando85
Copy link
Owner

pando85 commented Mar 6, 2026

@forkline do a complete implementation using gramine

@forkline-bot
Copy link
Author

forkline-bot bot commented Mar 6, 2026

CI Fix Applied

I've pushed a fix for the CI failure. The changes should trigger a new CI run.

Commit:

Waiting for CI to re-run...

@pando85
Copy link
Owner

pando85 commented Mar 6, 2026

@forkline do a complete implementation using gramine

- Add gramine directory with manifest templates for SGX execution
- Create passless-tee crate for TEE hardware detection (Intel SGX, AMD SEV)
- Add build scripts for Gramine manifest generation and signing
- Create Dockerfile for Gramine Shielded Containers (GSC)
- Add comprehensive documentation in docs/GRAMINE_INTEGRATION.md
- Add systemd service file for running Passless in SGX enclave
- Update Makefile with gramine-build, gramine-run, gramine-run-sealed targets
- Add installation scripts for Gramine support
- Update README with Gramine/SGX feature information

Resolves: #168
Copy link
Author

@forkline-bot forkline-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

I've implemented complete Gramine/Intel SGX support for Passless. Here's what was added:

Core Components

1. Gramine Manifests (gramine/)

  • passless.manifest.template - Standard storage manifest
  • passless-sealed.manifest.template - SGX sealed storage manifest (hardware-bound credentials)
  • build.sh - Automated build script for manifest generation and signing
  • run.sh - Convenience script for running Passless in SGX
  • Dockerfile - For Gramine Shielded Containers
  • gsc.toml - GSC configuration

2. TEE Detection Crate (passless-tee/)

  • Hardware detection for Intel SGX and AMD SEV
  • CPU flag checking
  • EPC size detection
  • Evironment detection for Gramine/SGX

3. Documentation (docs/GRAMINE_INTEGRATION.md)

  • Comprehensive setup guide
  • Hardware requirements
  • Installation instructions
  • Troubleshooting
  • Docker/GSC deployment

4. System Integration

  • contrib/systemd/passless-sgx.service - Systemd service
  • contrib/scripts/install-gramine.sh - Installation script
  • Updated Makefile with targets: gramine-build, gramine-run, gramine-run-sealed

Usage

# Build Gramine manifest
make gramine-build

# Run in SGX enclave (standard storage)
make gramine-run

# Run in SGX enclave (sealed storage - hardware-bound)
make gramine-run-sealed

Security Benefits

  • Memory Encryption: All enclave memory encrypted by CPU
  • Hardware Isolation: Code/data isolated from host OS
  • Sealed Storage: Optional hardware-bound credential storage
  • Kernel Compromise Protection: SGX isolation protects even from root/kernel

@pando85
Copy link
Owner

pando85 commented Mar 6, 2026

@forkline change commit lint to accept best practice commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TEEs

1 participant