tenant fixes
This commit is contained in:
@@ -12,6 +12,7 @@ using Serilog.Events;
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using StellaOps.Auth.Client;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Auth.ServerIntegration.Tenancy;
|
||||
using StellaOps.Authority.Persistence.Postgres.Repositories;
|
||||
using StellaOps.Concelier.Core.Linksets;
|
||||
using StellaOps.Configuration;
|
||||
@@ -549,6 +550,7 @@ builder.Services.AddSingleton<IAdvisoryLinksetQueryService>(sp =>
|
||||
return new NullAdvisoryLinksetQueryService();
|
||||
});
|
||||
|
||||
builder.Services.AddStellaOpsTenantServices();
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
|
||||
builder.TryAddStellaOpsLocalBinding("scanner");
|
||||
@@ -627,6 +629,7 @@ app.UseExceptionHandler(errorApp =>
|
||||
app.UseStellaOpsCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseStellaOpsTenantMiddleware();
|
||||
|
||||
// Stella Router integration - enables request dispatch from Router to ASP.NET endpoints
|
||||
app.TryUseStellaRouter(routerEnabled);
|
||||
@@ -641,7 +644,7 @@ app.MapHealthEndpoints();
|
||||
app.MapObservabilityEndpoints();
|
||||
app.MapOfflineKitEndpoints();
|
||||
|
||||
var apiGroup = app.MapGroup(resolvedOptions.Api.BasePath);
|
||||
var apiGroup = app.MapGroup(resolvedOptions.Api.BasePath).RequireTenant();
|
||||
|
||||
if (app.Environment.IsEnvironment("Testing"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user