This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Extend README and configuration documentation. #24
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,14 +67,49 @@ type Enclave struct { | |
|
||
// Config represents the configuration of our enclave service. | ||
type Config struct { | ||
// SOCKSProxy must be set if | ||
// 1) your enclave application should obtain a Let's Encrypt-signed | ||
// certificate (i.e., if UseACME is set to true) | ||
// or if | ||
// 2) your enclave application makes HTTP requests over the Internet. | ||
// If so, set SOCKSProxy to "socks5://127.0.0.1:1080". | ||
SOCKSProxy string | ||
FQDN string | ||
Port int | ||
UseACME bool | ||
Debug bool | ||
FdCur uint64 | ||
FdMax uint64 | ||
AppURL string | ||
|
||
// FQDN contains the fully qualified domain name that's set in the HTTPS | ||
// certificate of the enclave's Web server, e.g. "example.com". | ||
FQDN string | ||
|
||
// Port contains the TCP port that the Web server should listen on, e.g. | ||
// 8443. Note that the Web server listens for this port on the private | ||
// VSOCK interface. This is not an Internet-facing port. | ||
Port int | ||
|
||
// UseACME must be set to true if you want your enclave application to | ||
// request a Let's Encrypt-signed certificate. If this is set to false, | ||
// the enclave creates a self-signed certificate. | ||
UseACME bool | ||
|
||
// Debug can be set to true to see debug messages, i.e., if you are | ||
// starting the enclave in debug mode by running: | ||
Comment on lines
+92
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice if the framework could ask the supervisor if it's in debug mode, but I don't see an interface for that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One could implement this by asking for an attestation document and checking if its PCR values are all zeroed out. I filed https://github.com/brave/nitriding/issues/25 for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, clever! |
||
// | ||
// nitro-cli run-enclave --debug-mode .... | ||
// | ||
// Do not set this to true in production because printing debug messages | ||
// for each HTTP request slows down the enclave application, and you are | ||
// not able to see debug messages anyway unless you start the enclave using | ||
// nitro-cli's "--debug-mode" flag. | ||
Debug bool | ||
|
||
// FdCur and FdMax set the soft and hard resource limit, respectively. The | ||
// default for both variables is 65536. | ||
FdCur uint64 | ||
FdMax uint64 | ||
|
||
// AppURL should be set to the URL of the software repository that's | ||
// running inside the enclave, e.g., "https://github.com/foo/bar". The URL | ||
// is shown on the enclave's index page, as part of instructions on how to | ||
// do remote attestation. | ||
AppURL string | ||
} | ||
|
||
// NewEnclave creates and returns a new enclave with the given config. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe mention this port number must match the one given to viproxy on the host instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually doesn't have to because this variable only controls the in-enclave IP-to-VSOCK proxy. There's a viproxy instance running on both the host and inside the enclave. We should probably remove this variable from the config struct because it's confusing and there aren't many good reasons to change it.