Add Capabilities Negotiations resp. missing fields #1046
Merged
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.
This change enhances the capabilities negotiation phase of the push-attestation protocol by adding two timestamp fields to the verifier's response: capabilities_received_at and challenges_expire_at.
This change aligns the Rust data structures with the complete protocol specification, allowing the agent to correctly deserialize and process the time-sensitive information sent by the verifier.
ResponseAttributes Struct Updated: The ResponseAttributes struct in keylime/src/structures/capabilities_negotiation.rs has been modified to include two new optional fields:
capabilities_received_at: Option<DateTime>: Records the exact time when the verifier processed the agent's initial capabilities request, establishing a baseline for the session.
challenges_expire_at: Option<DateTime>: Specifies the deadline by which the agent must generate and submit its evidence.
Unit Tests Updated: The serialization tests for AttestationResponse have been updated to include these new fields. This verifies that the Rust structs can correctly serialize and deserialize a JSON payload containing the new timestamps, ensuring compatibility with the verifier.