< Summary

Information
Class: AsiBackbone.AspNetCore.Endpoints.DefaultEndpointGovernanceService
Assembly: AsiBackbone.AspNetCore
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.AspNetCore/Endpoints/DefaultEndpointGovernanceService.cs
Line coverage
100%
Covered lines: 284
Uncovered lines: 0
Coverable lines: 284
Total lines: 525
Line coverage: 100%
Branch coverage
73%
Covered branches: 56
Total branches: 76
Branch coverage: 73.6%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)50%1616100%
EvaluateAsync()100%1010100%
SanitizeMetadataAsync()100%44100%
EvaluatePolicyAsync()100%66100%
ValidateCapabilityAsync()75%88100%
EmitAuditAsync()66.67%66100%
CreateCompletedResult(...)90%1010100%
CreateMetadataSanitizationFailure(...)100%11100%
CreateAllowDecision(...)100%11100%
.ctor(...)100%11100%
GetPolicyEvaluator()50%22100%
GetCapabilityValidator()50%22100%
GetAuditSink()50%22100%
GetMetadataSanitizer()50%22100%
CreateBlockedDecisionResult(...)50%44100%
CreateConfigurationFailure(...)50%22100%
CreateCapabilityFailure(...)100%22100%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.AspNetCore/Endpoints/DefaultEndpointGovernanceService.cs

#LineLine coverage
 1using AsiBackbone.AspNetCore.Acknowledgments;
 2using AsiBackbone.AspNetCore.Actors;
 3using AsiBackbone.AspNetCore.Correlation;
 4using AsiBackbone.AspNetCore.Results;
 5using AsiBackbone.Core.Actors;
 6using AsiBackbone.Core.Audit;
 7using AsiBackbone.Core.Constraints;
 8using AsiBackbone.Core.Decisions;
 9using AsiBackbone.Core.Evaluation;
 10using AsiBackbone.Core.Metadata;
 11using AsiBackbone.Core.Results;
 12using Microsoft.AspNetCore.Http;
 13using Microsoft.Extensions.DependencyInjection;
 14using Microsoft.Extensions.Options;
 15
 16namespace AsiBackbone.AspNetCore.Endpoints;
 17
 18/// <summary>
 19/// Default host-adapter implementation for ergonomic ASP.NET Core endpoint governance.
 20/// </summary>
 21public sealed class DefaultEndpointGovernanceService : IEndpointGovernanceService
 22{
 23    private const string MetadataSanitizationDeniedReasonCode = "endpoint.metadata_sanitization.denied";
 24    private const string MetadataSanitizationDeniedReasonMessage =
 25        "Endpoint governance metadata was denied by the configured sanitation policy.";
 26
 27    private readonly IServiceProvider serviceProvider;
 28    private readonly IHttpGovernanceActorContextResolver actorContextResolver;
 29    private readonly IHttpGovernanceRequestCorrelationResolver requestCorrelationResolver;
 30    private readonly IAcknowledgmentChallengeService acknowledgmentChallengeService;
 31    private readonly EndpointGovernanceOptions endpointOptions;
 32    private readonly GovernanceHttpResultMappingOptions resultOptions;
 33
 34    /// <summary>
 35    /// Initializes a new instance of the <see cref="DefaultEndpointGovernanceService" /> class.
 36    /// </summary>
 2537    public DefaultEndpointGovernanceService(
 2538        IServiceProvider serviceProvider,
 2539        IHttpGovernanceActorContextResolver actorContextResolver,
 2540        IHttpGovernanceRequestCorrelationResolver requestCorrelationResolver,
 2541        IAcknowledgmentChallengeService acknowledgmentChallengeService,
 2542        IOptions<EndpointGovernanceOptions> endpointOptions,
 2543        IOptions<GovernanceHttpResultMappingOptions> resultOptions)
 44    {
 2545        this.serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
 2546        this.actorContextResolver = actorContextResolver ?? throw new ArgumentNullException(nameof(actorContextResolver)
 2547        this.requestCorrelationResolver = requestCorrelationResolver ?? throw new ArgumentNullException(nameof(requestCo
 2548        this.acknowledgmentChallengeService = acknowledgmentChallengeService ?? throw new ArgumentNullException(nameof(a
 2549        this.endpointOptions = endpointOptions?.Value ?? throw new ArgumentNullException(nameof(endpointOptions));
 2550        this.resultOptions = resultOptions?.Value ?? throw new ArgumentNullException(nameof(resultOptions));
 2551        this.endpointOptions.Validate();
 2552        this.resultOptions.Validate();
 2553    }
 54
 55    /// <inheritdoc />
 56    public async ValueTask<EndpointGovernanceResult> EvaluateAsync(
 57        HttpContext httpContext,
 58        EndpointGovernanceDescriptor descriptor,
 59        CancellationToken cancellationToken = default)
 60    {
 2361        ArgumentNullException.ThrowIfNull(httpContext);
 2362        ArgumentNullException.ThrowIfNull(descriptor);
 2363        cancellationToken.ThrowIfCancellationRequested();
 64
 2265        if (!descriptor.HasGovernanceMetadata)
 66        {
 167            return EndpointGovernanceResult.Allow();
 68        }
 69
 2170        var optionalServices = new EndpointGovernanceOptionalServiceResolver(
 2171            httpContext.RequestServices,
 2172            serviceProvider);
 2173        GovernanceHttpRequestCorrelation correlation = requestCorrelationResolver.ResolveRequestCorrelation();
 2174        IReadOnlyDictionary<string, string> endpointMetadata = descriptor.ToMetadata(endpointOptions.MetadataMode);
 75
 2176        IReadOnlyDictionary<string, string> mergedMetadata = correlation.MergeMetadata(endpointMetadata);
 2177        MetadataStageResult metadataStage = await SanitizeMetadataAsync(
 2178            optionalServices,
 2179            correlation,
 2180            mergedMetadata,
 2181            cancellationToken).ConfigureAwait(false);
 82
 2183        if (metadataStage.TerminalResult is not null)
 84        {
 185            return metadataStage.TerminalResult;
 86        }
 87
 2088        endpointMetadata = metadataStage.Metadata;
 89
 90        // The sanitized dictionary already contains request metadata, so it is authoritative. Merging request
 91        // metadata underneath it again would reintroduce any entry the sanitizer dropped: a dropped key is simply
 92        // absent from the sanitized result, so there would be nothing to override the raw value.
 2093        GovernanceEvaluationContext evaluationContext = correlation.ToEvaluationContext(
 2094            endpointOptions.PolicyVersion,
 2095            endpointOptions.PolicyHash,
 2096            endpointMetadata,
 2097            mergeRequestMetadata: false);
 98
 2099        DecisionStageResult policyStage = await EvaluatePolicyAsync(
 20100            httpContext,
 20101            descriptor,
 20102            optionalServices,
 20103            correlation,
 20104            endpointMetadata,
 20105            evaluationContext,
 20106            cancellationToken).ConfigureAwait(false);
 107
 19108        if (policyStage.TerminalResult is not null)
 109        {
 2110            return policyStage.TerminalResult;
 111        }
 112
 17113        DecisionStageResult capabilityStage = await ValidateCapabilityAsync(
 17114            httpContext,
 17115            descriptor,
 17116            optionalServices,
 17117            endpointMetadata,
 17118            policyStage.Decision,
 17119            cancellationToken).ConfigureAwait(false);
 120
 17121        if (capabilityStage.TerminalResult is not null)
 122        {
 3123            return capabilityStage.TerminalResult;
 124        }
 125
 14126        AuditStageResult auditStage = await EmitAuditAsync(
 14127            httpContext,
 14128            descriptor,
 14129            optionalServices,
 14130            endpointMetadata,
 14131            capabilityStage.Decision,
 14132            cancellationToken).ConfigureAwait(false);
 133
 14134        return auditStage.TerminalResult is not null
 14135            ? auditStage.TerminalResult
 14136            : CreateCompletedResult(
 14137            descriptor,
 14138            endpointMetadata,
 14139            capabilityStage.Decision,
 14140            auditStage.Actor);
 21141    }
 142
 143    private async ValueTask<MetadataStageResult> SanitizeMetadataAsync(
 144        EndpointGovernanceOptionalServiceResolver optionalServices,
 145        GovernanceHttpRequestCorrelation correlation,
 146        IReadOnlyDictionary<string, string> endpointMetadata,
 147        CancellationToken cancellationToken)
 148    {
 21149        IGovernanceMetadataSanitizer? metadataSanitizer = optionalServices.GetMetadataSanitizer();
 21150        if (metadataSanitizer is null)
 151        {
 16152            return new MetadataStageResult(endpointMetadata, TerminalResult: null);
 153        }
 154
 5155        GovernanceMetadataSanitizationResult sanitizationResult = await metadataSanitizer
 5156            .SanitizeAsync(endpointMetadata, cancellationToken)
 5157            .ConfigureAwait(false);
 158
 5159        return sanitizationResult.CanProceed
 5160            ? new MetadataStageResult(sanitizationResult.SanitizedMetadata, TerminalResult: null)
 5161            : new MetadataStageResult(
 5162                endpointMetadata,
 5163                CreateMetadataSanitizationFailure(correlation, sanitizationResult));
 21164    }
 165
 166    private async ValueTask<DecisionStageResult> EvaluatePolicyAsync(
 167        HttpContext httpContext,
 168        EndpointGovernanceDescriptor descriptor,
 169        EndpointGovernanceOptionalServiceResolver optionalServices,
 170        GovernanceHttpRequestCorrelation correlation,
 171        IReadOnlyDictionary<string, string> endpointMetadata,
 172        GovernanceEvaluationContext evaluationContext,
 173        CancellationToken cancellationToken)
 174    {
 20175        GovernanceDecision allowedDecision = CreateAllowDecision(evaluationContext, correlation.TraceId);
 20176        if (descriptor.PolicyTypes.Count == 0)
 177        {
 4178            return new DecisionStageResult(allowedDecision, TerminalResult: null);
 179        }
 180
 16181        IGovernancePolicyEvaluator<GovernanceEvaluationContext>? evaluator =
 16182            optionalServices.GetPolicyEvaluator();
 16183        if (evaluator is null)
 184        {
 2185            EndpointGovernanceResult terminalResult = endpointOptions.FailClosedWhenPolicyEvaluatorMissing
 2186                ? CreateConfigurationFailure(
 2187                    httpContext,
 2188                    descriptor,
 2189                    endpointMetadata,
 2190                    "endpoint.policy_evaluator.missing",
 2191                    "Endpoint governance policy metadata was present, but no AsiBackbone policy evaluator was registered
 2192                    allowedDecision,
 2193                    "aspnetcore.endpoint.governance.configuration.policy_evaluator")
 2194                : EndpointGovernanceResult.Allow(allowedDecision);
 195
 2196            return new DecisionStageResult(allowedDecision, terminalResult);
 197        }
 198
 14199        GovernanceDecision decision = await evaluator
 14200            .EvaluateAsync(evaluationContext, cancellationToken)
 14201            .ConfigureAwait(false);
 202
 13203        return new DecisionStageResult(decision, TerminalResult: null);
 19204    }
 205
 206    private async ValueTask<DecisionStageResult> ValidateCapabilityAsync(
 207        HttpContext httpContext,
 208        EndpointGovernanceDescriptor descriptor,
 209        EndpointGovernanceOptionalServiceResolver optionalServices,
 210        IReadOnlyDictionary<string, string> endpointMetadata,
 211        GovernanceDecision decision,
 212        CancellationToken cancellationToken)
 213    {
 17214        if (!decision.CanProceed || descriptor.CapabilityScopes.Count == 0)
 215        {
 12216            return new DecisionStageResult(decision, TerminalResult: null);
 217        }
 218
 5219        IEndpointCapabilityGrantValidator? capabilityValidator =
 5220            optionalServices.GetCapabilityValidator();
 5221        if (capabilityValidator is null)
 222        {
 3223            EndpointGovernanceResult terminalResult = endpointOptions.FailClosedWhenCapabilityValidatorMissing
 3224                ? CreateCapabilityFailure(
 3225                    httpContext,
 3226                    descriptor,
 3227                    endpointMetadata,
 3228                    "endpoint.capability_validator.missing",
 3229                    "Endpoint capability metadata was present, but no host-owned endpoint capability validator was regis
 3230                    decision,
 3231                    "aspnetcore.endpoint.governance.capability.configuration")
 3232                : EndpointGovernanceResult.Allow(decision);
 233
 3234            return new DecisionStageResult(decision, terminalResult);
 235        }
 236
 2237        GovernanceDecision validatedDecision = await capabilityValidator
 2238            .ValidateAsync(httpContext, descriptor, decision, cancellationToken)
 2239            .ConfigureAwait(false);
 240
 2241        return new DecisionStageResult(validatedDecision, TerminalResult: null);
 17242    }
 243
 244    private async ValueTask<AuditStageResult> EmitAuditAsync(
 245        HttpContext httpContext,
 246        EndpointGovernanceDescriptor descriptor,
 247        EndpointGovernanceOptionalServiceResolver optionalServices,
 248        IReadOnlyDictionary<string, string> endpointMetadata,
 249        GovernanceDecision decision,
 250        CancellationToken cancellationToken)
 251    {
 14252        if (!descriptor.EmitGovernanceAudit)
 253        {
 12254            return new AuditStageResult(Actor: null, TerminalResult: null);
 255        }
 256
 2257        IDecisionReceiptSink? auditSink = optionalServices.GetAuditSink();
 2258        if (auditSink is null)
 259        {
 1260            EndpointGovernanceResult terminalResult = endpointOptions.FailClosedWhenAuditSinkMissing
 1261                ? CreateConfigurationFailure(
 1262                    httpContext,
 1263                    descriptor,
 1264                    endpointMetadata,
 1265                    "endpoint.audit_sink.missing",
 1266                    "Endpoint governance audit emission was requested, but no host-owned audit sink was registered.",
 1267                    decision,
 1268                    "aspnetcore.endpoint.governance.configuration.audit_sink")
 1269                : EndpointGovernanceResult.Allow(decision);
 270
 1271            return new AuditStageResult(Actor: null, terminalResult);
 272        }
 273
 1274        IGovernanceActorContext actor = actorContextResolver.ResolveActorContext();
 1275        var residue = DecisionReceipt.FromDecision(
 1276            actor,
 1277            descriptor.OperationName,
 1278            decision,
 1279            metadata: endpointMetadata,
 1280            decisionStage: "aspnetcore.endpoint.governance");
 281
 1282        await auditSink.WriteAsync(residue, cancellationToken).ConfigureAwait(false);
 1283        return new AuditStageResult(actor, TerminalResult: null);
 14284    }
 285
 286    private EndpointGovernanceResult CreateCompletedResult(
 287        EndpointGovernanceDescriptor descriptor,
 288        IReadOnlyDictionary<string, string> endpointMetadata,
 289        GovernanceDecision decision,
 290        IGovernanceActorContext? actor)
 291    {
 13292        if (decision.RequiresAcknowledgment && descriptor.RequiresAcknowledgment)
 293        {
 2294            actor ??= actorContextResolver.ResolveActorContext();
 295
 2296            if (!AcknowledgmentActorBinding.IsSufficient(actor))
 297            {
 1298                return EndpointGovernanceResult.Block(
 1299                    Microsoft.AspNetCore.Http.Results.Problem(
 1300                        title: "Acknowledgment challenge actor binding failed.",
 1301                        detail: AcknowledgmentActorBinding.FailureMessage,
 1302                        statusCode: StatusCodes.Status403Forbidden,
 1303                        extensions: new Dictionary<string, object?>(StringComparer.Ordinal)
 1304                        {
 1305                            ["reasonCodes"] = new[] { AcknowledgmentActorBinding.FailureCode },
 1306                            ["outcome"] = decision.Outcome.ToString()
 1307                        }),
 1308                    decision);
 309            }
 310
 1311            AcknowledgmentChallenge challenge = acknowledgmentChallengeService.CreateChallenge(
 1312                actor,
 1313                descriptor.OperationName,
 1314                decision,
 1315                endpointMetadata);
 316
 1317            IResult challengeResult = Microsoft.AspNetCore.Http.Results.Json(
 1318                challenge,
 1319                statusCode: endpointOptions.AcknowledgmentChallengeStatusCode);
 320
 1321            return EndpointGovernanceResult.Challenge(challenge, challengeResult, decision);
 322        }
 323
 11324        return decision.CanProceed
 11325            ? EndpointGovernanceResult.Allow(decision)
 11326            : CreateBlockedDecisionResult(decision);
 327    }
 328
 329    private EndpointGovernanceResult CreateMetadataSanitizationFailure(
 330        GovernanceHttpRequestCorrelation correlation,
 331        GovernanceMetadataSanitizationResult sanitizationResult)
 332    {
 1333        var reasons = new List<OperationReason>(sanitizationResult.Reasons.Count + 1)
 1334        {
 1335            OperationReason.Create(
 1336                MetadataSanitizationDeniedReasonCode,
 1337                MetadataSanitizationDeniedReasonMessage)
 1338        };
 1339        reasons.AddRange(sanitizationResult.Reasons);
 340
 1341        var decision = GovernanceDecision.Deny(
 1342            reasons,
 1343            correlationId: correlation.CorrelationId,
 1344            traceId: correlation.TraceId,
 1345            policyVersion: endpointOptions.PolicyVersion,
 1346            policyHash: endpointOptions.PolicyHash);
 347
 1348        return CreateBlockedDecisionResult(decision);
 349    }
 350
 351    private static GovernanceDecision CreateAllowDecision(
 352        GovernanceEvaluationContext evaluationContext,
 353        string? traceId)
 354    {
 20355        return GovernanceDecision.Allow(
 20356            correlationId: evaluationContext.CorrelationId,
 20357            traceId: traceId,
 20358            policyVersion: evaluationContext.PolicyVersion,
 20359            policyHash: evaluationContext.PolicyHash);
 360    }
 361
 362    private readonly record struct MetadataStageResult(
 363        IReadOnlyDictionary<string, string> Metadata,
 364        EndpointGovernanceResult? TerminalResult);
 365
 366    private readonly record struct DecisionStageResult(
 367        GovernanceDecision Decision,
 368        EndpointGovernanceResult? TerminalResult);
 369
 370    private readonly record struct AuditStageResult(
 371        IGovernanceActorContext? Actor,
 372        EndpointGovernanceResult? TerminalResult);
 373
 21374    private sealed class EndpointGovernanceOptionalServiceResolver(
 21375        IServiceProvider requestServices,
 21376        IServiceProvider governanceServices)
 377    {
 378        private IGovernancePolicyEvaluator<GovernanceEvaluationContext>? policyEvaluator;
 379        private IEndpointCapabilityGrantValidator? capabilityValidator;
 380        private IDecisionReceiptSink? auditSink;
 381        private IGovernanceMetadataSanitizer? metadataSanitizer;
 382        private bool policyEvaluatorResolved;
 383        private bool capabilityValidatorResolved;
 384        private bool auditSinkResolved;
 385        private bool metadataSanitizerResolved;
 386
 387        public IGovernancePolicyEvaluator<GovernanceEvaluationContext>? GetPolicyEvaluator()
 388        {
 16389            if (!policyEvaluatorResolved)
 390            {
 16391                policyEvaluator = requestServices
 16392                    .GetService<IGovernancePolicyEvaluator<GovernanceEvaluationContext>>();
 16393                policyEvaluatorResolved = true;
 394            }
 395
 16396            return policyEvaluator;
 397        }
 398
 399        public IEndpointCapabilityGrantValidator? GetCapabilityValidator()
 400        {
 5401            if (!capabilityValidatorResolved)
 402            {
 5403                capabilityValidator = requestServices.GetService<IEndpointCapabilityGrantValidator>();
 5404                capabilityValidatorResolved = true;
 405            }
 406
 5407            return capabilityValidator;
 408        }
 409
 410        public IDecisionReceiptSink? GetAuditSink()
 411        {
 2412            if (!auditSinkResolved)
 413            {
 2414                auditSink = governanceServices.GetService<IDecisionReceiptSink>();
 2415                auditSinkResolved = true;
 416            }
 417
 2418            return auditSink;
 419        }
 420
 421        public IGovernanceMetadataSanitizer? GetMetadataSanitizer()
 422        {
 21423            if (!metadataSanitizerResolved)
 424            {
 21425                metadataSanitizer = requestServices.GetService<IGovernanceMetadataSanitizer>();
 21426                metadataSanitizerResolved = true;
 427            }
 428
 21429            return metadataSanitizer;
 430        }
 431    }
 432
 433    private EndpointGovernanceResult CreateBlockedDecisionResult(GovernanceDecision decision)
 434    {
 5435        return decision.IsDenied && resultOptions.DeniedStatusCode == StatusCodes.Status403Forbidden
 5436            ? EndpointGovernanceResult.BlockWithDefaultFailure(decision)
 5437            : EndpointGovernanceResult.Block(decision.ToHttpResult(resultOptions), decision);
 438    }
 439
 440    private EndpointGovernanceResult CreateConfigurationFailure(
 441        HttpContext httpContext,
 442        EndpointGovernanceDescriptor descriptor,
 443        IReadOnlyDictionary<string, string> metadata,
 444        string code,
 445        string message,
 446        GovernanceDecision currentDecision,
 447        string decisionStage)
 448    {
 2449        var decision = GovernanceDecision.Deny(
 2450            code,
 2451            message,
 2452            correlationId: currentDecision.CorrelationId,
 2453            traceId: currentDecision.TraceId,
 2454            policyVersion: currentDecision.PolicyVersion,
 2455            policyHash: currentDecision.PolicyHash);
 456
 2457        return AsiBackboneEndpointGovernanceDevelopmentDiagnostics.IsEnabled(httpContext, endpointOptions)
 2458            ? EndpointGovernanceResult.Block(
 2459                AsiBackboneEndpointGovernanceDevelopmentDiagnostics.CreateProblem(
 2460                    httpContext,
 2461                    endpointOptions,
 2462                    descriptor,
 2463                    decision,
 2464                    decisionStage,
 2465                    title: "Endpoint governance configuration is incomplete.",
 2466                    detail: message,
 2467                    statusCode: endpointOptions.ConfigurationFailureStatusCode,
 2468                    metadata: metadata),
 2469                decision)
 2470            : EndpointGovernanceResult.Block(
 2471                Microsoft.AspNetCore.Http.Results.Problem(
 2472                    title: "Endpoint governance configuration is incomplete.",
 2473                    detail: message,
 2474                    statusCode: endpointOptions.ConfigurationFailureStatusCode,
 2475                    extensions: new Dictionary<string, object?>(StringComparer.Ordinal)
 2476                    {
 2477                        ["reasonCodes"] = decision.ReasonCodes,
 2478                        ["outcome"] = decision.Outcome.ToString()
 2479                    }),
 2480                decision);
 481    }
 482
 483    private EndpointGovernanceResult CreateCapabilityFailure(
 484        HttpContext httpContext,
 485        EndpointGovernanceDescriptor descriptor,
 486        IReadOnlyDictionary<string, string> metadata,
 487        string code,
 488        string message,
 489        GovernanceDecision currentDecision,
 490        string decisionStage)
 491    {
 3492        var decision = GovernanceDecision.Deny(
 3493            code,
 3494            message,
 3495            correlationId: currentDecision.CorrelationId,
 3496            traceId: currentDecision.TraceId,
 3497            policyVersion: currentDecision.PolicyVersion,
 3498            policyHash: currentDecision.PolicyHash);
 499
 3500        return AsiBackboneEndpointGovernanceDevelopmentDiagnostics.IsEnabled(httpContext, endpointOptions)
 3501            ? EndpointGovernanceResult.Block(
 3502                AsiBackboneEndpointGovernanceDevelopmentDiagnostics.CreateProblem(
 3503                    httpContext,
 3504                    endpointOptions,
 3505                    descriptor,
 3506                    decision,
 3507                    decisionStage,
 3508                    title: "Endpoint capability grant validation failed.",
 3509                    detail: message,
 3510                    statusCode: endpointOptions.CapabilityFailureStatusCode,
 3511                    metadata: metadata),
 3512                decision)
 3513            : EndpointGovernanceResult.Block(
 3514                Microsoft.AspNetCore.Http.Results.Problem(
 3515                    title: "Endpoint capability grant validation failed.",
 3516                    detail: message,
 3517                    statusCode: endpointOptions.CapabilityFailureStatusCode,
 3518                    extensions: new Dictionary<string, object?>(StringComparer.Ordinal)
 3519                    {
 3520                        ["reasonCodes"] = decision.ReasonCodes,
 3521                        ["outcome"] = decision.Outcome.ToString()
 3522                    }),
 3523                decision);
 524    }
 525}

Methods/Properties

.ctor(System.IServiceProvider,AsiBackbone.AspNetCore.Actors.IHttpGovernanceActorContextResolver,AsiBackbone.AspNetCore.Correlation.IHttpGovernanceRequestCorrelationResolver,AsiBackbone.AspNetCore.Acknowledgments.IAcknowledgmentChallengeService,Microsoft.Extensions.Options.IOptions`1<AsiBackbone.AspNetCore.Endpoints.EndpointGovernanceOptions>,Microsoft.Extensions.Options.IOptions`1<AsiBackbone.AspNetCore.Results.GovernanceHttpResultMappingOptions>)
EvaluateAsync()
SanitizeMetadataAsync()
EvaluatePolicyAsync()
ValidateCapabilityAsync()
EmitAuditAsync()
CreateCompletedResult(AsiBackbone.AspNetCore.Endpoints.EndpointGovernanceDescriptor,System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>,AsiBackbone.Core.Decisions.GovernanceDecision,AsiBackbone.Core.Actors.IGovernanceActorContext)
CreateMetadataSanitizationFailure(AsiBackbone.AspNetCore.Correlation.GovernanceHttpRequestCorrelation,AsiBackbone.Core.Metadata.GovernanceMetadataSanitizationResult)
CreateAllowDecision(AsiBackbone.Core.Constraints.GovernanceEvaluationContext,System.String)
.ctor(System.IServiceProvider,System.IServiceProvider)
GetPolicyEvaluator()
GetCapabilityValidator()
GetAuditSink()
GetMetadataSanitizer()
CreateBlockedDecisionResult(AsiBackbone.Core.Decisions.GovernanceDecision)
CreateConfigurationFailure(Microsoft.AspNetCore.Http.HttpContext,AsiBackbone.AspNetCore.Endpoints.EndpointGovernanceDescriptor,System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>,System.String,System.String,AsiBackbone.Core.Decisions.GovernanceDecision,System.String)
CreateCapabilityFailure(Microsoft.AspNetCore.Http.HttpContext,AsiBackbone.AspNetCore.Endpoints.EndpointGovernanceDescriptor,System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>,System.String,System.String,AsiBackbone.Core.Decisions.GovernanceDecision,System.String)