Step 3: Register AsiBackbone Services
Status: Complete with AsiBackbone 7.2.0. Released in v0.1.0-alpha.3.
Outcome
The host registers AsiBackbone's ASP.NET Core integration services through an application-owned extension and adds endpoint governance to the established NCAT middleware pipeline. This step adds no governance rules or governed endpoints; those are Step 4 and Step 5.
The integration preserves host ownership of authentication. NCAT continues to authenticate users and normalize
provider-specific claims. AsiBackbone maps the normalized application:subject claim to the stable governance actor
ID and application:name to its display name. Standard stable identifier and display-name claims remain fallbacks when
a host deliberately disables or customizes NCAT claim transformation.
Service registration
AddApplicationAsiBackbone lives with the other host registration extensions under
src/ReferenceApplication.Web/Extensions. It calls AddAsiBackboneAspNetCore() and configures
HttpGovernanceActorContextOptions so the application-owned claims take precedence:
builder.Services.AddApplicationAuthentication(builder.Configuration, builder.Environment);
builder.Services.AddApplicationAuthorization(builder.Configuration);
builder.Services.AddApplicationDataAccess(builder.Configuration);
builder.Services.AddApplicationAsiBackbone();
The framework registration supplies the HTTP actor resolver, request-correlation resolver, acknowledgment challenge service, endpoint governance service, and validated integration options. The Step 3 change intentionally selected no policy evaluator, capability validator, persistence, or decision receipt sink. Step 4 now adds the host-owned policy evaluator; the other boundaries remain with their later walkthrough steps.
Middleware placement
The NCAT-derived pipeline calls the optional endpoint-governance middleware after routing, authentication, and authorization, and before controller and Razor Page endpoints execute:
app.UseRouting();
// Rate limiting, authentication, and authorization remain in their documented order.
app.UseAsiBackboneEndpointGovernance(requireEndpointRoutingRegistered: true);
app.MapControllers();
app.MapRazorPages();
Passing requireEndpointRoutingRegistered: true converts an accidental future move ahead of UseRouting() into a
startup failure. AsiBackbone endpoint governance remains opt-in at this stage, so existing endpoints without governance
metadata continue through the pipeline unchanged.
Verification
The Step 3 tests verify that:
- registration returns the same service collection and resolves the framework's scoped integration services;
- normalized NCAT subject and name claims resolve to a known, authenticated human governance actor; and
- the complete web host starts with the middleware in place and exposes the expected AsiBackbone services.
The complete inherited NCAT suite runs alongside those tests:
dotnet restore ReferenceApplication.slnx --locked-mode
dotnet build ReferenceApplication.slnx --configuration Release --no-restore
dotnet test ReferenceApplication.slnx --configuration Release --no-build --no-restore
Authoritative references
- AsiBackbone ASP.NET Core Integration Boundary
- AsiBackbone ASP.NET Core Endpoint Governance
- NCAT Middleware Pipeline
- NCAT Authentication
Local setup checkpoint
Before continuing with database-dependent integration scenarios, apply the inherited NCAT migration history by following Create the development database. Database creation is explicit because the host does not automatically create or migrate its database at startup.