e2e observation fixes
This commit is contained in:
@@ -491,7 +491,7 @@ public static class PlatformEndpoints
|
||||
|
||||
var summary = await service.GetSummaryAsync(requestContext!, cancellationToken).ConfigureAwait(false);
|
||||
return Results.Ok(BuildLegacyEntitlement(summary.Value, requestContext!));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/consumption", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -506,7 +506,7 @@ public static class PlatformEndpoints
|
||||
|
||||
var summary = await service.GetSummaryAsync(requestContext!, cancellationToken).ConfigureAwait(false);
|
||||
return Results.Ok(BuildLegacyConsumption(summary.Value));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/dashboard", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -528,7 +528,7 @@ public static class PlatformEndpoints
|
||||
activeAlerts = 0,
|
||||
recentViolations = 0
|
||||
});
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/history", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -570,7 +570,7 @@ public static class PlatformEndpoints
|
||||
points,
|
||||
aggregation = string.IsNullOrWhiteSpace(aggregation) ? "daily" : aggregation
|
||||
});
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/tenants", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -612,7 +612,7 @@ public static class PlatformEndpoints
|
||||
.ToArray();
|
||||
|
||||
return Results.Ok(new { items, total = 1 });
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/tenants/{tenantId}", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -655,7 +655,7 @@ public static class PlatformEndpoints
|
||||
},
|
||||
forecast = BuildLegacyForecast("api")
|
||||
});
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/forecast", async Task<IResult> (
|
||||
HttpContext context,
|
||||
@@ -673,7 +673,7 @@ public static class PlatformEndpoints
|
||||
|
||||
var forecasts = categories.Select(BuildLegacyForecast).ToArray();
|
||||
return Results.Ok(forecasts);
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapGet("/alerts", (HttpContext context, PlatformRequestContextResolver resolver) =>
|
||||
{
|
||||
@@ -694,7 +694,7 @@ public static class PlatformEndpoints
|
||||
channels = Array.Empty<object>(),
|
||||
escalationMinutes = 30
|
||||
}));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
quotas.MapPost("/alerts", (HttpContext context, PlatformRequestContextResolver resolver, [FromBody] object config) =>
|
||||
{
|
||||
@@ -704,7 +704,7 @@ public static class PlatformEndpoints
|
||||
}
|
||||
|
||||
return Task.FromResult<IResult>(Results.Ok(config));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaAdmin);
|
||||
}).RequireAuthorization();
|
||||
|
||||
var rateLimits = app.MapGroup("/api/v1/gateway/rate-limits")
|
||||
.WithTags("Platform Gateway Compatibility");
|
||||
@@ -729,7 +729,7 @@ public static class PlatformEndpoints
|
||||
burstRemaining = 119
|
||||
}
|
||||
}));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
|
||||
rateLimits.MapGet("/violations", (HttpContext context, PlatformRequestContextResolver resolver) =>
|
||||
{
|
||||
@@ -749,7 +749,7 @@ public static class PlatformEndpoints
|
||||
end = now.ToString("o")
|
||||
}
|
||||
}));
|
||||
}).RequireAuthorization(PlatformPolicies.QuotaRead);
|
||||
}).RequireAuthorization();
|
||||
}
|
||||
|
||||
private static LegacyQuotaItem[] BuildLegacyConsumption(IReadOnlyList<PlatformQuotaUsage> usage)
|
||||
|
||||
Reference in New Issue
Block a user