Files
Alphaeus Mote c1a5200ca3 test(security): sealed messaging end to end over a real NATS server
The real backend (messaging workers, command dispatcher, message security,
enrollment) hosted against the live NATS with its own SQLite database, and
agents enrolled through the real bootstrap endpoint running the agent's own
command processor, publisher, file listener and request link. A raw client
watches the wire and replays, tampers with and injects messages:

- a queued script sealed and signed by the server runs; its output and
  states come back sealed and signed by the device and are stored
- a replayed command runs once, an expired one and four tampered copies are
  refused (the untampered copy then runs)
- tampered, forged, foreign and replayed job states and output are refused
  by the server
- the CLI run and the Agent Settings pull are sealed both ways; a captured
  request sent again gets no answer
- a sealed file transfer round-trips intact while duplicated, reordered and
  forged frames are injected both ways
- a key rotation reaches the agent as a queued command; both keys work
- Require Sealed Agents refuses a v1 agent's presence, job states and
  requests, and sends it nothing
- a script at the library's limit: sent sealed, or refused with the sizes
  when the NATS server is at its 1 MB default

The unsealed pipeline test now makes the command stream as the backend does
(file storage), so both can share one server. All skip without NATS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:55:39 -05:00

27 lines
916 B
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NATS.Net" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Agent\Agent.csproj" />
<ProjectReference Include="..\..\src\Backend\Backend.csproj" />
</ItemGroup>
</Project>