feat(pedm): add version check API and signature check API#1343
Conversation
Let maintainers know that an action is required on their side
|
5877b6f to
08b7868
Compare
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
By the way, in the Gateway we use the CARGO_PKG_VERSION env variable that is available at compile time:
This is replaced by, e.g., "2025.1.5", at compile time. I think I prefer that, unless there is a reason to stick to the runtime extraction from the executable?
Approving now to smooth the process for you.
08b7868 to
c51cd9c
Compare
c51cd9c to
e8dab4f
Compare
Yes, as I wrote on Slack because we are in a crate that gives use the crate version I do understand the alternative approach of using the build.rs to properly embed the version number in the crate, as also proposed by Allan Zhang (@allan2). Honestly I'm not sure which way I prefer. Part of this is my own background: coming from a C/C++/C# perspective, the proper way to do this is to query the main module version. i.e. In C# you'd do But I do understand it's probably more idiomatic in rust to use a CARGO variable. For now, I leave this like it is; but I'm not opposed to someone changing that to the alternative approach. |
That’s a fair point. Anyway, now we have the function, we can use it 😉 |
Add a new policy option
target_must_be_signed; this forces the target executable to have a valid auhenticode signature as per the policy.Realistically, this should be a "rule" so I'm probably introducing some slight technical debt here but I believe it's a worthwhile feature and a low-hanging fruit we can squeeze in for the release.
Add the application (Agent) version to the "About" API endpoint. This is for future proofing: RDM needs a way to know what version of PEDM he's talking to, in case we add/remove/change APIs.
The implementation is in Win32 and I believe it to be correct, but it could use some close scrutiny.
I generated the OpenAPI in a. separate commit for easier reviewing.