up
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using StellaOps.Signer.Infrastructure;
|
||||
using StellaOps.Signer.Infrastructure.Options;
|
||||
using StellaOps.Signer.WebService.Endpoints;
|
||||
using StellaOps.Signer.WebService.Security;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddLogging();
|
||||
builder.Services.AddAuthentication(StubBearerAuthenticationDefaults.AuthenticationScheme)
|
||||
.AddScheme<AuthenticationSchemeOptions, StubBearerAuthenticationHandler>(
|
||||
StubBearerAuthenticationDefaults.AuthenticationScheme,
|
||||
_ => { });
|
||||
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
builder.Services.AddSignerPipeline();
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using StellaOps.Signer.Infrastructure;
|
||||
using StellaOps.Signer.Infrastructure.Options;
|
||||
using StellaOps.Signer.WebService.Endpoints;
|
||||
using StellaOps.Signer.WebService.Security;
|
||||
using StellaOps.Cryptography.DependencyInjection;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddLogging();
|
||||
builder.Services.AddAuthentication(StubBearerAuthenticationDefaults.AuthenticationScheme)
|
||||
.AddScheme<AuthenticationSchemeOptions, StubBearerAuthenticationHandler>(
|
||||
StubBearerAuthenticationDefaults.AuthenticationScheme,
|
||||
_ => { });
|
||||
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
builder.Services.AddSignerPipeline();
|
||||
builder.Services.Configure<SignerEntitlementOptions>(options =>
|
||||
{
|
||||
options.Tokens["valid-poe"] = new SignerEntitlementDefinition(
|
||||
@@ -30,14 +31,15 @@ builder.Services.Configure<SignerReleaseVerificationOptions>(options =>
|
||||
{
|
||||
options.TrustedScannerDigests.Add("sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
|
||||
});
|
||||
builder.Services.Configure<SignerCryptoOptions>(_ => { });
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapGet("/", () => Results.Ok("StellaOps Signer service ready."));
|
||||
builder.Services.Configure<SignerCryptoOptions>(_ => { });
|
||||
builder.Services.AddStellaOpsCryptoRu(builder.Configuration, CryptoProviderRegistryValidator.EnforceRuLinuxDefaults);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapGet("/", () => Results.Ok("StellaOps Signer service ready."));
|
||||
app.MapSignerEndpoints();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user