aws / aws-nitro-enclaves-sdk-c

This repo provides a C API for AWS Nitro Enclaves, including a KMS SDK that integrates it with attestation.
Apache License 2.0
99 stars 74 forks source link

Unable to build enclave using Docker image created from Dockerfile supplied in the repo #104

Closed andrewburns1 closed 1 year ago

andrewburns1 commented 1 year ago

I have been following the steps outlined in https://github.com/aws/aws-nitro-enclaves-sdk-c/blob/main/docs/kmstool.md#kmstool-enclave-cli. I am able to build the images as specified in the Building step (https://github.com/aws/aws-nitro-enclaves-sdk-c/blob/main/docs/kmstool.md#kmstool-enclave-cli).

However, when trying to run the command to build an enclave image, I am running into an error. Error message posted below:

[ E19 ] File operation failure. Such error appears when the system fails to perform the requested file operations, such as opening the EIF file when launching an enclave, or seeking to a specific offset in the EIF file, or writing to the log file.
File: '/var/log/nitro_enclaves/nitro_enclaves.log', failing operation: 'Open'.

I am trying this in an Amazon Linux 2 instance, with an AMI of ami-0dfcb1ef8550277af

Any help is greatly appreciated!

andrewburns1 commented 1 year ago

Some further information - when running the docker image by itself the following error is reported:

Fatal error condition occurred in ../bin/kmstool-enclave/main.c:387: aws_nitro_enclaves_library_seed_entropy(1024) == (0)
Exiting Application
################################################################################
Stack trace:
################################################################################
/usr/bin/kmstool_enclave(aws_backtrace_print+0x95) [0x6f7900]
/usr/bin/kmstool_enclave(aws_fatal_assert+0x5b) [0x6e340a]
/usr/bin/kmstool_enclave(main+0x4f) [0x41debd]
/lib64/libc.so.6(__libc_start_main+0xea) [0x7f0578c8f13a]
/usr/bin/kmstool_enclave(_start+0x2a) [0x41cc2a]
andrewburns1 commented 1 year ago

Issue was resolved by adding current user to ne usergroup