feat(eidas): Implement eIDAS Crypto Plugin with dependency injection and signing capabilities

- Added ServiceCollectionExtensions for eIDAS crypto providers.
- Implemented EidasCryptoProvider for handling eIDAS-compliant signatures.
- Created LocalEidasProvider for local signing using PKCS#12 keystores.
- Defined SignatureLevel and SignatureFormat enums for eIDAS compliance.
- Developed TrustServiceProviderClient for remote signing via TSP.
- Added configuration support for eIDAS options in the project file.
- Implemented unit tests for SM2 compliance and crypto operations.
- Introduced dependency injection extensions for SM software and remote plugins.
This commit is contained in:
master
2025-12-23 14:06:48 +02:00
parent ef933db0d8
commit 84d97fd22c
51 changed files with 4353 additions and 747 deletions

View File

@@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;
using StellaOps.Attestor;
using StellaOps.Scanner.Core.Configuration;
using StellaOps.Scanner.Reachability;
using StellaOps.Scanner.Reachability.Models;
using StellaOps.Attestor;
using StellaOps.Signals.Storage;
namespace StellaOps.Scanner.Worker.Orchestration;
@@ -42,7 +42,7 @@ public class PoEOrchestrator
/// <param name="cancellationToken">Cancellation token</param>
/// <returns>List of generated PoE hashes</returns>
public async Task<IReadOnlyList<PoEResult>> GeneratePoEArtifactsAsync(
ScanContext context,
PoEScanContext context,
IReadOnlyList<VulnerabilityMatch> vulnerabilities,
PoEConfiguration configuration,
CancellationToken cancellationToken = default)
@@ -129,8 +129,8 @@ public class PoEOrchestrator
/// Generate a single PoE artifact for a subgraph.
/// </summary>
private async Task<PoEResult> GenerateSinglePoEAsync(
Subgraph subgraph,
ScanContext context,
PoESubgraph subgraph,
PoEScanContext context,
PoEConfiguration configuration,
CancellationToken cancellationToken)
{
@@ -201,7 +201,7 @@ public class PoEOrchestrator
);
}
private string[] GenerateReproSteps(ScanContext context, Subgraph subgraph)
private string[] GenerateReproSteps(PoEScanContext context, PoESubgraph subgraph)
{
return new[]
{

View File

@@ -9,7 +9,7 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using StellaOps.Scanner.Core.Configuration;
using StellaOps.Scanner.Core.Contracts;
using StellaOps.Scanner.Reachability.Models;
using StellaOps.Attestor;
using StellaOps.Scanner.Worker.Orchestration;
namespace StellaOps.Scanner.Worker.Processing.PoE;
@@ -138,7 +138,7 @@ public sealed class PoEGenerationStageExecutor : IScanStageExecutor
}
}
private ScanContext BuildScanContext(ScanJobContext context)
private PoEScanContext BuildScanContext(ScanJobContext context)
{
// Extract scan metadata from job context
var scanId = context.ScanId;
@@ -169,7 +169,7 @@ public sealed class PoEGenerationStageExecutor : IScanStageExecutor
// Get configuration path
var configPath = "etc/scanner.yaml"; // Default
return new ScanContext(
return new PoEScanContext(
ScanId: scanId,
GraphHash: graphHash ?? "blake3:unknown",
BuildId: buildId ?? "gnu-build-id:unknown",

View File

@@ -33,5 +33,7 @@
<ProjectReference Include="../StellaOps.Scanner.Analyzers.Native/StellaOps.Scanner.Analyzers.Native.csproj" />
<ProjectReference Include="../../Unknowns/__Libraries/StellaOps.Unknowns.Core/StellaOps.Unknowns.Core.csproj" />
<ProjectReference Include="../../BinaryIndex/__Libraries/StellaOps.BinaryIndex.Core/StellaOps.BinaryIndex.Core.csproj" />
<ProjectReference Include="../../Attestor/StellaOps.Attestor/StellaOps.Attestor.Core/StellaOps.Attestor.Core.csproj" />
<ProjectReference Include="../../Signals/StellaOps.Signals/StellaOps.Signals.csproj" />
</ItemGroup>
</Project>