Dstack-TEE / Dstack-TEE/dstack
Adopt RFC 8785 (JCS) for canonical compose hash calculation
- Lingua principale
- Rust
- Stelle
- 544
- Fork
- 96
- Merge medio
- 23h 40m
- PR unite (30g)
- 126
Descrizione
## Problem
Right now, the same appcompose can hash differently depending on how the JSON is formatted - whitespace, key order, indentation, you name it. This makes verification a pain for devs trying to prove their docker-compose is actually running in a TEE.
## Proposal
Use [RFC 8785 - JSON Canonicalization Scheme](https://www.rfc-editor.org/rfc/rfc8785) for compose hash calculation.
## Rollout
**Phase 1 - SDK & Docs**
- Add JCS hash calculation to the SDK
- Update docs explaining how it works and how the compose hash is built from each component
- No breaking changes yet
**Phase 2 - Migration**
- Make JCS the default in SDK
- Provide tooling to verify/convert existing files
**Phase 3 - Enforcement**
- Require JCS-canonical hashes in a future release
- Reject non-canonical submissions
## Separate hashes for docker_compose & prelaunch_script
These two should have their own hashes, not just be buried in the final compose hash. Makes debugging way easier - you can tell exactly which part changed when hashes don't match. Plus they're raw strings (YAML/bash), so they don't go through JCS anyway. Keeping them separate gives better traceability.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by locating the SDK's current compose-hash calculation and the documentation describing compose components. Trace how docker_compose and prelaunch_script are represented, then verify that Phase 1 covers JCS-based hashing, documented hash construction, and separate hashes for those raw-string inputs without implementing later migration or enforcement phases.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker-compose, rust
- Ambito
- cryptography, documentation, security
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100