Commit graph

29 commits

Author SHA1 Message Date
Harald Hoyer
f8bd9e6a08
chore: split-out vault code from teepot in teepot-vault
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-03-06 09:47:51 +01:00
Harald Hoyer
d6061c35a8
fix(teepot-vault): use ring as CryptoProvider for rustls
New `rustls` needs global install of default `CryptoProvider`.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-02-28 14:14:57 +01:00
Harald Hoyer
d3c17a7ace
Merge branch 'main' into cargo_update 2025-02-25 13:22:35 +01:00
Harald Hoyer
f822c70721
chore: remove unused rand dependency and update crates
- Removed `rand` dependency from multiple `.toml` files and updated relevant imports to use `rand_core::OsRng`.
- Updated OpenTelemetry dependencies to latest versions and refactored SDK initialization to use `SdkLoggerProvider`.
- Bumped versions of several dependencies including `clap`, `awc`, `ring`, and `smallvec` for compatibility and features.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-02-20 15:40:13 +01:00
Harald Hoyer
049f1b3de8
feat(tdx): add TDX RTMR extension support with UEFI marker
- Added `UEFI_MARKER_DIGEST_BYTES` constant for TDX RTMR extension.
- Implemented RTMR3 extension in `tee-key-preexec` for TDX attestation flow.
- Updated `rtmr-calc` to use `UEFI_MARKER_DIGEST_BYTES` for RTMR1 extension.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-02-20 15:15:44 +01:00
Harald Hoyer
98a71b3e3a
fix(teepot): add custom HTTP header for google metadata and update default endpoint
- Replace `reqwest::get` with a configured `reqwest::Client` to support custom headers (e.g., "Metadata-Flavor: Google").
- Update default OTLP endpoint to include the "http://" prefix for clarity.
2025-02-19 13:58:39 +01:00
Harald Hoyer
a41460b7f0
feat(tdx-google): enhance container service setup
- Add `vector.service` and `chronyd.service` dependencies to `docker_start_container` service.
- Use `EnvironmentFile` and a pre-start script to dynamically generate environment variables for container setup.
- Improve error handling and clarity in container initialization.
2025-02-14 16:47:43 +01:00
Harald Hoyer
908579cd60
feat: rewrite google-metadata test as tdx-test
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-02-14 16:47:42 +01:00
Harald Hoyer
45309e58f4
chore: cargo deps update
with code fixes for the new versions.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-02-10 15:44:16 +01:00
Patryk Bęza
afa524c18c
Address code review comments 2025-01-17 12:41:07 +01:00
Patryk Bęza
2d04ba0508
feat(tee-key-preexec): add support for Solidity-compatible pubkey in report_data
This PR is part of the effort to implement on-chain TEE proof
verification. This PR goes hand in hand with https://github.com/matter-labs/zksync-era/pull/3414.
2025-01-16 20:46:16 +01:00
Harald Hoyer
dc9263911f
fix(teepot-tee-quote-verification-rs): free collateral on ffi error
Free the FFI collateral on rust checks anyway to prevent memory leaks.

Also remove the `TryFrom<&sgx_ql_qve_collateral_t>` as it is unsafe.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-01-13 13:50:04 +01:00
Harald Hoyer
584223dc93
fix(teepot-tee-quote-verification-rs): memory leak
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2025-01-13 10:35:12 +01:00
Harald Hoyer
5d32396966
feat: add tdx-extend, sha384-extend and rtmr-calc
This enables pre-calculating the TDX rtmr[1,2,3] values for an attested boot process.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-12-20 13:27:55 +01:00
Harald Hoyer
0b67a14cd1
chore: cargo update
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-12-20 12:20:39 +01:00
Harald Hoyer
4610475fae
feat: add TDX support
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-12-20 10:54:24 +01:00
Harald Hoyer
f4fba51e3e
chore: rustfmt 2024-12-20 09:31:03 +01:00
Harald Hoyer
f0fea5c122
refactor(logging): enhance logging setup and usage
- Modified the `setup_logging` function to return a `Subscriber`, improving flexibility and reuse.
- Integrated `tracing::subscriber::set_global_default` in the main functions to establish the logging subscriber globally.
- Added configurations for span events and control over file and line information display.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-11-28 15:49:15 +01:00
Harald Hoyer
af3ab51320
feat(logging): centralize logging setup in teepot crate
- Added a new logging module in `teepot` crate.
- Removed redundant logging setup code from individual projects.
- Updated dependencies and references for logging setup.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-09-18 16:08:13 +02:00
Harald Hoyer
77818cffef
chore: Release 2024-09-16 17:01:14 +02:00
Harald Hoyer
0bdc3425e4
chore: cargo update
and fix `cargo clippy` issues.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-08-07 15:26:20 +02:00
Patryk Bęza
f90088be76
SGX attestation & batch signature verification tool 2024-07-10 14:47:07 +02:00
Harald Hoyer
a9bb266668
chore(deps): update to rust version 1.78
and fix the clippy warnings

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-06-10 13:09:05 +02:00
Harald Hoyer
af5df7864c
chore: Release 2024-03-12 15:23:51 +01:00
Harald Hoyer
ec553240c2
chore: Release 2024-03-12 15:09:31 +01:00
Harald Hoyer
8dd4c1292a
chore: rename intel-tee-quote-verification-rs to teepot-tee-quote-verification-rs
and prepare to publish on crates.io

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-03-12 11:57:21 +01:00
Harald Hoyer
0654bacdb5
ci: use crane flake to build with nix
This enables to add cargo `fmt`, `clippy` and `deny` to nix, using cached results.

Move the `teepot` crate to the `crates` subdir to make the life easier for
the `crane` flake.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-03-11 10:01:59 +01:00
Harald Hoyer
89e86c2d2d
feat: remove intel-tee-quote-verification-sys
important fixes have been upstreamed

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-02-14 14:27:41 +01:00
Harald Hoyer
89ffbd35a8
feat: initial commit
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
2024-02-09 10:10:53 +01:00