helloworld

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

README

helloworld sample

This sample shows how to build a confidential Go application with EGo and run it in Marblerun. This should serve as a blueprint for making existing applications Marblerun-ready or creating new ones. Detailed instructions for setting up Marblerun are omitted for brevity. Please refer to the documentation for that.

You can build the sample as follows:

ego-go build
ego sign helloworld

Then get the enclave's unique ID aka MRENCLAVE

ego uniqueid helloworld

and set it as UniqueID in manifest.json.

We assume that the Coordinator is run with the following environment variables:

  • EDG_COORDINATOR_MESH_ADDR=localhost:2001
  • EDG_COORDINATOR_CLIENT_ADDR=localhost:4433
  • EDG_COORDINATOR_DNS_NAMES=localhost
  • EDG_COORDINATOR_SEAL_DIR=$PWD

Once the Coordinator instance is running, upload the manifest to the Coordinator:

curl -k --data-binary @manifest.json https://localhost:4433/manifest

Now we can run our application:

EDG_MARBLE_COORDINATOR_ADDR=localhost:2001 EDG_MARBLE_TYPE=hello EDG_MARBLE_UUID_FILE=$PWD/uuid EDG_MARBLE_DNS_NAMES=localhost ego marblerun helloworld

This app will then serve HTTP on port 8080:

$ curl http://localhost:8080
Hello world!
Commandline arguments: [foo bar]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL