fix(build): finalize ephemeral key options
CI - Build & Test / Backend (.NET) (push) Failing after 20s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 19s
CI - Build & Test / Frontend (Vue/TS) (push) Has been cancelled
CI - Build & Test / Security Check (push) Has been cancelled
CI - Build & Test / Deploy Nexus (push) Has been cancelled
CI - Build & Test / Backend (.NET) (push) Failing after 20s
CI - Build & Test / Backend integration (PostgreSQL/Toxiproxy) (push) Failing after 19s
CI - Build & Test / Frontend (Vue/TS) (push) Has been cancelled
CI - Build & Test / Security Check (push) Has been cancelled
CI - Build & Test / Deploy Nexus (push) Has been cancelled
This commit is contained in:
+10
-4
@@ -13,10 +13,6 @@ if (isOpenApiGeneration)
|
|||||||
// auth services, so use an ephemeral contract-only signing value.
|
// auth services, so use an ephemeral contract-only signing value.
|
||||||
builder.Configuration["Jwt:Key"] =
|
builder.Configuration["Jwt:Key"] =
|
||||||
"openapi-contract-generation-only-000000000000000000";
|
"openapi-contract-generation-only-000000000000000000";
|
||||||
builder.Services.AddDataProtection()
|
|
||||||
.UseEphemeralDataProtectionProvider();
|
|
||||||
builder.Services.Configure<KeyManagementOptions>(options =>
|
|
||||||
options.AutoGenerateKeys = false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Service Registration ---
|
// --- Service Registration ---
|
||||||
@@ -34,6 +30,16 @@ builder.Services.AddNexusHealthChecks(builder.Configuration);
|
|||||||
builder.Services.AddNexusPlatform(builder.Configuration);
|
builder.Services.AddNexusPlatform(builder.Configuration);
|
||||||
builder.Services.AddControllers(options =>
|
builder.Services.AddControllers(options =>
|
||||||
options.Filters.Add<NexusProblemDetailsFilter>());
|
options.Filters.Add<NexusProblemDetailsFilter>());
|
||||||
|
if (isOpenApiGeneration)
|
||||||
|
{
|
||||||
|
// Apply this after every framework service has registered its defaults.
|
||||||
|
// The contract host never accepts traffic and must not persist runtime
|
||||||
|
// key material as a side effect of schema extraction.
|
||||||
|
builder.Services.AddDataProtection()
|
||||||
|
.UseEphemeralDataProtectionProvider();
|
||||||
|
builder.Services.PostConfigure<KeyManagementOptions>(options =>
|
||||||
|
options.AutoGenerateKeys = false);
|
||||||
|
}
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user