-
Notifications
You must be signed in to change notification settings - Fork 276
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
Customizing system info #262
Comments
Current situation of system info related logicCurrently, due to various historical reasons, the following system information is involved in the entire cyfs-services 1. stack.util.get_system_info logicSupport the same zone query system info, using the global single instance CYFS/src/component/cyfs-util/src/util/system_info.rs Lines 6 to 37 in 3cd354a
2. ood-control's system info logicThis logic is consistent with the above, both use the global singleton CYFS/src/service/ood-control/src/http_server.rs Lines 178 to 189 in 3cd354a
3. ood-control's check logicIt is used to check whether the current stack has bound the identity(device.desc & device.sec), and return some information about the current system, but the difference is that a new structure is used to express the information CYFS/src/service/ood-control/src/request.rs Lines 6 to 18 in 3cd354a
It partially uses the fields in the system info, but does not use the SYSTEM_INFO_MANAGER global singleton, and there are some fields and the above two points in the system info is not the same Solutions to considerSo from the above logic can be seen, if we need to support external custom information, then it is better to improve the implementation of the global singleton 1. SYSTEM_INFO_MANAGER support for adding custom informationWhen used externally, the existing fields in the custom information will take precedence over the fields generated by the internal logic 2. improve the device_info returned by the check logic of ood-controldevice_info involves system info related fields, which also need to follow SYSTEM_INFO_MANAGER 3.
|
The user-defined system information part of the fields, we can consider two approaches
At present, according to the product feedback on the use of scenarios, the second mode can be supported first, and then consider adding the first mode as needed |
Already based on mode 2, add CYFS/src/tests/cyfs-stack-test/src/case/util.rs Lines 204 to 222 in 9eaf33f
|
Currently ood-control and cyfs-stack util both support returning some information about the current system, including hardware information and other key information, but this information is not well supported by some system environments, and some environments, such as running in docker, may lead to incorrect information, so consider providing users with the ability to customize some information such as Hardware information can be provided as a patch for "system information" under certain circumstances.
The text was updated successfully, but these errors were encountered: