Skip to content

Conversation

@r-n-o
Copy link
Contributor

@r-n-o r-n-o commented Apr 24, 2025

Summary & Motivation (Problem vs. Solution)

Currently our internal mono repo doesn't build qos_enclave in the exact same way than this repo does. Subtle differences lead to mismatch in digests, which means external users who do no have mono access cannot verify remote attestations meaningfully.

Something I didn't expect would have an impact on the final digest:

RUN mkdir -p /qos/src
ADD . /qos/src 
WORKDIR /qos/src/qos_enclave
...build...

yields a different digest than:

ADD . /src
WORKDIR /src/qos_enclave
...build...

And another surprising thing:

ENV USER=user
ENV HOME=/home/user
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Adding these also alters the final digests.

Shoutout to @lrvick who put me on the right track and noticed, by using a combo of andrcmdr/aws-nitro-enclaves-image-format-build-extract and diffoscope, that the init binary was the thing causing the EIF file to be different.

How I Tested These Changes

make out/qos_enclave/index.json like...100 times.

@r-n-o r-n-o requested a review from a team as a code owner April 24, 2025 23:31
Copy link
Contributor

@Ulexus Ulexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crazy that we could have so many little variations like this. Thanks!

@Ulexus Ulexus merged commit 621bd32 into main Apr 25, 2025
6 checks passed
@Ulexus Ulexus deleted the rno/align-qos-enclave-build-with-mono branch April 25, 2025 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants