Repository navigation
Conversation
Signed-off-by: Kevin Wang <wy721@qq.com>
Collaborator
Author
|
Closing for now. #1627 made the SEV-SNP case moot: governance now publishes the minimum TCB per CPU, and SEV-SNP reports no advisory IDs for a rule to match. What is left is accepting non- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DstackKms(for KMS instances) andDstackApp(withrequireTcbUpToDate) comparetcbStatuswith"UpToDate"for every platform. A TCB status only means something on the platform that reported it. TDX's comes from Intel's TCB info, SEV-SNP's from the KMS's AMD bulletin list (#1621), and the Nitro platforms report none. The contracts can't express a different rule per platform, even thoughAuthorizationRequest.teeVariantalready says which platform reported the status. This was split out of #1621 becauseDstackKmshad no room for it; #1623 freed that room.Fix
A shared
TcbPolicylibrary.DstackKmsandDstackAppgainsetTcbPolicy(teeVariant, allowedTcbStatuses, allowedAdvisoryIds), atcbPolicy(teeVariant)getter and aTcbPolicySetevent, plus aPolicyChangedaudit entry.tcbStatus == "UpToDate", with advisories unchecked. Existing proxies therefore decide exactly as before.isAppAllowed,isKmsAllowed,authorizeApp,authorizeKmsandAppInfoare unchanged. Storage is appended, and each gap shrinks by one slot.nextDstackKmsDstackKmsV2DstackAppNot in this PR: NitroTPM still reports a hard-coded
UpToDate(verifier/src/verification.rs). It can report an empty status once adstack-aws-nitro-tpmrule is deployed; until then, dropping it would break NitroTPM boots under the default rule.Verification
forge build --sizesgives the sizes above.forge clean && forge test --ffi: 119 passed, including the OpenZeppelin upgrade-safety validation. The two new tests cover the per-platform rule, the default, legacy callers, rule clearing, invalid input and access control.FOUNDRY_DYNAMIC_TEST_LINKING=false):DstackKmsSymbolicTest11/11,DstackAppSymbolicTest5/5.