search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -2,6 +2,7 @@
using StellaOps.AirGap.Controller.Endpoints.Contracts;
using StellaOps.AirGap.Controller.Security;
using StellaOps.AirGap.Controller.Services;
using static StellaOps.Localization.T;
using StellaOps.AirGap.Time.Models;
using StellaOps.AirGap.Time.Services;
using StellaOps.Auth.Abstractions;
@@ -21,22 +22,22 @@ internal static class AirGapEndpoints
group.MapGet("/status", HandleStatus)
.RequireAuthorization(AirGapPolicies.StatusRead)
.WithName("AirGapStatus")
.WithDescription("Returns the current air-gap seal status for the tenant including seal state, staleness evaluation, and content budget freshness. Requires airgap:status:read scope.");
.WithDescription(_t("airgap.status.get_description"));
group.MapPost("/seal", HandleSeal)
.RequireAuthorization(AirGapPolicies.Seal)
.WithName("AirGapSeal")
.WithDescription("Seals the air-gap environment for the tenant by recording a policy hash, time anchor, and staleness budget. Returns the updated seal status including staleness evaluation. Requires airgap:seal scope.");
.WithDescription(_t("airgap.seal.description"));
group.MapPost("/unseal", HandleUnseal)
.RequireAuthorization(AirGapPolicies.Seal)
.WithName("AirGapUnseal")
.WithDescription("Unseals the air-gap environment for the tenant, allowing normal connectivity. Returns the updated unsealed status. Requires airgap:seal scope.");
.WithDescription(_t("airgap.unseal.description"));
group.MapPost("/verify", HandleVerify)
.RequireAuthorization(AirGapPolicies.Verify)
.WithName("AirGapVerify")
.WithDescription("Verifies the current air-gap state against a provided policy hash and deterministic replay evidence. Returns a verification result indicating whether the seal state matches the expected evidence. Requires airgap:verify scope.");
.WithDescription(_t("airgap.verify.description"));
return group;
}

View File

@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authentication;
using StellaOps.Auth.Abstractions;
using StellaOps.Localization;
using StellaOps.Auth.ServerIntegration;
using StellaOps.Auth.ServerIntegration.Tenancy;
using StellaOps.AirGap.Controller.Auth;
@@ -33,6 +34,9 @@ builder.Services.AddAirGapController(builder.Configuration);
builder.Services.AddStellaOpsTenantServices();
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
builder.Services.AddStellaOpsLocalization(builder.Configuration);
builder.Services.AddTranslationBundle(System.Reflection.Assembly.GetExecutingAssembly());
// Stella Router integration
var routerEnabled = builder.Services.AddRouterMicroservice(
builder.Configuration,
@@ -44,14 +48,18 @@ var app = builder.Build();
app.LogStellaOpsLocalHostname("airgap-controller");
app.UseStellaOpsCors();
app.UseStellaOpsLocalization();
app.UseAuthentication();
app.UseAuthorization();
app.UseStellaOpsTenantMiddleware();
app.TryUseStellaRouter(routerEnabled);
await app.LoadTranslationsAsync();
app.MapAirGapEndpoints();
app.TryRefreshStellaRouterEndpoints(routerEnabled);
app.Run();
await app.RunAsync().ConfigureAwait(false);
// Expose Program class for WebApplicationFactory tests.
public partial class Program;

View File

@@ -11,6 +11,10 @@
<ProjectReference Include="../StellaOps.AirGap.Importer/StellaOps.AirGap.Importer.csproj" />
<ProjectReference Include="../../Authority/StellaOps.Authority/StellaOps.Auth.Abstractions/StellaOps.Auth.Abstractions.csproj" />
<ProjectReference Include="../../Authority/StellaOps.Authority/StellaOps.Auth.ServerIntegration/StellaOps.Auth.ServerIntegration.csproj" />
<ProjectReference Include="../../__Libraries/StellaOps.Localization/StellaOps.Localization.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Translations\*.json" />
</ItemGroup>
<PropertyGroup Label="StellaOpsReleaseVersion">
<Version>1.0.0-alpha1</Version>

View File

@@ -0,0 +1,8 @@
{
"_meta": { "locale": "en-US", "namespace": "airgap", "version": "1.0" },
"airgap.status.get_description": "Returns the current air-gap seal status for the tenant including seal state, staleness evaluation, and content budget freshness. Requires airgap:status:read scope.",
"airgap.seal.description": "Seals the air-gap environment for the tenant by recording a policy hash, time anchor, and staleness budget. Returns the updated seal status including staleness evaluation. Requires airgap:seal scope.",
"airgap.unseal.description": "Unseals the air-gap environment for the tenant, allowing normal connectivity. Returns the updated unsealed status. Requires airgap:seal scope.",
"airgap.verify.description": "Verifies the current air-gap state against a provided policy hash and deterministic replay evidence. Returns a verification result indicating whether the seal state matches the expected evidence. Requires airgap:verify scope."
}