Native unixsock/tcp tunnel between client and platform #266
Labels
No labels
Compat/Breaking
Component/Enclave-Builder
Component/Infrastructure
Deploy/BYOC
Deploy/Full-managed
Deploy/Self-hosted
Interface/API
Interface/CLI
Interface/Git
Interface/Web
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
public/platform#266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We effectively need:
server( proxy:8080 <-vsock-> enclave(app:unix.sock) <-tcp:8080-> client( tcp -> app:unix.sock)
Also caution CLI should be able to run as a daemon on the client side, and perform health checks based on connectivity to the remote socket or tcp connection it is forwarding. Should function very much like tcp+socket forwarding in ssh.
Then a user can run mysql, nginx, postgres etc in an enclave with a minimal library kernel, no idea what a network stack is, that just listens on a unix socket, and users can plumb that socket securely with end to end encryption to k8s or anywhere else they need comms to that enclave daemon.
IMO this unlocks a ton of use cases, and lets us eliminate a lot of attack surface in the process, as exposing tcp ports to the outside world is the wrong call for most internal use services. Unix sockets tunneled point to point between secure environments without having to care about firewalls, however, is super useful.
Prior art reference: https://github.com/tkhq/qos/blob/main/src/qos_enclave/src/main.rs
Yes, 100% needed. Should it leverage Steve? The steve-sdk rust client could be embedded in the caution verify CLI I guess.
However today steve is request/response based, it doesn't fit a raw unix/tcp byte stream (postgres/mysql are stateful), so a streaming data plane is required before this works
or vsock, and it leverages existing port binding mechanisms.
I need a proper network flow diagram to understand how this works. Random arrows pointing in various directions is insufficient and does not reveal what's not provided by vsock and socat.