Skip to content

Conversation

@sarroutbi
Copy link
Contributor

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.

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<Utc>>: 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<Utc>>: 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.

Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
@sarroutbi sarroutbi force-pushed the 202507111059-add-pending-fields-on-capabilities-negotiation branch from e346e35 to d598a16 Compare July 11, 2025 09:15
@codecov
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.52%. Comparing base (3c411a5) to head (d598a16).
Report is 1 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
e2e-testsuite 58.52% <ø> (-0.02%) ⬇️
upstream-unit-tests 58.52% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
keylime/src/structures/capabilities_negotiation.rs 75.00% <ø> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sarroutbi sarroutbi requested review from ansasaki, Copilot and sergio-correia and removed request for Copilot July 11, 2025 10:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Enhance the capabilities negotiation response by aligning the Rust structs with the protocol spec to include two new timestamps and updating tests to cover their serialization.

  • Added capabilities_received_at and challenges_expire_at fields to ResponseAttributes
  • Updated unit tests to include the new fields in JSON serialization/deserialization
Comments suppressed due to low confidence (2)

keylime/src/structures/capabilities_negotiation.rs:100

  • [nitpick] Consider adding doc comments above these new fields to explain their purpose and usage according to the protocol specification.
    pub capabilities_received_at: Option<DateTime<Utc>>,

keylime/src/structures/capabilities_negotiation.rs:686

  • Add tests for the case where these fields are None to verify that they are omitted in the serialized JSON and deserialized back as None.
                    capabilities_received_at: Some("2025-07-11T08:49:51.734539Z".parse().unwrap()), //#[allow_ci]

@ansasaki ansasaki merged commit 6fea7fa into keylime:master Jul 11, 2025
15 checks passed
@sarroutbi sarroutbi deleted the 202507111059-add-pending-fields-on-capabilities-negotiation branch July 11, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants