Skip to content

Add authentication module implementing the challenge-response protocol#1094

Merged
sergio-correia merged 3 commits intokeylime:masterfrom
sergio-correia:pop-challenge
Aug 29, 2025
Merged

Add authentication module implementing the challenge-response protocol#1094
sergio-correia merged 3 commits intokeylime:masterfrom
sergio-correia:pop-challenge

Conversation

@sergio-correia
Copy link
Copy Markdown
Contributor

@sergio-correia sergio-correia commented Aug 28, 2025

Add authentication module implementing the challenge-response protocol
from Keylime Enhancement 103 [1].

Provides the two-step auth flow with session token management, mock TPM
operations, and error handling.

[1] https://github.com/keylime/enhancements/blob/master/103_agent-driven-attestation.md#challengeresponse-protocol-for-agent-authentication

@sergio-correia sergio-correia marked this pull request as draft August 28, 2025 14:17
@sergio-correia sergio-correia force-pushed the pop-challenge branch 2 times, most recently from 32e944d to 940b360 Compare August 28, 2025 15:48
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 44.04332% with 155 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.36%. Comparing base (5daecb2) to head (7e55b31).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
keylime-push-model-agent/src/auth.rs 41.92% 151 Missing ⚠️
keylime-push-model-agent/src/struct_filler.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
e2e-testsuite 58.36% <44.04%> (-0.39%) ⬇️
upstream-unit-tests 58.36% <44.04%> (-0.39%) ⬇️

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

Files with missing lines Coverage Δ
keylime-push-model-agent/src/main.rs 40.00% <ø> (ø)
keylime/src/tpm.rs 67.69% <100.00%> (+0.16%) ⬆️
keylime-push-model-agent/src/struct_filler.rs 23.82% <0.00%> (+0.20%) ⬆️
keylime-push-model-agent/src/auth.rs 41.92% <41.92%> (ø)

... and 5 files with indirect coverage changes

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

@sergio-correia sergio-correia changed the title Implement the challenge–response protocol for agent authentication Add authentication module implementing the challenge-response protocol Aug 29, 2025
@sergio-correia sergio-correia marked this pull request as ready for review August 29, 2025 09:18
Copy link
Copy Markdown
Contributor

@sarroutbi sarroutbi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@ansasaki ansasaki left a comment

Choose a reason for hiding this comment

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

LGTM!

In here we refactor certify_credential_with_iak() into a more generic
certify_credential() which is able to certify a credential using
TPM2_Certify and sign it with the key passed as an argument.

We then implement certify_credential_with_iak() in terms of this new
function.

Signed-off-by: Sergio Correia <scorreia@redhat.com>
As we will soon start using these structs in the challenge-response
protocol implementation, let's rename some of them to improve
readability.

- SessionRequestAuthSupported  -> SupportedAuthMethod
- SessionIdRequestAuthProvidedData -> ProofOfPossession
- SessionIdRequestAtttributes -> SessionUpdateAttributes
- SessionIdResponseAtttributes -> AuthenticationResultAttributes

Signed-off-by: Sergio Correia <scorreia@redhat.com>
Add authentication module implementing the challenge-response protocol
from Keylime Enhancement 103.

Provides the two-step auth flow with session token management, mock TPM
operations, and error handling.

Signed-off-by: Sergio Correia <scorreia@redhat.com>
@sergio-correia sergio-correia merged commit c090a14 into keylime:master Aug 29, 2025
12 of 13 checks passed
@sergio-correia sergio-correia deleted the pop-challenge branch August 29, 2025 15:16
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.

3 participants