Skip to content

Commit 4bb4946

Browse files
committed
sdk: Remove more fields in AppInfo
1 parent 39800da commit 4bb4946

File tree

8 files changed

+22
-43
lines changed

8 files changed

+22
-43
lines changed

sdk/curl/api-tappd.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ curl --unix-socket /var/run/tappd.sock http://localhost/prpc/Tappd.Info
189189
"app_cert": "<certificate-string>",
190190
"tcb_info": "<tcb-info-string>",
191191
"app_name": "my-app",
192-
"public_logs": true,
193-
"public_sysinfo": true,
194192
"device_id": "<hex-encoded-device-id>",
195-
"mr_aggregated": "<hex-encoded-mr-aggregated>",
196193
"os_image_hash": "<hex-encoded-os-image-hash>",
197194
"key_provider_info": "<key-provider-info-string>",
198195
"compose_hash": "<hex-encoded-compose-hash>"

sdk/curl/api.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,7 @@ curl --unix-socket /var/run/dstack.sock http://dstack/Info
154154
"app_cert": "<certificate-string>",
155155
"tcb_info": "<tcb-info-string>",
156156
"app_name": "my-app",
157-
"public_logs": true,
158-
"public_sysinfo": true,
159157
"device_id": "<hex-encoded-device-id>",
160-
"mr_aggregated": "<hex-encoded-mr-aggregated>",
161158
"os_image_hash": "<hex-encoded-os-image-hash>",
162159
"key_provider_info": "<key-provider-info-string>",
163160
"compose_hash": "<hex-encoded-compose-hash>"
@@ -203,4 +200,4 @@ Error responses will include a JSON body with error details:
203200
```json
204201
{
205202
"error": "Error description"
206-
}
203+
}

sdk/go/dstack/client.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ type InfoResponse struct {
6363
AppCert string `json:"app_cert"`
6464
TcbInfo string `json:"tcb_info"`
6565
AppName string `json:"app_name"`
66-
PublicLogs bool `json:"public_logs"`
67-
PublicSysinfo bool `json:"public_sysinfo"`
6866
DeviceID string `json:"device_id"`
69-
MrAggregated string `json:"mr_aggregated"`
7067
KeyProviderInfo string `json:"key_provider_info"`
7168
OsImageHash string `json:"os_image_hash"`
7269
ComposeHash string `json:"compose_hash"`

sdk/go/tappd/client.go

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,11 @@ type TcbInfo struct {
8888

8989
// Represents the response from an info request
9090
type TappdInfoResponse struct {
91-
AppID string `json:"app_id"`
92-
InstanceID string `json:"instance_id"`
93-
AppCert string `json:"app_cert"`
94-
TcbInfo TcbInfo `json:"tcb_info"`
95-
AppName string `json:"app_name"`
96-
PublicLogs bool `json:"public_logs"`
97-
PublicSysinfo bool `json:"public_sysinfo"`
91+
AppID string `json:"app_id"`
92+
InstanceID string `json:"instance_id"`
93+
AppCert string `json:"app_cert"`
94+
TcbInfo TcbInfo `json:"tcb_info"`
95+
AppName string `json:"app_name"`
9896
}
9997

10098
const INIT_MR = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
@@ -339,13 +337,11 @@ func (c *TappdClient) Info(ctx context.Context) (*TappdInfoResponse, error) {
339337
}
340338

341339
var response struct {
342-
TcbInfo string `json:"tcb_info"`
343-
AppID string `json:"app_id"`
344-
InstanceID string `json:"instance_id"`
345-
AppCert string `json:"app_cert"`
346-
AppName string `json:"app_name"`
347-
PublicLogs bool `json:"public_logs"`
348-
PublicSysinfo bool `json:"public_sysinfo"`
340+
TcbInfo string `json:"tcb_info"`
341+
AppID string `json:"app_id"`
342+
InstanceID string `json:"instance_id"`
343+
AppCert string `json:"app_cert"`
344+
AppName string `json:"app_name"`
349345
}
350346
if err := json.Unmarshal(data, &response); err != nil {
351347
return nil, err
@@ -357,12 +353,10 @@ func (c *TappdClient) Info(ctx context.Context) (*TappdInfoResponse, error) {
357353
}
358354

359355
return &TappdInfoResponse{
360-
AppID: response.AppID,
361-
InstanceID: response.InstanceID,
362-
AppCert: response.AppCert,
363-
TcbInfo: tcbInfo,
364-
AppName: response.AppName,
365-
PublicLogs: response.PublicLogs,
366-
PublicSysinfo: response.PublicSysinfo,
356+
AppID: response.AppID,
357+
InstanceID: response.InstanceID,
358+
AppCert: response.AppCert,
359+
TcbInfo: tcbInfo,
360+
AppName: response.AppName,
367361
}, nil
368362
}

sdk/js/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ export interface InfoResponse {
4141
app_cert: string
4242
tcb_info: TcbInfo
4343
app_name: string
44-
public_logs: boolean
45-
public_sysinfo: boolean
4644
device_id: string
47-
mr_aggregated: string
4845
os_image_hash: string
4946
key_provider_info: string
5047
compose_hash: string

sdk/python/src/dstack_sdk/dstack_client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ class InfoResponse(BaseModel):
104104
app_cert: str
105105
tcb_info: TcbInfo
106106
app_name: str
107-
public_logs: bool
108-
public_sysinfo: bool
109107
device_id: str
110-
mr_aggregated: str
111108
os_image_hash: str
112109
key_provider_info: str
113110
compose_hash: str

sdk/rust/src/dstack_client.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,8 @@ pub struct InfoResponse {
143143
pub tcb_info: TcbInfo,
144144
/// The name of the application
145145
pub app_name: String,
146-
/// Whether public logs are enabled
147-
pub public_logs: bool,
148-
/// Whether public system information is enabled
149-
pub public_sysinfo: bool,
150146
/// The device identifier
151147
pub device_id: String,
152-
/// The aggregated measurement register value
153-
pub mr_aggregated: String,
154148
/// The hash of the OS image
155149
pub os_image_hash: String,
156150
/// Information about the key provider

sdk/rust/tests/test_client.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ async fn test_report_data() {
6666
};
6767
assert_eq!(&quote_report.report_data[..], &expected[..]);
6868
}
69+
70+
#[tokio::test]
71+
async fn test_info() {
72+
let client = AsyncDstackClient::new(None);
73+
let _info = client.info().await.unwrap();
74+
}

0 commit comments

Comments
 (0)