Comments (6)
The issue seems to be that the socket is not accessible from within the enclave, even though I included sgx.allowed_files.socket = file:socket
in the manifest. If I create the socket in the enclave before connecting to it, it works without problems.
from graphene.
Hi, sorry for the late response.
The design of Graphene library OS makes it impossible to connect an application with UNIX socket created on the host. A Graphene instance acts like a guest OS, so no OS states are shared between Graphene and the host OS except external resources like files and sockets. If you need to connect the guest with the host, I suggest you use a loopback socket (bound on localhost).
Hope this helps!
from graphene.
The design of Graphene library OS makes it impossible to connect an application with UNIX socket created on the host. A Graphene instance acts like a guest OS, so no OS states are shared between Graphene and the host OS except external resources like files and sockets.
I don't see how Unix domain sockets are different in this aspect from files and sockets. I think you could share them with the host OS the same way like other files and sockets.
I'm currently using a "normal" socket as a workaround, so this doesn't have high priority for me, but maybe I will look into this at some point and prepare a patch.
from graphene.
Graphene is supposed to share OS states as little as possible with the host OS. Sharing one more abstraction means adding more routes for the untrusted OS to attack the applications in enclaves. For Linux applications, UNIX sockets are more treated as the in-kernel abstraction than an external resource like files or sockets. You can think of a guest OS as a container, which usually doesn't allow or recommend you to share UNIX sockets with the host OS.
from graphene.
I don't want to pull a lot of code into Graphene proper to special-case Unix sockets. But I think it would be acceptable on a Linux host to make a Unix socket look like an outward-facing pipe from Graphene's perspective. I would prefer to keep any changes in the manifest and PAL code (with some reasonable error handling for non-Unix systems).
from graphene.
@adombeck - would be happy to review a more concrete proposal (before you spend too much time coding something), or a pull request (obviously).
from graphene.
Related Issues (20)
- Data transmission error with Python gRPC running in graphene HOT 9
- Huge performance drop when running pytorch training with graphene-sgx HOT 26
- Graphene-SGX: Syscalls wakes up early/prematurely on Server Machines HOT 12
- untrusted PAL sent PAL event HOT 10
- BUG() triggered during vfork and clone HOT 15
- With Go program, inside a docker container, bind fails with permission denied error, invalid handle error. HOT 7
- Workloads (Redis, Curl, R) failing with Out of memory PAL error after new manifest syntax to define lists of SGX trusted files. HOT 7
- Unable to Sign the graphenized Docker image using gsc sign-image: HOT 5
- RFC: Trusted files metadata sideloading
- [Error:38]Function not implemented. multiprocessing in graphene HOT 7
- How to transmit variables between SGX and untrusted environments HOT 4
- Function not implemented (src/ip.cpp:563) in testing GSC container HOT 2
- [Examples] Python Example Stuck Without Any Error Message HOT 1
- ModuleNotFoundError: No module named 'graphenelibos' HOT 5
- web server use golang, QPS(queries per second) is very low HOT 4
- File Listener Based on INOTIFY Throws Error HOT 1
- Issue with libprotobuf version. HOT 1
- Issue in Cloud Deployment to AKS HOT 3
- Decimal type prone to float rounding error. HOT 1
- pytorch sample config for better performance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene.