compose and authority fixes. finish sprints.

This commit is contained in:
master
2026-02-17 21:59:47 +02:00
parent fb46a927ad
commit 49cdebe2f1
187 changed files with 23189 additions and 1439 deletions

View File

@@ -175,22 +175,30 @@ if (authorityOptions.Enabled)
resourceOptions.BackchannelTimeout = TimeSpan.FromSeconds(authorityOptions.BackchannelTimeoutSeconds);
resourceOptions.TokenClockSkew = TimeSpan.FromSeconds(authorityOptions.TokenClockSkewSeconds);
foreach (var audience in authorityOptions.Audiences)
// Read collections directly from IConfiguration to work around
// .NET Configuration.Bind() not populating IList<string> in nested init objects.
var authSection = builder.Configuration.GetSection("Scheduler:Authority");
var cfgAudiences = authSection.GetSection("Audiences").Get<string[]>() ?? [];
foreach (var audience in cfgAudiences)
{
resourceOptions.Audiences.Add(audience);
}
foreach (var scope in authorityOptions.RequiredScopes)
var cfgScopes = authSection.GetSection("RequiredScopes").Get<string[]>() ?? [];
foreach (var scope in cfgScopes)
{
resourceOptions.RequiredScopes.Add(scope);
}
foreach (var tenant in authorityOptions.RequiredTenants)
var cfgTenants = authSection.GetSection("RequiredTenants").Get<string[]>() ?? [];
foreach (var tenant in cfgTenants)
{
resourceOptions.RequiredTenants.Add(tenant);
}
foreach (var network in authorityOptions.BypassNetworks)
var cfgBypassNetworks = authSection.GetSection("BypassNetworks").Get<string[]>() ?? [];
foreach (var network in cfgBypassNetworks)
{
resourceOptions.BypassNetworks.Add(network);
}