stela ops usage fixes roles propagation and timoeut, one account to support multi tenants, migrations consolidation, search to support documentation, doctor and open api vector db search
This commit is contained in:
@@ -30,6 +30,7 @@ using StellaOps.PolicyDsl;
|
||||
using System.IO;
|
||||
using System.Threading.RateLimiting;
|
||||
|
||||
using StellaOps.Router.AspNet;
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
var policyEngineConfigFiles = new[]
|
||||
@@ -342,6 +343,12 @@ if (bootstrap.Options.Authority.Enabled)
|
||||
});
|
||||
}
|
||||
|
||||
// Stella Router integration
|
||||
var routerEnabled = builder.Services.AddRouterMicroservice(
|
||||
builder.Configuration,
|
||||
serviceName: "policy-engine",
|
||||
version: System.Reflection.CustomAttributeExtensions.GetCustomAttribute<System.Reflection.AssemblyInformationalVersionAttribute>(System.Reflection.Assembly.GetExecutingAssembly())?.InformationalVersion ?? "1.0.0",
|
||||
routerOptionsSection: "Router");
|
||||
builder.TryAddStellaOpsLocalBinding("policy-engine");
|
||||
var app = builder.Build();
|
||||
app.LogStellaOpsLocalHostname("policy-engine");
|
||||
@@ -349,6 +356,7 @@ app.LogStellaOpsLocalHostname("policy-engine");
|
||||
app.UseStellaOpsCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.TryUseStellaRouter(routerEnabled);
|
||||
|
||||
if (rateLimitOptions.Enabled)
|
||||
{
|
||||
@@ -406,6 +414,7 @@ app.MapPolicySnapshotsApi();
|
||||
app.MapViolationEventsApi();
|
||||
app.MapConflictsApi();
|
||||
|
||||
app.TryRefreshStellaRouterEndpoints(routerEnabled);
|
||||
app.Run();
|
||||
|
||||
// Make Program class internal to prevent type conflicts when referencing this assembly
|
||||
@@ -413,3 +422,4 @@ namespace StellaOps.Policy.Engine
|
||||
{
|
||||
public partial class Program { }
|
||||
}
|
||||
|
||||
|
||||
@@ -52,4 +52,8 @@
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="StellaOps.Policy.Engine.Tests" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="StellaOpsReleaseVersion">
|
||||
<Version>1.0.0-alpha1</Version>
|
||||
<InformationalVersion>1.0.0-alpha1</InformationalVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user