Integrate signed agent catalog, tenant enrollment and HTTPS installers
This commit is contained in:
@@ -52,6 +52,8 @@ pub enum Platform {
|
||||
LinuxX64,
|
||||
#[serde(rename = "x86_64-pc-windows-msvc")]
|
||||
WindowsX64,
|
||||
#[serde(rename = "x86_64-pc-windows-gnu")]
|
||||
WindowsGnuX64,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@@ -707,7 +709,7 @@ impl ResolvedAgentUpdate {
|
||||
pub fn execution_identity(&self) -> Option<&'static str> {
|
||||
self.manifest().ok().map(|m| match m.platform {
|
||||
Platform::LinuxX64 => "root",
|
||||
Platform::WindowsX64 => "system",
|
||||
Platform::WindowsX64 | Platform::WindowsGnuX64 => "system",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +66,7 @@ pub fn validate_for_scope(
|
||||
.map_err(|_| "INVALID_AGENT_UPDATE_OBSERVATION")?
|
||||
!= update
|
||||
|| !typed.agent_update.validate()
|
||||
|| typed.agent_update.platform
|
||||
!= if scope == "linux.base" {
|
||||
crate::agent_update::Platform::LinuxX64
|
||||
} else {
|
||||
crate::agent_update::Platform::WindowsX64
|
||||
}
|
||||
|| (typed.agent_update.platform == crate::agent_update::Platform::LinuxX64) != (scope == "linux.base")
|
||||
|| typed.agent_update.observed_at - now > chrono::Duration::seconds(45)
|
||||
|| now - typed.agent_update.observed_at > chrono::Duration::hours(72)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user