Fix build and code structure improvements. New but essential UI functionality. CI improvements. Documentation improvements. AI module improvements.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -34,7 +34,6 @@ public class ServiceCollectionExtensionsTests
|
||||
|
||||
using var provider = services.BuildServiceProvider();
|
||||
|
||||
using StellaOps.TestKit;
|
||||
var resourceOptions = provider.GetRequiredService<IOptionsMonitor<StellaOpsResourceServerOptions>>().CurrentValue;
|
||||
var jwtOptions = provider.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(StellaOpsAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
<ProjectReference Include="..\StellaOps.Auth.Abstractions\StellaOps.Auth.Abstractions.csproj" />
|
||||
<ProjectReference Include="../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -419,7 +419,7 @@ public class StellaOpsScopeAuthorizationHandlerTests
|
||||
.WithScopes(new[] { StellaOpsScopes.PacksApprove })
|
||||
.AddClaim(StellaOpsClaimTypes.PackRunId, "run-123")
|
||||
.AddClaim(StellaOpsClaimTypes.PackGateId, "security-review")
|
||||
.AddClaim(StellaOpsClaimTypes.PackPlanHash, new string(a, 64))
|
||||
.AddClaim(StellaOpsClaimTypes.PackPlanHash, new string('a', 64))
|
||||
.AddClaim(OpenIddictConstants.Claims.AuthenticationTime, staleAuthTime.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture))
|
||||
.Build();
|
||||
|
||||
@@ -456,7 +456,7 @@ public class StellaOpsScopeAuthorizationHandlerTests
|
||||
.WithScopes(new[] { StellaOpsScopes.PacksApprove })
|
||||
.AddClaim(StellaOpsClaimTypes.PackRunId, "run-456")
|
||||
.AddClaim(StellaOpsClaimTypes.PackGateId, "security-review")
|
||||
.AddClaim(StellaOpsClaimTypes.PackPlanHash, new string(b, 64))
|
||||
.AddClaim(StellaOpsClaimTypes.PackPlanHash, new string('b', 64))
|
||||
.AddClaim(OpenIddictConstants.Claims.AuthenticationTime, freshAuthTime.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture))
|
||||
.Build();
|
||||
|
||||
@@ -471,7 +471,7 @@ public class StellaOpsScopeAuthorizationHandlerTests
|
||||
Assert.Equal("true", GetPropertyValue(record, "pack.fresh_auth_satisfied"));
|
||||
Assert.Equal("run-456", GetPropertyValue(record, "pack.run_id"));
|
||||
Assert.Equal("security-review", GetPropertyValue(record, "pack.gate_id"));
|
||||
Assert.Equal(new string(b, 64), GetPropertyValue(record, "pack.plan_hash"));
|
||||
Assert.Equal(new string('b', 64), GetPropertyValue(record, "pack.plan_hash"));
|
||||
}
|
||||
|
||||
private static (StellaOpsScopeAuthorizationHandler Handler, IHttpContextAccessor Accessor, RecordingAuthEventSink Sink) CreateHandler(IOptionsMonitor<StellaOpsResourceServerOptions> optionsMonitor, IPAddress remoteAddress, TimeProvider? timeProvider = null)
|
||||
|
||||
Reference in New Issue
Block a user