-
Notifications
You must be signed in to change notification settings - Fork 12
Dummy server for testing azure attestation #53
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
Draft
ameba23
wants to merge
10
commits into
main
Choose a base branch
from
peg/dummy-rust-attestation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+66
−3
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0d2441e
Add dummy attestation image for azure
ameba23 ef023df
Use MAA branch of attested-tls-proxy
ameba23 6a3edaa
Add zlib
ameba23 bc37433
Use tagged version of attested-tls-proxy
ameba23 b564ec3
Dont rely on having PROFILES set in debloat script
ameba23 6ebdd94
Use azure profile
ameba23 23f412d
Move persistent-mount service from base to bob-common
ameba23 0625b73
Fix command in tdx-dummy-azure.service
ameba23 0577b19
Add missing runtime dependency
ameba23 17421ef
Bump tag to use updated tdx-dummy-azure
ameba23 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 hidden or 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
File renamed without changes.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -50,10 +50,10 @@ build_rust_package() { | |
| CARGO_TERM_COLOR='never' | ||
| cd '/build/$package' | ||
| cargo fetch | ||
| cargo build --release --frozen ${extra_features:+--features $extra_features} | ||
| cargo build -p $package --release --frozen ${extra_features:+--features $extra_features} | ||
|
Contributor
Author
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. I have more than one crate in the workspace, so i need to specify which one i want to build. Im not sure whether this change would effect other users of this script - need to check their crate names (lighthouse, reth and rbuilder). |
||
| " | ||
|
|
||
| # Cache and install the built binary | ||
| install -m 755 "$build_dir/target/release/$package" "$cached_binary" | ||
| install -m 755 "$cached_binary" "$dest_path" | ||
| } | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [Include] | ||
| Include=base/mkosi.conf | ||
| Include=tdx-dummy-azure/mkosi.conf | ||
|
|
||
| [Config] | ||
| Profiles=azure |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| [Unit] | ||
| Description=Dummy TDX server for azure attestation | ||
| After=network-setup.service | ||
| Wants=network-setup.service | ||
|
|
||
| [Service] | ||
| Type=exec | ||
| User=root | ||
| Group=root | ||
| ExecStart=/usr/bin/dummy-attestation-server server --listen-addr 0.0.0.0:8080 --server-attestation-type azure-tdx | ||
| Restart=on-failure | ||
| RestartSec=10 | ||
| StandardOutput=journal | ||
| StandardError=journal | ||
|
|
||
| [Install] | ||
| WantedBy=minimal.target |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
| set -euxo pipefail | ||
|
|
||
| source scripts/build_rust_package.sh | ||
|
|
||
| # local package="$1" | ||
| # local version="$2" | ||
| # local git_url="$3" | ||
| # local provided_binary="$4" | ||
| # local extra_features="${5:-}" | ||
| # local extra_rustflags="${6:-}" | ||
| build_rust_package \ | ||
| "dummy-attestation-server" \ | ||
| "azure-attest-test02" \ | ||
| "https://github.com/flashbots/attested-tls-proxy.git" \ | ||
| "" \ | ||
| "" \ | ||
| "-l z -l zstd" |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [Content] | ||
| WithNetwork=true | ||
| BuildScripts=tdx-dummy-azure/mkosi.build | ||
|
|
||
| Packages=libtss2-esys-3.0.2-0t64 | ||
| libtss2-tctildr0t64 | ||
|
|
||
| BuildPackages=ca-certificates | ||
| cargo | ||
| git | ||
| libtss2-dev | ||
| zlib1g-dev | ||
|
|
||
| PostInstallationScripts=tdx-dummy-azure/mkosi.postinst |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
| set -euxo pipefail | ||
|
|
||
| # Install systemd service units | ||
| SERVICE_DIR="$BUILDROOT/etc/systemd/system" | ||
| mkdir -p "$SERVICE_DIR" | ||
|
|
||
| install -m 644 "tdx-dummy-azure/dummy-tdx-azure.service" "$SERVICE_DIR/" |
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.
Without this i was getting:
I'm not sure if there is any danger in accepting an unbound value here.