tenant fixes
This commit is contained in:
@@ -12,6 +12,7 @@ using Serilog.Events;
|
||||
using StellaOps.Audit.ReplayToken;
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using StellaOps.Auth.ServerIntegration;
|
||||
using StellaOps.Auth.ServerIntegration.Tenancy;
|
||||
using StellaOps.Router.AspNet;
|
||||
using StellaOps.AuditPack.Services;
|
||||
using StellaOps.Configuration;
|
||||
@@ -110,6 +111,7 @@ builder.Services.AddAuthorization(options =>
|
||||
});
|
||||
});
|
||||
|
||||
builder.Services.AddStellaOpsTenantServices();
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
|
||||
// Stella Router integration
|
||||
@@ -144,6 +146,7 @@ app.UseExceptionHandler(exceptionApp =>
|
||||
app.UseStellaOpsCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseStellaOpsTenantMiddleware();
|
||||
app.TryUseStellaRouter(routerEnabled);
|
||||
|
||||
app.MapHealthChecks("/healthz");
|
||||
@@ -199,7 +202,8 @@ app.MapPost("/v1/replay/tokens", Task<Results<Created<GenerateTokenResponse>, Pr
|
||||
.Produces(StatusCodes.Status201Created)
|
||||
.ProducesProblem(StatusCodes.Status400BadRequest)
|
||||
.ProducesProblem(StatusCodes.Status401Unauthorized)
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden);
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden)
|
||||
.RequireTenant();
|
||||
|
||||
// POST /v1/replay/tokens/verify - Verify a replay token
|
||||
app.MapPost("/v1/replay/tokens/verify", Task<Results<Ok<VerifyTokenResponse>, ProblemHttpResult>> (
|
||||
@@ -263,7 +267,8 @@ app.MapPost("/v1/replay/tokens/verify", Task<Results<Ok<VerifyTokenResponse>, Pr
|
||||
.Produces(StatusCodes.Status200OK)
|
||||
.ProducesProblem(StatusCodes.Status400BadRequest)
|
||||
.ProducesProblem(StatusCodes.Status401Unauthorized)
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden);
|
||||
.ProducesProblem(StatusCodes.Status403Forbidden)
|
||||
.RequireTenant();
|
||||
|
||||
// GET /v1/replay/tokens/{tokenValue} - Get token details (parse only)
|
||||
app.MapGet("/v1/replay/tokens/{tokenCanonical}", Task<Results<Ok<TokenInfoResponse>, NotFound, ProblemHttpResult>> (
|
||||
@@ -297,7 +302,8 @@ app.MapGet("/v1/replay/tokens/{tokenCanonical}", Task<Results<Ok<TokenInfoRespon
|
||||
.RequireAuthorization(ReplayReadPolicy)
|
||||
.Produces(StatusCodes.Status200OK)
|
||||
.Produces(StatusCodes.Status404NotFound)
|
||||
.ProducesProblem(StatusCodes.Status400BadRequest);
|
||||
.ProducesProblem(StatusCodes.Status400BadRequest)
|
||||
.RequireTenant();
|
||||
|
||||
// GET /.well-known/openapi - OpenAPI specification
|
||||
app.MapGet("/.well-known/openapi", (HttpContext context) =>
|
||||
|
||||
Reference in New Issue
Block a user