-
Notifications
You must be signed in to change notification settings - Fork 21
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
Proposal 114: Add support for multiple API versions to the agent #115
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds the proposal to add support for multiple API versions to the agent to make it backwards compatible. Resolves keylime#114 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
requested review from
mpeters,
galmasi,
maugustosilva,
THS-on and
aplanas
October 16, 2024 16:49
Generally LGTM. Especially for the push model having the We already give the verifier the supported agent API version via the tenant, so we then need to implement some logic in the tenant to find the latest version supported by both. |
THS-on
approved these changes
Oct 31, 2024
@THS-on Thank you for the review! I'll merge this as it is, we can modify it in future if necessary. |
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Nov 1, 2024
Make the agent to provide the endpoints under multiple API versions (currently only under versions 2.1 and 2.2). A new configuration option is introduced, 'api_versions', which allows the user to set the API versions to enable. Only a subset of the versions defined in api::SUPPORTED_API_VERSIONS can be enabled. If a unsupported version is set in the configuration, it will be ignored with a warning. The agent will fail to start if no valid API versions list is configured. The 'api_versions' option supports 2 keywords that can be used instead of the explicit list of versions: - "default": Enables all the supported API versions - "latest": Enables only the latest supported API version This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
28 tasks
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 18, 2024
Make the agent to provide the endpoints under multiple API versions (currently only under versions 2.1 and 2.2). A new configuration option is introduced, 'api_versions', which allows the user to set the API versions to enable. Only a subset of the versions defined in api::SUPPORTED_API_VERSIONS can be enabled. If a unsupported version is set in the configuration, it will be ignored with a warning. The agent will fail to start if no valid API versions list is configured. The 'api_versions' option supports 2 keywords that can be used instead of the explicit list of versions: - "default": Enables all the supported API versions - "latest": Enables only the latest supported API version This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 18, 2024
The registrar_client module implements the builder pattern to allow setting the optional parameters as needed. This also implements the mechanism to allow the agent to communicate with the registrar that support different API versions: - The client will make a GET request to the '/version' endpoint of the registrar. If the request is successful, the client will use the provided API version if it is enabled. - If the registrar does not support the '/version' endpoint, the client will try to register using each of the enabled API versions, starting from the latest. If none of the enabled versions is supported by the registrar, the registration fails. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 18, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 18, 2024
The registrar_client module implements the builder pattern to allow setting the optional parameters as needed. This also implements the mechanism to allow the agent to communicate with the registrar that support different API versions: - The client will make a GET request to the '/version' endpoint of the registrar. If the request is successful, the client will use the provided API version if it is enabled. - If the registrar does not support the '/version' endpoint, the client will try to register using each of the enabled API versions, starting from the latest. If none of the enabled versions is supported by the registrar, the registration fails. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 18, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 19, 2024
The registrar_client module implements the builder pattern to allow setting the optional parameters as needed. This also implements the mechanism to allow the agent to communicate with the registrar that support different API versions: - The client will make a GET request to the '/version' endpoint of the registrar. If the request is successful, the client will use the provided API version if it is enabled. - If the registrar does not support the '/version' endpoint, the client will try to register using each of the enabled API versions, starting from the latest. If none of the enabled versions is supported by the registrar, the registration fails. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 19, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 20, 2024
Make the agent to provide the endpoints under multiple API versions (currently only under versions 2.1 and 2.2). A new configuration option is introduced, 'api_versions', which allows the user to set the API versions to enable. Only a subset of the versions defined in api::SUPPORTED_API_VERSIONS can be enabled. If a unsupported version is set in the configuration, it will be ignored with a warning. The agent will fail to start if no valid API versions list is configured. The 'api_versions' option supports 2 keywords that can be used instead of the explicit list of versions: - "default": Enables all the supported API versions - "latest": Enables only the latest supported API version This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 20, 2024
The registrar_client module implements the builder pattern to allow setting the optional parameters as needed. This also implements the mechanism to allow the agent to communicate with the registrar that support different API versions: - The client will make a GET request to the '/version' endpoint of the registrar. If the request is successful, the client will use the provided API version if it is enabled. - If the registrar does not support the '/version' endpoint, the client will try to register using each of the enabled API versions, starting from the latest. If none of the enabled versions is supported by the registrar, the registration fails. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 20, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/keylime
that referenced
this pull request
Dec 20, 2024
The introduced configuraton option allows the user to select a subset of the supported API versions to enable. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 20, 2024
Validate the values set in the `api_versions` configuration option, and filter only the supported versions. The configured versions are also sorted so that the agent can try the enabled versions from the newest to the oldest. If none of the configured options are supported, fallback to use all the supported API versions instead. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to keylime/keylime
that referenced
this pull request
Dec 23, 2024
The introduced configuraton option allows the user to select a subset of the supported API versions to enable. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
Make the agent to provide the endpoints under multiple API versions (currently only under versions 2.1 and 2.2). A new configuration option is introduced, 'api_versions', which allows the user to set the API versions to enable. Only a subset of the versions defined in api::SUPPORTED_API_VERSIONS can be enabled. If a unsupported version is set in the configuration, it will be ignored with a warning. The agent will fail to start if no valid API versions list is configured. The 'api_versions' option supports 2 keywords that can be used instead of the explicit list of versions: - "default": Enables all the supported API versions - "latest": Enables only the latest supported API version This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
The registrar_client module implements the builder pattern to allow setting the optional parameters as needed. This also implements the mechanism to allow the agent to communicate with the registrar that support different API versions: - The client will make a GET request to the '/version' endpoint of the registrar. If the request is successful, the client will use the provided API version if it is enabled. - If the registrar does not support the '/version' endpoint, the client will try to register using each of the enabled API versions, starting from the latest. If none of the enabled versions is supported by the registrar, the registration fails. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
Validate the values set in the `api_versions` configuration option, and filter only the supported versions. The configured versions are also sorted so that the agent can try the enabled versions from the newest to the oldest. If none of the configured options are supported, fallback to use all the supported API versions instead. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
Use the keylime::registrar_client module instead of the registrar_agent, which is deleted. This enables the agent to communicate with a registrar using an older API version, restoring the backwards compatibility. This also removes the unnecessary `API_VERSION` from `common.rs`. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
ansasaki
added a commit
to ansasaki/rust-keylime
that referenced
this pull request
Dec 23, 2024
Validate the values set in the `api_versions` configuration option, and filter only the supported versions. The configured versions are also sorted so that the agent can try the enabled versions from the newest to the oldest. If none of the configured options are supported, fallback to use all the supported API versions instead. This is part of the implementation of the enhancement proposal 114: keylime/enhancements#115 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 adds the proposal to add support for multiple API versions to the agent to make it backwards compatible.
Resolves #114