Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to skip SGX token generation #62

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ Gramine image.
Allow untrusted arguments to be specified at :command:`docker run`. Otherwise
any arguments specified during :command:`docker run` are ignored.

.. option:: --skip-token-generation

Allows to skip SGX token generation (via :command:`gramine-sgx-get-token`).
Useful for DCAP platforms and read-only filesystems.

.. option:: --no-cache

Disable Docker's caches during :command:`gsc build`. This builds the
Expand Down
3 changes: 3 additions & 0 deletions gsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ def gsc_info_image(args):
sub_build.add_argument('--insecure-args', action='store_true',
help='Allow to specify untrusted arguments during Docker run. '
'Otherwise arguments are ignored.')
sub_build.add_argument('--skip-token-generation', action='store_true',
help='Allows to skip SGX token generation (via `gramine-sgx-get-token`). '
'Useful for DCAP platforms and read-only filesystems.')
sub_build.add_argument('-nc', '--no-cache', action='store_true',
help='Build graminized Docker image without any cached images.')
sub_build.add_argument('--rm', action='store_true',
Expand Down
2 changes: 2 additions & 0 deletions templates/apploader.common.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ set -ex
# Default to Linux-SGX if no PAL was specified
if [ -z "$GSC_PAL" ] || [ "$GSC_PAL" == "Linux-SGX" ]
then
{% if not skip_token_generation %}
gramine-sgx-get-token --sig /entrypoint.sig --output /entrypoint.token
{% endif %}
gramine-sgx /entrypoint {% if insecure_args %}{{binary_arguments}} "${@}"{% endif %}
else
gramine-direct /entrypoint {{binary_arguments}} "${@}"
Expand Down