Adds bundled plugin trust and cross-platform native deployment

- embeds the append-only historical and deny trust lists in the API and marks matching bundled plugins as Official without blocking loading
- builds and records the current plugin manifest only for official release builds
- deploys the PDF native libraries for the supported Linux, macOS and Windows runtimes from the plugin dependency manifest
- records release hashes by appending only missing entries to master's manifest and rejects any diff that removes a line
- documents the release flow, the supported runtimes and the plugin installer limits
This commit is contained in:
BinaryAlley committed 2026-11-28 18:00:00 +02:00
1 parent 3fb8912c7f
commit b30cbd6b9e
114 files changed
+2708 -243

No files matched your search

@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -29,6 +29,7 @@ public class PluginResponseFixture
/// <param name="loadStatus">Optional. The load status of the plugin.</param>
/// <param name="loadError">Optional. The error message when the plugin failed to load.</param>
/// <param name="settings">Optional. The settings of the plugin.</param>
/// <param name="isOfficial">Optional. Whether the plugin matches a trusted bundled plugin binary.</param>
/// <returns>The created <see cref="PluginResponse"/>.</returns>
public PluginResponse Create(
Guid? id = null,
@@ -38,7 +39,8 @@ public class PluginResponseFixture
string? description = null,
PluginLoadStatus? loadStatus = null,
string? loadError = null,
IReadOnlyDictionary<string, string>? settings = null)
IReadOnlyDictionary<string, string>? settings = null,
bool isOfficial = false)
{
return new PluginResponse(
id ?? Guid.NewGuid(),
@@ -51,7 +53,8 @@ public class PluginResponseFixture
settings ?? new Dictionary<string, string>
{
[_faker.Lorem.Word()] = _faker.Lorem.Word()
}
},
isOfficial
);
}
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -18,7 +17,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\plugins\Nemera.Plugins.Pdf\Nemera.Plugins.Pdf.csproj" />
<ProjectReference Include="..\..\..\src\Nemera.Plugins.Contracts\Nemera.Plugins.Contracts.csproj" />
<ProjectReference Include="..\..\Common\Nemera.Contracts.Fixtures\Nemera.Contracts.Fixtures.csproj" />
</ItemGroup>
@@ -0,0 +1,27 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Security.Cryptography;
#endregion
namespace Nemera.Presentation.Api.Fixtures.Core.Plugins;
/// <summary>
/// Fixture class for computing the SHA-256 checksums of bundled plugin files.
/// </summary>
[ExcludeFromCodeCoverage]
public class BundledPluginFileHashFixture
{
/// <summary>
/// Computes the SHA-256 checksum of the file at <paramref name="path"/>, in the uppercase hexadecimal form the trust manifest uses.
/// </summary>
/// <param name="path">The path of the file to hash.</param>
/// <returns>The uppercase hexadecimal SHA-256 checksum.</returns>
public string Create(string path)
{
// Convert.ToHexString returns uppercase hexadecimal, which is the form the trust manifest uses.
using (FileStream fileStream = new(path, FileMode.Open, FileAccess.Read, FileShare.Read))
return Convert.ToHexString(SHA256.HashData(fileStream));
}
}
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -26,8 +26,9 @@ public class PluginDtoFixture
/// <param name="author">Optional author of the plugin.</param>
/// <param name="version">Optional version of the plugin.</param>
/// <param name="loadStatus">Optional load status of the plugin.</param>
/// <param name="isOfficial">Optional. Whether the plugin matches a trusted bundled plugin binary.</param>
/// <returns>A configured <see cref="PluginDto"/> instance.</returns>
public PluginDto Create(Guid? id = null, string? name = null, string? author = null, string? version = null, PluginLoadStatus? loadStatus = null)
public PluginDto Create(Guid? id = null, string? name = null, string? author = null, string? version = null, PluginLoadStatus? loadStatus = null, bool isOfficial = false)
{
return new PluginDto
{
@@ -38,7 +39,8 @@ public class PluginDtoFixture
Description = _faker.Lorem.Sentence(),
LoadStatus = loadStatus ?? PluginLoadStatus.Loaded,
LoadError = null,
Settings = null
Settings = null,
IsOfficial = isOfficial
};
}
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\web\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -4,7 +4,6 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\api\</BaseOutputPath>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>