-
Notifications
You must be signed in to change notification settings - Fork 65
Move reusable code from keylime-agent
to the keylime
library
#1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The tests need to be updated to allow debug messages coming from the library. I proposed the PR RedHat-SP-Security/keylime-tests#779 making that change. I temporarily changed the tests to use that PR code to confirm it is the only required change |
/packit retest-failed |
The updated tests were merged and I dropped the temporary commit changing the location of the tests. |
@sergio-correia @sarroutbi I think the coverage for the |
@@ -0,0 +1,210 @@ | |||
// SPDX-License-Identifier: Apache-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is file header necessary? I have not included it in the latest changes but I doubt if it should be added or not. If so, I will create an additional PR for the ones that don't contain it
@@ -0,0 +1,87 @@ | |||
use serde::{Deserialize, Serialize}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to homogeneize files and and/remove license header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments regarding file headers (we should homogeneize them, but it can be done in a different PR). Rest of changes LGTM
Move the permissions code to the library as the permissions module. Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
The following changes were made: - Moved keylime/src/global_config.rs to keylime/src/config/errors.rs - Moved keylime-agent/src/config.rs to keylime/src/config/base.rs - Moved the EnvConfig structure to the dedicated file keylime/src/config/env.rs - Moved the SUPPORTED_API_VERSIONS value from keylime-agent/src/api.rs to keylime/src/config/base.rs - Added temporary values for DEFAULT_PUSH_API_VERSIONS and DEFAULT_PUSH_EK_HANDLE in keylme/src/config/push_model.rs - Modified other files as necessary Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Add specific error type ContextInfoError for the context_info module and remove the usage of expect() to avoid panic. Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
The structures APIVersion defined in common.rs was equivalent to the Version structure defined in the library. Remove APIVersion in favor of the Version structure from the library. Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Move the tests related to the AgentData structure from the keylime-agent/src/common.rs to keylime/src/agent_data.rs Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Move the JsonWrapper structure from common.rs to the library, effectively making the common.rs empty. Remove the common.rs file. Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@sarroutbi Hi, could you please take a look again? I added a specific error type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This moves the code that can be used by other applications, such as the push-attestation prototype, to the
keylime
library.