keylime / rust-keylime

Rust implementation of the keylime agent
https://keylime.dev
Apache License 2.0
97 stars 50 forks source link

API version mismatch for emulated TPM setup #833

Open ramrattle opened 3 weeks ago

ramrattle commented 3 weeks ago

I was trying https://github.com/keylime/keylime-vagrant-ansible-tpm-emulator, the registar starts with the version 2.1 but the default API version that agent looks for is 2.2 in registar URI which is not there, so registration is failing

registrat

2024-08-22 10:13:21.527 - keylime.registrar - INFO - Current API version 2.1 2024-08-22 10:13:21.527 - keylime.registrar - INFO - Supported older API versions: 1.0, 2.0 2024-08-22 10:13:21.527 - keylime.registrar - INFO - Deprecated API versions (soon to be removed): 1.0

Agent

keylime_agent

Error: Registrar { addr: "http://127.0.0.1:8890/v2.2/agents/d432fbb3-d2f1-4a97-9ef7-75bd81c00000", code: 400 }

Agent code where api is hard coded pub const API_VERSION: &str = "v2.2";

solution : should we rebase the code for the emulator repo?

ansasaki commented 3 weeks ago

I'm not aware of that emulator. It seems it is using a very old version of keylime.

@mpeters Is that something we still maintain? If so, could you please check if it is possible to update Keylime there?