Integrate strict Windows MSI manifests tenant catalog and SYSTEM package policy
Rust development slice / linux (push) Failing after 7s

This commit is contained in:
2026-11-14 12:04:36 +01:00
parent 9ddb18d9e0
commit 9d98d0c603
17 changed files with 1171 additions and 24 deletions
+15 -1
View File
@@ -24,6 +24,10 @@ pub struct AptRecipe {
}
pub fn routes(r: Router<crate::State>) -> Router<crate::State> {
r.route(
"/api/v1/tenants/{tenant}/windows-msi-recipes",
get(crate::windows_msi_catalog::list).post(crate::windows_msi_catalog::import),
)
.route(
"/api/v1/tenants/{tenant}/package-recipes",
get(list).post(import),
)
@@ -43,6 +47,15 @@ pub async fn references(
tx: &mut Transaction<'_, Postgres>,
action: &rmm_domain::jobs::Action,
) -> Result<Vec<rmm_domain::jobs::RecipeReference>, Error> {
if let Some(manifest) = action.windows_msi() {
if !action.validate() {
return Err(Error(
StatusCode::BAD_REQUEST,
"INVALID_WINDOWS_MSI_MANIFEST",
));
}
return crate::windows_msi_catalog::references(tx, manifest).await;
}
let manifest = match action {
rmm_domain::jobs::Action::EnsurePackage {
apt_manifest: Some(m),
@@ -138,7 +151,7 @@ pub async fn references(
references.dedup();
Ok(references)
}
async fn context<'a>(
pub(crate) async fn context<'a>(
s: &'a crate::State,
h: &HeaderMap,
t: Uuid,
@@ -182,6 +195,7 @@ pub async fn import(
installation_context: recipe.installation_context.clone(),
recipe_id: None,
apt_manifest: None,
windows_msi_manifest: None,
};
if recipe.schema_version != 1
|| recipe.reboot_policy != "never"