diff --git a/Cargo.lock b/Cargo.lock index 0da853d90e..c3928c8130 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ dependencies = [ "env_logger 0.10.2", "jsonwebtoken", "jwt-simple", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/virtee/kbs-types.git?rev=e28c20c761378b1e8f5b210c839e3c454f2ec3fb)", "lazy_static", "log", "mobc", @@ -535,7 +535,7 @@ dependencies = [ "env_logger 0.10.2", "futures", "hex", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/virtee/kbs-types.git?rev=e28c20c761378b1e8f5b210c839e3c454f2ec3fb)", "lazy_static", "log", "openssl", @@ -575,7 +575,7 @@ dependencies = [ "csv-rs", "hyper", "hyper-tls", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/huoqifeng/kbs-types.git?branch=s390x-se)", "log", "nix", "occlum_dcap", @@ -1284,7 +1284,7 @@ dependencies = [ "anyhow", "base64 0.21.7", "ctr", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/huoqifeng/kbs-types.git?branch=s390x-se)", "rand", "rsa 0.9.6", "serde", @@ -2429,6 +2429,15 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kbs-types" +version = "0.5.3" +source = "git+https://github.com/virtee/kbs-types.git?rev=e28c20c761378b1e8f5b210c839e3c454f2ec3fb#e28c20c761378b1e8f5b210c839e3c454f2ec3fb" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "kbs_protocol" version = "0.1.0" @@ -2440,7 +2449,7 @@ dependencies = [ "base64 0.21.7", "crypto", "jwt-simple", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/huoqifeng/kbs-types.git?branch=s390x-se)", "log", "reqwest", "resource_uri", @@ -5276,7 +5285,7 @@ dependencies = [ "eventlog-rs", "hex", "jsonwebtoken", - "kbs-types", + "kbs-types 0.5.3 (git+https://github.com/virtee/kbs-types.git?rev=e28c20c761378b1e8f5b210c839e3c454f2ec3fb)", "log", "openssl", "rstest", diff --git a/Cargo.toml b/Cargo.toml index c8d8797e7e..accab69123 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ clap = { version = "4", features = ["derive"] } config = "0.13.3" env_logger = "0.10.0" hex = "0.4.3" -kbs-types = { git = "https://github.com/huoqifeng/kbs-types.git", branch = "s390x-se" } +kbs-types = { git = "https://github.com/virtee/kbs-types.git", rev = "e28c20c761378b1e8f5b210c839e3c454f2ec3fb" } jsonwebtoken = "9" log = "0.4.17" prost = "0.11.0" diff --git a/kbs/docs/kbs.yaml b/kbs/docs/kbs.yaml index b04b7b2b12..9a582e4a5b 100644 --- a/kbs/docs/kbs.yaml +++ b/kbs/docs/kbs.yaml @@ -212,7 +212,6 @@ components: required: - tee-pubkey - tee-evidence - - extra-params type: object properties: tee-pubkey: @@ -220,11 +219,6 @@ components: tee-evidence: description: HW-TEE specific attestation evidence. type: object - extra-params: - description: - Freely formatted JSON object used for HW-TEE specific attestation - processes. - type: object description: >- KBS attestation challenge, sent in response to the KBC Request. diff --git a/kbs/docs/kbs_attestation_protocol.md b/kbs/docs/kbs_attestation_protocol.md index 4662aacb91..797696ee00 100644 --- a/kbs/docs/kbs_attestation_protocol.md +++ b/kbs/docs/kbs_attestation_protocol.md @@ -147,8 +147,6 @@ evidence from the HW-TEE platform and organizes it into the following payload: /* The attestation evidence. Its format is specified by Attestation-Service. */ "tee-evidence": {} - /* Extra parameters to support some special HW-TEE attestation. */ - "extra-params": {} } ``` > **Note:** the `/*...*/` comments are not valid in JSON, and must not be used. @@ -180,11 +178,6 @@ Attestation-Service. The KBS does not parse or analyze the attestation evidence, it forwards it to the Attestation-Service for verification. -- `extra-params` - -The reserved extra parameter field which is used to pass the additional -information provided by the KBS when some specific HW-TEE needs to be attested. - ## `Response` Upon successful attestation, the KBC can request resources from the KBS, by diff --git a/kbs/src/api/src/attestation/coco/builtin.rs b/kbs/src/api/src/attestation/coco/builtin.rs index 75b4cb7d43..b9d017f60e 100644 --- a/kbs/src/api/src/attestation/coco/builtin.rs +++ b/kbs/src/api/src/attestation/coco/builtin.rs @@ -29,7 +29,7 @@ impl Attest for BuiltInCoCoAs { let attestation: Attestation = serde_json::from_str(attestation)?; // TODO: align with the guest-components/kbs-protocol side. - let runtime_data_plaintext = json!({"tee-pubkey": attestation.tee_pubkey, "nonce": nonce, "extra-params": attestation.extra_params}); + let runtime_data_plaintext = json!({"tee-pubkey": attestation.tee_pubkey, "nonce": nonce}); self.inner .read() diff --git a/kbs/src/api/src/attestation/coco/grpc.rs b/kbs/src/api/src/attestation/coco/grpc.rs index 78784cf206..e478df8d31 100644 --- a/kbs/src/api/src/attestation/coco/grpc.rs +++ b/kbs/src/api/src/attestation/coco/grpc.rs @@ -102,7 +102,7 @@ impl Attest for GrpcClientPool { let attestation: Attestation = serde_json::from_str(attestation)?; // TODO: align with the guest-components/kbs-protocol side. - let runtime_data_plaintext = json!({"tee-pubkey": attestation.tee_pubkey, "nonce": nonce, "extra-params": attestation.extra_params}); + let runtime_data_plaintext = json!({"tee-pubkey": attestation.tee_pubkey, "nonce": nonce}); let runtime_data_plaintext = serde_json::to_string(&runtime_data_plaintext) .context("CoCo AS client: serialize runtime data failed")?; diff --git a/kbs/tools/attest.json b/kbs/tools/attest.json index 6cad336878..dd768b3eba 100644 --- a/kbs/tools/attest.json +++ b/kbs/tools/attest.json @@ -4,6 +4,5 @@ "k-mod": "my_modulus", "k-exp": "my_exponent" }, - "tee-evidence": "my_evidence", - "extra-params": "my_extra_params" + "tee-evidence": "my_evidence" }