Skip to content

Conversation

@PeetMcK
Copy link

@PeetMcK PeetMcK commented Nov 16, 2025

Summary

Implements tar.gz archive delivery for macOS mesh agents with enhanced security features including SHA256 checksum verification and randomized filenames to prevent unwanted in-place upgrades.

Changes

Core Functionality

  • Archive Creation: Download both mesh binary and .msh configuration file from MeshCentral and compress as tar.gz
  • SHA256 Checksums: Generate SHA256SUMS file included in archive for integrity verification
  • Randomized Filenames: Add random 8-character suffix to mesh agent filenames to prevent unwanted in-place upgrades
  • Configuration Cleanup: Strip leading blank lines from .msh configuration files
  • Code Signature Preservation: Use clean binary URL format to download unmodified binaries that preserve code signatures

Client-Side Changes Required:
This requires corresponding changes in the rmmagent to handle the tar.gz archive and --copy-msh="1" installation. See: amidaware/rmmagent#68

Implementation Details

  • Added get_mesh_msh_url(): Constructs /meshsettings endpoint URL
  • Added download_mesh_agent_with_msh(): Downloads both files, creates tar.gz archive with checksums
  • Modified get_meshagent_url(): Added macOS-specific branch to use clean binary URL format (only id parameter) to preserve code signatures. Downloads unmodified binary from http://[mesh_server]/meshagents?id=10005 - mesh configuration provided separately via .msh file rather than embedded in binary by MeshCentral
  • Modified MeshExe.post() in apiv3/views.py: Use archive for darwin, single binary for windows

Files Modified

  • api/tacticalrmm/core/utils.py - Core download and archive functionality (+86 lines)
  • api/tacticalrmm/apiv3/views.py - Endpoint logic for archive delivery (+13 lines)
  • api/tacticalrmm/core/tests.py - Updated tests for simplified URL format (8 lines changed)

Test Plan

Completed Testing (macOS)

  • Verify mesh agent downloads complete successfully for macOS
  • Confirm tar.gz archive contains mesh binary, .msh config, and SHA256SUMS
  • Validate SHA256 checksums match downloaded files
  • Test that randomized filenames are generated properly (8-char suffix)
  • Confirm .msh files have leading blank lines stripped
  • Verify clean binary URL format preserves code signature integrity
  • Verified meshagent installation with no errors
  • Verified meshagent/tacticalrmm integration

Recommended Validations

  • Verify macOS functionality in your environment
  • Verify Windows agents have no regression
  • Verify Linux agents have no regression

Related PRs

🤖 Generated with Claude Code

PeetMcK and others added 4 commits November 12, 2025 14:53
For macOS agents, download both mesh binary and .msh configuration file from
MeshCentral, compress as tar.gz, and deliver via /api/v3/meshexe/ endpoint.

- Add get_mesh_msh_url(): constructs /meshsettings endpoint URL
- Add download_mesh_agent_with_msh(): downloads both files, creates tar.gz archive
- Modify MeshExe.post(): use archive for darwin, single binary for windows

Files changed:
- api/tacticalrmm/core/utils.py
- api/tacticalrmm/apiv3/views.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…d filenames

- Add SHA256SUMS file to tar.gz archive for integrity verification
- Generate random 8-char suffix for mesh agent filenames to prevent unwanted in-place upgrades
- Simplify macOS mesh agent URL format to use id=10005 directly
- Strip leading blank lines from .msh configuration files
- Update tests to reflect simplified URL format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Enhance macOS mesh agent download with SHA256 checksums and randomized filenames
@PeetMcK PeetMcK marked this pull request as ready for review November 16, 2025 02:17
@PeetMcK
Copy link
Author

PeetMcK commented Nov 24, 2025

Closing this PR - will recreate targeting main branch instead of develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant