kms: record OS image version and dev flag on-chain in the next-gen contract
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, solidity
- Lĩnh vực
- blockchain, security
Hướng nghiên cứu
Start with the next-generation KMS contract around DstackKms, addOsImageHash, allowedOsImages, and isAppAllowed, then trace the verifier's attestation paths that consume os_image_hash. Resolve the compatibility and dev-image policy questions before implementing storage and events; done means on-chain metadata can be retrieved for each hash and unavailable platform fields can be filled from it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The verifier only reports os_image_is_dev / os_image_version on the TDX legacy path, the one path that downloads the image and reads metadata.json. TDX lite, SEV-SNP, GCP TDX, AWS NitroTPM and Nitro Enclave carry only the manifest digest, so both fields are null there (#1266). Right now relying parties can't tell a dev image from a prod image on those paths, and can't enforce a minimum version. The only thing they can do is keep their own os_image_hash allowlist.
DstackKms already whitelists OS images on-chain, but it stores just a bool for each hash (allowedOsImages), so the chain doesn't know what the hash is.
Proposal
In the next-generation KMS contract, store metadata for each OS image hash, for example:
struct OsImageInfo {
bool allowed;
bool isDev;
string version; // e.g. "0.5.10"
}
mapping(bytes32 => OsImageInfo) public osImages;
addOsImageHashtakesisDevandversion, and emits them in the event.- Every attestation path can look up version and dev status by
os_image_hashfrom the same source. This doesn't need image downloads ormetadata.json. - KMS / relying-party policy can reject dev images or enforce a minimum version from on-chain data.
- The verifier can fill in
os_image_is_dev/os_image_versionfrom the contract when the platform doesn't expose them.
The owner who allowlists a hash vouches for its metadata. This is the same trust we already give to the allowlist.
Open questions
- Keep
allowedOsImages(bytes32) -> boolas a view for compatibility with existing consumers? - Should dev images be allowed at all on production KMS instances, or should the contract reject
isDevimages directly inisAppAllowed?
- Ngôn ngữ chính
- Rust
- Star
- 551
- Fork
- 97
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 182
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Dstack-TEE/dstack
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Dstack-TEE/dstack#1301 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Dstack-TEE/dstack#1300 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Dstack-TEE/dstack#1299 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Dstack-TEE/dstack#1298 ·
-
P0
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Dstack-TEE/dstack#1297 ·
Tất cả issue của Dstack-TEE/dstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Đang mởfuzz
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ClickHouse/ClickHouse#122114 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
linebender/vello_svg#90 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100