Organize device inventory by customer and restrict token access to its audience

This commit is contained in:
2026-11-17 21:55:24 +01:00
parent aeb9adc649
commit 0afaca1d64
39 changed files with 1950 additions and 225 deletions
@@ -54,6 +54,10 @@ impl UpdateArtifacts {
profile == "development",
"update object adapter is development-only"
);
Self::private_directory(root, owner)
}
pub(crate) fn private_directory(root: PathBuf, owner: u32) -> Result<Self> {
match fs::create_dir(&root) {
Ok(()) => fs::set_permissions(&root, fs::Permissions::from_mode(0o700))?,
Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => {}