-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
wasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime
Description
Feature
Implement WASI TLS Phase 2 following the simplified security-focused wit proposal from WebAssembly/wasi-tls#13
Benefit
Phase 1 is unstable and only supports client-side TLS. This blocks WASI components from:
- Accepting incoming TLS connections (servers, proxies)
- Accessing connection metadata (cipher suite, peer certificates)
- Following modern async patterns aligned with Preview 2/3
Phase 2 adds server-side support with a simplified, security-first API that:
- Focuses on TLS 1.3 (modern security, 75%+ adoption)
- Removes problematic features (0-RTT replay attacks, suspension points)
- Uses linear async flow that naturally evolves to Preview 3's
async/await - Reduces API surface by ~40% while adding critical functionality
Implementation
Replace current Phase 1 WIT with Phase 2 proposal from WebAssembly/wasi-tls#13
Key additions:
Serverresource with identity/ALPN/client-auth configurationConnectionresource with cipher-suite, peer-certificate, close methodsaccept()for server-side handshakes- Async pattern:
finish()+subscribe()(Preview 2) ->async finish()(Preview 3) - Unified rustls/native-tls provider architecture with client/server separation
Security benefits:
- No suspension points = no deadlock/state machine complexity
- TLS 1.3 focus = modern ciphers, forward secrecy
- Linear flow = easier auditing, fewer vulnerabilities
Alternatives
Nonexistent
Metadata
Metadata
Assignees
Labels
wasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime