Skip to content

Commit 7bcb5c9

Browse files
committed
add ppid to kms onboard attestation info
1 parent 01d206e commit 7bcb5c9

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

kms/rpc/proto/kms_rpc.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ message AttestationInfoResponse {
151151
string eth_rpc_url = 6;
152152
// KMS contract address from auth API
153153
string kms_contract_address = 7;
154+
// Raw platform provisioning ID
155+
bytes ppid = 8;
154156
}
155157

156158
// The Onboard RPC service.

kms/src/onboard_service.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ impl OnboardRpc for OnboardHandler {
136136
let app_info = verified
137137
.decode_app_info_ex(false, &info.vm_config)
138138
.context("Failed to decode app info")?;
139+
let ppid = verified
140+
.report
141+
.tdx_report()
142+
.map(|report| report.ppid.to_vec())
143+
.unwrap_or_default();
139144

140145
let (eth_rpc_url, kms_contract_address) = match self.state.config.auth_api.get_info().await
141146
{
@@ -157,6 +162,7 @@ impl OnboardRpc for OnboardHandler {
157162
site_name: self.state.config.site_name.clone(),
158163
eth_rpc_url,
159164
kms_contract_address,
165+
ppid,
160166
})
161167
}
162168

kms/src/www/onboard.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ <h3>Attestation Info (for on-chain registration)</h3>
177177
<span class="info-label">Attestation Mode:</span>
178178
<span class="info-value">{{ attestationInfo.attestation_mode }}</span>
179179
</div>
180+
<div class="info-row" v-if="attestationInfo.ppid">
181+
<span class="info-label">PPID:</span>
182+
<span class="info-value">0x{{ attestationInfo.ppid }}</span>
183+
</div>
180184
<div class="info-row">
181185
<span class="info-label">Device ID:</span>
182186
<span class="info-value">0x{{ attestationInfo.device_id }}</span>

0 commit comments

Comments
 (0)