5100* tests strengthtenen work

This commit is contained in:
StellaOps Bot
2025-12-24 12:38:34 +02:00
parent 9a08d10b89
commit 02772c7a27
117 changed files with 29941 additions and 66 deletions

View File

@@ -8,6 +8,7 @@ using StellaOps.PacksRegistry.WebService;
using StellaOps.PacksRegistry.WebService.Contracts;
using StellaOps.PacksRegistry.WebService.Options;
using Microsoft.Extensions.FileProviders;
using StellaOps.Router.AspNet;
var builder = WebApplication.CreateBuilder(args);
@@ -54,6 +55,13 @@ builder.Services.AddSingleton(TimeProvider.System);
builder.Services.AddHealthChecks();
// Stella Router integration
var routerOptions = builder.Configuration.GetSection("PacksRegistry:Router").Get<StellaRouterOptionsBase>();
builder.Services.TryAddStellaRouter(
serviceName: "packsregistry",
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
routerOptions: routerOptions);
var app = builder.Build();
if (app.Environment.IsDevelopment())
@@ -62,6 +70,7 @@ if (app.Environment.IsDevelopment())
}
app.MapHealthChecks("/healthz");
app.TryUseStellaRouter(routerOptions);
// Serve static OpenAPI stubs for packs APIs (until unified spec is generated)
var openApiDir = Path.Combine(app.Environment.ContentRootPath, "OpenApi");
@@ -713,6 +722,9 @@ app.MapGet("/api/v1/compliance/summary", async (string? tenant, ComplianceServic
.Produces(StatusCodes.Status401Unauthorized)
.Produces(StatusCodes.Status403Forbidden);
// Refresh Router endpoint cache
app.TryRefreshStellaRouterEndpoints(routerOptions);
app.Run();
static bool IsAuthorized(HttpContext context, AuthOptions auth, out IResult result)

View File

@@ -32,8 +32,7 @@
<ProjectReference Include="..\StellaOps.PacksRegistry.Infrastructure\StellaOps.PacksRegistry.Infrastructure.csproj"/>
<ProjectReference Include="..\..\..\__Libraries\StellaOps.Router.AspNet\StellaOps.Router.AspNet.csproj"/>
</ItemGroup>