tenant fixes
This commit is contained in:
@@ -13,6 +13,7 @@ using Serilog.Events;
|
||||
using StellaOps.AirGap.Policy;
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Auth.ServerIntegration.Tenancy;
|
||||
using StellaOps.Configuration;
|
||||
using StellaOps.Registry.TokenService;
|
||||
using StellaOps.Registry.TokenService.Admin;
|
||||
@@ -98,6 +99,7 @@ builder.Services.AddStellaOpsResourceServerAuthentication(
|
||||
}
|
||||
});
|
||||
|
||||
builder.Services.AddStellaOpsTenantServices();
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
builder.Services.AddAuthorization(options =>
|
||||
{
|
||||
@@ -135,6 +137,7 @@ app.UseSerilogRequestLogging();
|
||||
app.UseStellaOpsCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseStellaOpsTenantMiddleware();
|
||||
app.TryUseStellaRouter(routerEnabled);
|
||||
|
||||
app.MapHealthChecks("/healthz");
|
||||
@@ -207,7 +210,8 @@ app.MapGet("/token", (
|
||||
.RequireAuthorization("registry.token.issue")
|
||||
.Produces(StatusCodes.Status200OK)
|
||||
.ProducesProblem(StatusCodes.Status400BadRequest)
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden);
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden)
|
||||
.RequireTenant();
|
||||
|
||||
app.TryRefreshStellaRouterEndpoints(routerEnabled);
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user