Files
graphene/Examples/nodejs-express-server/nodejs.manifest.template
Dmitrii Kuvaiskii 6c3f9913a2 [Examples] Fix up Node.js examples
Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
2021-02-17 05:15:26 -08:00

72 lines
2.8 KiB
Plaintext

# Node.js manifest file example
#
# This manifest was prepared and tested on Ubuntu 18.04. The tested version of Node.js was v13.14.0.
libos.entrypoint = "file:$(NODEJS_DIR)/nodejs"
# LibOS layer library of Graphene. There is currently only one implementation, so it is always set
# to libsysdb.so.
loader.preload = "file:$(GRAPHENEDIR)/Runtime/libsysdb.so"
# Graphene log level
loader.log_level = "$(GRAPHENE_LOG_LEVEL)"
# Read application arguments directly from the command line. Don't use this on production!
loader.insecure__use_cmdline_argv = 1
# Forward environment variables from the host. Don't use this on production!
loader.insecure__use_host_env = 1
# Node.js requires eventfd2() emulation otherwise fails on `(uv_loop_init(&tracing_loop_)) == (0)'
sys.insecure__allow_eventfd = 1
# Specify paths to search for libraries. The usual LD_LIBRARY_PATH syntax applies. Paths must be in-
# Graphene visible paths, not host-OS paths (i.e., paths must be taken from fs.mount.xxx.path, not
# fs.mount.xxx.uri).
loader.env.LD_LIBRARY_PATH = "/lib:$(ARCH_LIBDIR):/usr/$(ARCH_LIBDIR)"
# Allow for injecting SIGTERM signal from the host.
sys.enable_sigterm_injection = 1
# Mount host-OS directory to required libraries (in 'uri') into in-Graphene visible directory /lib
# (in 'path').
fs.mount.lib.type = "chroot"
fs.mount.lib.path = "/lib"
fs.mount.lib.uri = "file:$(GRAPHENEDIR)/Runtime"
fs.mount.lib2.type = "chroot"
fs.mount.lib2.path = "$(ARCH_LIBDIR)"
fs.mount.lib2.uri = "file:$(ARCH_LIBDIR)"
fs.mount.lib3.type = "chroot"
fs.mount.lib3.path = "/usr/$(ARCH_LIBDIR)"
fs.mount.lib3.uri = "file:/usr/$(ARCH_LIBDIR)"
# Set enclave size to 2GB. Recall that SGX v1 requires to specify enclave size at enclave creation
# time.
sgx.enclave_size = "2G"
# Set maximum number of in-enclave threads to 32. Recall that SGX v1 requires to specify the maximum
# number of simultaneous threads at enclave creation time.
sgx.thread_num = 32
# Node.js is a non-PIE binary
sgx.nonpie_binary = 1
# Specify all files used by Node.js and its dependencies (including all libs which can be loaded at
# runtime via dlopen).
sgx.trusted_files.nodejs = "file:$(NODEJS_DIR)/nodejs"
sgx.trusted_files.node = "file:$(NODEJS_DIR)/node"
sgx.trusted_files.ld = "file:$(GRAPHENEDIR)/Runtime/ld-linux-x86-64.so.2"
sgx.trusted_files.libc = "file:$(GRAPHENEDIR)/Runtime/libc.so.6"
sgx.trusted_files.libm = "file:$(GRAPHENEDIR)/Runtime/libm.so.6"
sgx.trusted_files.libdl = "file:$(GRAPHENEDIR)/Runtime/libdl.so.2"
sgx.trusted_files.librt = "file:$(GRAPHENEDIR)/Runtime/librt.so.1"
sgx.trusted_files.libutil = "file:$(GRAPHENEDIR)/Runtime/libutil.so.1"
sgx.trusted_files.libpthread = "file:$(GRAPHENEDIR)/Runtime/libpthread.so.0"
# Input
sgx.trusted_files.javascript = "file:helloworld.js"
sgx.allowed_files.modules = "file:node_modules"