Comments (4)
KBS log on the CI machine
$ docker logs -f dc21822ee573
...
[2023-06-30T02:18:18Z INFO actix_web::middleware::logger] 172.18.0.1 "POST /kbs/v0/attest HTTP/1.1" 200 1151 "-" "attestation-agent-kbs-client/0.1.0" 2.073529
[2023-06-30T02:18:18Z INFO api_server::http::resource] Cookie bf7f999e6a6143f5af9576d4fbdea7a8 request to get resource
[2023-06-30T02:18:18Z INFO api_server::http::resource] Resource description: ResourceDesc { repository_name: "default", resource_type: "image-kek", resource_tag: "11032d96-dccd-46a3-9244-93644d76745f" }
[2023-06-30T02:18:18Z INFO actix_web::middleware::logger] 172.18.0.1 "GET /kbs/v0/resource/default/image-kek/11032d96-dccd-46a3-9244-93644d76745f HTTP/1.1" 200 532 "-" "attestation-agent-kbs-client/0.1.0" 0.000411
Shows that the key was successfully retrieved from KBS
from enclave-cc.
Let's check enclave-agent log to know how does it consume the key
root@iZj6cj2qap8uqto6jgvci1Z:/home/xynnn# cat /run/containerd/agent-enclave/af41997bbf970c97a03ce674a2823be7adc48045f86a626035188ef689013547/stderr
[2023-06-30T02:18:09Z INFO enclave_agent] ttRPC server started: "tcp://127.0.0.1:7788"
[2023-06-30T02:18:09Z INFO enclave_agent::services::images] Pulling "ghcr.io/confidential-containers/test-container-enclave-cc:encrypted"
[2023-06-30T02:18:09Z INFO image_rs::resource::kbs] secure channel uses native-aa
[2023-06-30T02:18:11Z INFO kbs_protocol] CC-KBC: trying to request KBS, attempt 1
[2023-06-30T02:18:15Z INFO kbs_protocol] CC-KBC: trying to request KBS, attempt 1
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
left: `33`,
right: `32`', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.6/src/lib.rs:565:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Seems that the symmetric key length is wrong. 32 Bytes (256 bits for AES256) expected but 33 bytes provided.
Check the key
root@iZj6cj2qap8uqto6jgvci1Z:/home/xynnn# ls -al kbs/data/kbs-storage/default/image-kek/11032d96-dccd-46a3-9244-93644d76745f
-rw-r--r-- 1 root root 33 Jun 29 14:55 kbs/data/kbs-storage/default/image-kek/11032d96-dccd-46a3-9244-93644d76745f
shows that the file length is 33 not 32. Let's overwrite the key file with the one from https://github.com/confidential-containers/enclave-cc/blob/main/tools/packaging/build/test-image/Dockerfile#L13
echo LieOhvkqFcGMzZrVzt6vPWlj/F/bgYMNe45vhQpdxAA= | base64 -d > /home/xynnn/kbs/data/kbs-storage/default/image-kek/11032d96-dccd-46a3-9244-93644d76745f
```
from enclave-cc.
CI retriggered. https://github.com/confidential-containers/enclave-cc/actions/runs/5418442602
from enclave-cc.
Passed.
from enclave-cc.
Related Issues (20)
- enable dependabot updates for rust dependencies HOT 1
- image pull failures with multi-layer images
- Get rid of eaa-kbc & verdictd HOT 4
- update to combined image-rs+ocicrypt+AA repo HOT 1
- Update Quickstart for v0.8 HOT 2
- enable signature checks for sample_kbc in CI
- update operator flows for NFD and Debug
- Operator tests are currently failing
- specify rust version used in builds
- Replace apt yum repos for installing Kubernetes HOT 1
- RFC: enclave-cc improvement ideas HOT 4
- Failed to create agent enclave - Invalid enclave metadata. (line 152, file src/pal_enclave.c) HOT 27
- [ERROR] occlum-pal: Failed to create enclave with error code 0x2006: Invalid SGX device. Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards. (line 152, file src/pal_enclave.c) HOT 5
- Error while creating enclave-cc in HW mode with encrypted image which requires attestation HOT 10
- shim: RPC protos and dependencies need rework
- Attestation: Verifier evaluate failed: SGX Verifier: REPORT_DATA is different from that in SGX Quote HOT 24
- setup cargo workspace
- deploy enclave-cc failed HOT 5
- how to configure image decryption keys HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enclave-cc.