fix: fix derive key and update remote attestation #2303
Merged
+407
−30
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.
Relates to
Re-implements #2039 and updates Remote Attestations to have more content to ensure older generated RA Quotes cannot be used to as a fake verifiable quote.
Risks
Low
Background
Currently, the derive key function will use the
WALLET_SECRET_SALT
to generate a key for the agent. This is okay for single agent deployments, but the subject field is used for the certificate chain and will not generate a new key if theWALLET_SECRET_SALT
is changed during an upgrade. This change moves theWALLET_SECRET_SALT
to thepath
parameter and uses thesubject
parameter to define the type of wallet (i.e solana, evm).Another problem with the current remote attestations is that not enough content is added to the RA Quote
reportData
parameter. Currently, we only include theagentId
and this will become troublesome bc anyone can repurpose the quote to fool users into believing the quote generated is valid.What does this PR do?
This PR fixes the derive key function for solana and evm chains to generate a new keypair when the
WALLET_SECRET_SALT
is changed and provides clarity on the parameters.For RA, this fix will add the message contents to the RA Quote to give more verifiability into a quote so users cannot take an existing remote attestation and repurpose it for malicious reasons.
What kind of change is this?
improvements and fixes
Documentation changes needed?
Updated the TEE Docs in PR
Testing
Where should a reviewer start?
Detailed testing steps