StellaOps.Microservice.AspNetCore
ASP.NET Core endpoint bridge for StellaOps Router SDK. Enables ASP.NET endpoints to be automatically registered and dispatched via the Router. Install Installing Stella Ops packagesRouter downloads and signaturesnet10.01.0.1-20261117T070237Zdotnet add package StellaOps.
Namespaces
| Namespace | Types |
|---|---|
StellaOps. | 22 |
namespace StellaOps.Microservice.AspNetCore
| Type | Kind | Description |
|---|---|---|
AspNetCoreEndpointDiscoveryProvider | class | Discovers ASP.NET Core endpoints and converts them to Router endpoint descriptors. |
AspNetEndpointDescriptor | record | Extended endpoint descriptor with full ASP.NET metadata. |
AspNetEndpointOverrideMerger | class | Merges endpoint overrides from YAML configuration with ASP.NET-discovered endpoints, supporting different authorization mapping strategies. |
AspNetRouterRequestDispatcher | class | Dispatches Router request frames through the ASP.NET Core pipeline. |
AuthorizationMappingResult | record | Result of authorization mapping for an endpoint. |
AuthorizationMappingStrategy | enum | Strategy for mapping ASP.NET authorization metadata to Router claim requirements. |
AuthorizationSource | enum | Source of authorization metadata for an endpoint. |
DefaultAuthorizationClaimMapper | class | Default implementation of IAuthorizationClaimMapper. |
GatewayAuthorizationTrustMode | enum | Service-side trust mode for gateway authorization and identity envelopes. |
IAspNetEndpointDiscoveryProvider | interface | Provides ASP.NET endpoint discovery with full metadata extraction. |
IAspNetEndpointOverrideMerger | interface | Interface for merging endpoint overrides with ASP.NET-specific authorization mapping strategy support. |
IAspNetRouterRequestDispatcher | interface | Dispatches Router request frames through the ASP.NET Core pipeline. |
IAuthorizationClaimMapper | interface | Maps ASP.NET authorization metadata to Router claim requirements. |
IRouterTenantResolver | interface | Binds the tenant of a request that the Router dispatches into ASP.NET Core. |
MissingAuthorizationBehavior | enum | Behavior when an endpoint has no authorization metadata. |
ParameterDescriptor | record | Describes a parameter for an endpoint. |
ParameterSource | enum | Source of a parameter value. |
ResponseDescriptor | record | Describes a response for an endpoint. |
RouterPublicationExclusionMetadata | class | Endpoint metadata that keeps one ASP.NET endpoint off the Router entirely: the bridge does not publish it in the HELLO payload, so the gateway cannot resolve it, and the router request dispatcher refuses it (404), so a frame that names its path still cannot reach it. |
StellaRouterBridgeExtensions | class | Extension methods for configuring the StellaOps Router ASP.NET Core bridge. |
StellaRouterBridgeOptions | class | Configuration options for the ASP.NET Core Router bridge. |
UnsupportedConstraintBehavior | enum | Behavior for unsupported route constraints. |
class AspNetCoreEndpointDiscoveryProvider
public sealed class AspNetCoreEndpointDiscoveryProvider : IAspNetEndpointDiscoveryProvider, IEndpointSchemaDefinitionProvider
Discovers ASP.NET Core endpoints and converts them to Router endpoint descriptors.
Members
| Member | Kind | Summary |
|---|---|---|
AspNetCoreEndpointDiscoveryProvider( | constructor | Creates the provider over the endpoints of the ASP.NET Core application. |
DiscoverAspNetEndpoints( | method | Discover all ASP.NET endpoints with full metadata. |
DiscoverEndpoints( | method | Discovers all endpoints in the application. |
DiscoverSchemaDefinitions( | method | Gets schema definitions keyed by schema identifier. |
RefreshEndpoints( | method | Force a refresh of the discovered endpoints. |
constructor AspNetCoreEndpointDiscoveryProvider(EndpointDataSource, StellaRouterBridgeOptions, IAuthorizationClaimMapper, ILogger<AspNetCoreEndpointDiscoveryProvider>) #
AspNetCoreEndpointDiscoveryProvider(EndpointDataSource, StellaRouterBridgeOptions, IAuthorizationClaimMapper, ILogger<AspNetCoreEndpointDiscoveryProvider>) #public AspNetCoreEndpointDiscoveryProvider(EndpointDataSource endpointDataSource, StellaRouterBridgeOptions options, IAuthorizationClaimMapper authMapper, ILogger<AspNetCoreEndpointDiscoveryProvider> logger)
Creates the provider over the endpoints of the ASP.NET Core application.
Parameters
endpointDataSource: The application’s endpoints.options: The bridge options.authMapper: Maps the authorization metadata of an endpoint to claim requirements.logger: Receives the discovery diagnostics.
method DiscoverAspNetEndpoints() #
DiscoverAspNetEndpoints() #public IReadOnlyList<AspNetEndpointDescriptor> DiscoverAspNetEndpoints()
Discover all ASP.NET endpoints with full metadata. This includes authorization, parameters, responses, and OpenAPI metadata.
Returns
List of discovered endpoints with full ASP.NET metadata.
method DiscoverEndpoints() #
DiscoverEndpoints() #public IReadOnlyList<EndpointDescriptor> DiscoverEndpoints()
Discovers all endpoints in the application.
Returns
The discovered endpoints.
method DiscoverSchemaDefinitions() #
DiscoverSchemaDefinitions() #public IReadOnlyDictionary<string, SchemaDefinition> DiscoverSchemaDefinitions()
Gets schema definitions keyed by schema identifier.
method RefreshEndpoints() #
RefreshEndpoints() #public void RefreshEndpoints()
Force a refresh of the discovered endpoints. Call this after endpoints are registered (e.g., after MapControllers).
record AspNetEndpointDescriptor
public sealed record AspNetEndpointDescriptor
Extended endpoint descriptor with full ASP.NET metadata. Captures all discoverable information from ASP.NET endpoints for Router registration.
Members
| Member | Kind | Summary |
|---|---|---|
AspNetEndpointDescriptor( | constructor | Creates an instance of Asp. |
AllowAnonymous | property | Whether anonymous access is explicitly allowed ([AllowAnonymous]). |
AuthorizationFullyMapped | property | True when every authorization rule declared on this endpoint was resolved and translated: each named policy was found, and each of its requirements became a claim requirement or is a pure authentication requirement. |
AuthorizationPolicies | property | Named authorization policies applied to this endpoint. |
AuthorizationSource | property | Source of the authorization metadata. |
DefaultTimeout | property | Default timeout for this endpoint. |
Description | property | Description for OpenAPI (from .WithDescription()). |
Method | property | HTTP method (GET, POST, PUT, PATCH, DELETE, etc.). |
OperationId | property | Operation ID for OpenAPI (from .WithName() or endpoint name). |
Parameters | property | Parameter metadata for this endpoint (route, query, header, body). |
Path | property | Normalized path template (e.g., “/api/scans/{id}”). |
RequiresAuthentication | property | Whether an authenticated principal is required. |
RequiringClaims | property | Claim requirements for authorization, derived from ASP.NET metadata and/or YAML. |
Responses | property | Response metadata for this endpoint (status codes, types). |
Roles | property | Role names required for this endpoint (from [Authorize(Roles = “…”)]). |
SchemaInfo | property | Schema information for request/response validation. |
ServiceName | property | Name of the service that owns this endpoint. |
Summary | property | Summary for OpenAPI (from .WithSummary() or display name). |
SupportsStreaming | property | Whether this endpoint supports streaming responses. |
Tags | property | Tags for OpenAPI grouping (from .WithTags()). |
UnmappedAuthorizationRequirements | property | Requirement type names this endpoint’s authorization declared and the claim mapper could NOT translate into a published claim requirement. |
Version | property | Semantic version of the service. |
ToEndpointDescriptor( | method | Convert to standard Router EndpointDescriptor for HELLO payload. |
constructor AspNetEndpointDescriptor() #
AspNetEndpointDescriptor() #public AspNetEndpointDescriptor()
Creates an instance of Asp.
property AllowAnonymous #
AllowAnonymous #public bool AllowAnonymous { get; init; }
Whether anonymous access is explicitly allowed ([AllowAnonymous]).
property AuthorizationFullyMapped #
AuthorizationFullyMapped #public bool AuthorizationFullyMapped { get; init; }
True when every authorization rule declared on this endpoint was resolved and translated: each named policy was found, and each of its requirements became a claim requirement or is a pure authentication requirement. False is the fail-closed default; see EndpointDescriptor..
property AuthorizationPolicies #
AuthorizationPolicies #public IReadOnlyList<string> AuthorizationPolicies { get; init; }
Named authorization policies applied to this endpoint.
property AuthorizationSource #
AuthorizationSource #public AuthorizationSource AuthorizationSource { get; init; }
Source of the authorization metadata.
property DefaultTimeout #
DefaultTimeout #public TimeSpan DefaultTimeout { get; init; }
Default timeout for this endpoint.
property Description #
Description #public string? Description { get; init; }
Description for OpenAPI (from .WithDescription()).
property Method #
Method #public required string Method { get; init; }
HTTP method (GET, POST, PUT, PATCH, DELETE, etc.).
property OperationId #
OperationId #public string? OperationId { get; init; }
Operation ID for OpenAPI (from .WithName() or endpoint name).
property Parameters #
Parameters #public IReadOnlyList<ParameterDescriptor> Parameters { get; init; }
Parameter metadata for this endpoint (route, query, header, body).
property Path #
Path #public required string Path { get; init; }
Normalized path template (e.g., “/api/scans/{id}”). Constraints are stripped; catch-all markers are normalized.
property RequiresAuthentication #
RequiresAuthentication #public bool RequiresAuthentication { get; init; }
Whether an authenticated principal is required.
property RequiringClaims #
RequiringClaims #public IReadOnlyList<ClaimRequirement> RequiringClaims { get; init; }
Claim requirements for authorization, derived from ASP.NET metadata and/or YAML.
property Responses #
Responses #public IReadOnlyList<ResponseDescriptor> Responses { get; init; }
Response metadata for this endpoint (status codes, types).
property Roles #
Roles #public IReadOnlyList<string> Roles { get; init; }
Role names required for this endpoint (from [Authorize(Roles = “…”)]).
property SchemaInfo #
SchemaInfo #public EndpointSchemaInfo? SchemaInfo { get; init; }
Schema information for request/response validation.
property ServiceName #
ServiceName #public required string ServiceName { get; init; }
Name of the service that owns this endpoint.
property Summary #
Summary #public string? Summary { get; init; }
Summary for OpenAPI (from .WithSummary() or display name).
property SupportsStreaming #
SupportsStreaming #public bool SupportsStreaming { get; init; }
Whether this endpoint supports streaming responses.
property Tags #
Tags #public IReadOnlyList<string> Tags { get; init; }
Tags for OpenAPI grouping (from .WithTags()).
property UnmappedAuthorizationRequirements #
UnmappedAuthorizationRequirements #public IReadOnlyList<string> UnmappedAuthorizationRequirements { get; init; }
Requirement type names this endpoint’s authorization declared and the claim mapper could NOT translate into a published claim requirement. Non-empty means the gateway would otherwise enforce less than the host declared, so it refuses instead.
property Version #
Version #public required string Version { get; init; }
Semantic version of the service.
method ToEndpointDescriptor() #
ToEndpointDescriptor() #public EndpointDescriptor ToEndpointDescriptor()
Convert to standard Router EndpointDescriptor for HELLO payload.
class AspNetEndpointOverrideMerger
public sealed class AspNetEndpointOverrideMerger : IAspNetEndpointOverrideMerger
Merges endpoint overrides from YAML configuration with ASP.NET-discovered endpoints, supporting different authorization mapping strategies.
Members
| Member | Kind | Summary |
|---|---|---|
AspNetEndpointOverrideMerger( | constructor | Initializes a new instance of the AspNetEndpointOverrideMergerclass. |
Merge( | method | Merges YAML overrides with code-defined endpoints. |
constructor AspNetEndpointOverrideMerger(StellaRouterBridgeOptions, ILogger<AspNetEndpointOverrideMerger>) #
AspNetEndpointOverrideMerger(StellaRouterBridgeOptions, ILogger<AspNetEndpointOverrideMerger>) #public AspNetEndpointOverrideMerger(StellaRouterBridgeOptions bridgeOptions, ILogger<AspNetEndpointOverrideMerger> logger)
Initializes a new instance of the AspNetEndpointOverrideMergerclass.
method Merge(IReadOnlyList<EndpointDescriptor>, MicroserviceYamlConfig) #
Merge(IReadOnlyList<EndpointDescriptor>, MicroserviceYamlConfig) #public IReadOnlyList<EndpointDescriptor> Merge(IReadOnlyList<EndpointDescriptor> codeEndpoints, MicroserviceYamlConfig? yamlConfig)
Merges YAML overrides with code-defined endpoints.
Parameters
codeEndpoints: The endpoints discovered from code.yamlConfig: The YAML configuration, if any.
Returns
The merged endpoints.
class AspNetRouterRequestDispatcher
public sealed class AspNetRouterRequestDispatcher : IAspNetRouterRequestDispatcher
Dispatches Router request frames through the ASP.NET Core pipeline.
Members
| Member | Kind | Summary |
|---|---|---|
AspNetRouterRequestDispatcher( | constructor | Creates the dispatcher that runs Router requests through the ASP.NET Core endpoints. |
DispatchAsync( | method | Dispatch a Router request frame through the ASP.NET pipeline. |
constructor AspNetRouterRequestDispatcher(IServiceProvider, EndpointDataSource, StellaRouterBridgeOptions, ILogger<AspNetRouterRequestDispatcher>) #
AspNetRouterRequestDispatcher(IServiceProvider, EndpointDataSource, StellaRouterBridgeOptions, ILogger<AspNetRouterRequestDispatcher>) #public AspNetRouterRequestDispatcher(IServiceProvider serviceProvider, EndpointDataSource endpointDataSource, StellaRouterBridgeOptions options, ILogger<AspNetRouterRequestDispatcher> logger)
Creates the dispatcher that runs Router requests through the ASP.NET Core endpoints.
Parameters
serviceProvider: The application services.endpointDataSource: The application’s endpoints.options: The bridge options.logger: Receives the dispatch diagnostics.
method DispatchAsync(RequestFrame, CancellationToken) #
DispatchAsync(RequestFrame, CancellationToken) #public Task<ResponseFrame> DispatchAsync(RequestFrame request, CancellationToken cancellationToken = default)
Dispatch a Router request frame through the ASP.NET pipeline.
Parameters
request: The incoming Router request frame.cancellationToken: Cancellation token.
Returns
The response frame after ASP.NET processing.
record AuthorizationMappingResult
public sealed record AuthorizationMappingResult
Result of authorization mapping for an endpoint.
Members
| Member | Kind | Summary |
|---|---|---|
AuthorizationMappingResult( | constructor | Creates an instance of Authorization. |
AllowAnonymous | property | Whether [AllowAnonymous] was found. |
Claims | property | Claim requirements for Router authorization. |
FullyMapped | property | True when every declared authorization rule was resolved and translated: every named policy was found and every requirement became a claim requirement or is a pure authentication requirement (Deny). |
HasAuthorization | property | Whether any authorization metadata was found. |
Policies | property | Named policies found on the endpoint. |
Roles | property | Roles found on the endpoint. |
Source | property | Source of the authorization metadata. |
UnmappedRequirements | property | Requirement type names the mapper could not translate into a claim requirement, plus the names of policies it could not resolve at all. |
constructor AuthorizationMappingResult() #
AuthorizationMappingResult() #public AuthorizationMappingResult()
Creates an instance of Authorization.
property AllowAnonymous #
AllowAnonymous #public bool AllowAnonymous { get; init; }
Whether [AllowAnonymous] was found.
property Claims #
Claims #public IReadOnlyList<ClaimRequirement> Claims { get; init; }
Claim requirements for Router authorization.
property FullyMapped #
FullyMapped #public bool FullyMapped { get; }
True when every declared authorization rule was resolved and translated: every named policy was found and every requirement became a claim requirement or is a pure authentication requirement (Deny). The gateway allows a zero-claim endpoint only on this assurance.
property HasAuthorization #
HasAuthorization #public bool HasAuthorization { get; }
Whether any authorization metadata was found.
property Policies #
Policies #public IReadOnlyList<string> Policies { get; init; }
Named policies found on the endpoint.
property Roles #
Roles #public IReadOnlyList<string> Roles { get; init; }
Roles found on the endpoint.
property Source #
Source #public AuthorizationSource Source { get; init; }
Source of the authorization metadata.
property UnmappedRequirements #
UnmappedRequirements #public IReadOnlyList<string> UnmappedRequirements { get; init; }
Requirement type names the mapper could not translate into a claim requirement, plus the names of policies it could not resolve at all. An AssertionRequirement from Require is the common entry. Non-empty means the published claim set is WEAKER than what the host declared.
enum AuthorizationMappingStrategy
public enum AuthorizationMappingStrategy
Strategy for mapping ASP.NET authorization metadata to Router claim requirements.
enum AuthorizationSource
public enum AuthorizationSource
Source of authorization metadata for an endpoint.
class DefaultAuthorizationClaimMapper
public sealed class DefaultAuthorizationClaimMapper : IAuthorizationClaimMapper
Default implementation of IAuthorizationClaimMapper. Extracts authorization metadata from ASP.NET endpoints and maps to Router claims.
Members
| Member | Kind | Summary |
|---|---|---|
DefaultAuthorizationClaimMapper( | constructor | Creates the mapper. |
Map( | method | Synchronous version of MapAsync for scenarios where async is not needed. |
MapAsync( | method | Map ASP.NET authorization metadata from a RouteEndpoint to Router claims. |
constructor DefaultAuthorizationClaimMapper(IAuthorizationPolicyProvider, ILogger<DefaultAuthorizationClaimMapper>, StellaRouterBridgeOptions) #
DefaultAuthorizationClaimMapper(IAuthorizationPolicyProvider, ILogger<DefaultAuthorizationClaimMapper>, StellaRouterBridgeOptions) #public DefaultAuthorizationClaimMapper(IAuthorizationPolicyProvider policyProvider, ILogger<DefaultAuthorizationClaimMapper> logger, StellaRouterBridgeOptions? bridgeOptions = null)
Creates the mapper.
Parameters
policyProvider: Resolves the authorization policies endpoints name.logger: Receives a warning, once per policy, for a policy that cannot be mapped.bridgeOptions: The bridge options; the defaults apply when not set.
method Map(RouteEndpoint) #
Map(RouteEndpoint) #public AuthorizationMappingResult Map(RouteEndpoint endpoint)
Synchronous version of MapAsync for scenarios where async is not needed.
Parameters
endpoint: The ASP.NET RouteEndpoint to analyze.
Returns
The authorization mapping result.
method MapAsync(RouteEndpoint, CancellationToken) #
MapAsync(RouteEndpoint, CancellationToken) #public Task<AuthorizationMappingResult> MapAsync(RouteEndpoint endpoint, CancellationToken cancellationToken = default)
Map ASP.NET authorization metadata from a RouteEndpoint to Router claims.
Parameters
endpoint: The ASP.NET RouteEndpoint to analyze.cancellationToken: Cancellation token.
Returns
The authorization mapping result with claims, policies, and roles.
enum GatewayAuthorizationTrustMode
public enum GatewayAuthorizationTrustMode
Service-side trust mode for gateway authorization and identity envelopes. In no mode does the bridge take the caller identity from request headers such as X-StellaOps-Actor.
interface IAspNetEndpointDiscoveryProvider
public interface IAspNetEndpointDiscoveryProvider : IEndpointDiscoveryProvider
Provides ASP.NET endpoint discovery with full metadata extraction. Extends the base IEndpointDiscoveryProvider to include ASP.NET-specific details.
Members
| Member | Kind | Summary |
|---|---|---|
DiscoverAspNetEndpoints( | method | Discover all ASP.NET endpoints with full metadata. |
RefreshEndpoints( | method | Force a refresh of the discovered endpoints. |
method DiscoverAspNetEndpoints() #
DiscoverAspNetEndpoints() #IReadOnlyList<AspNetEndpointDescriptor> DiscoverAspNetEndpoints()
Discover all ASP.NET endpoints with full metadata. This includes authorization, parameters, responses, and OpenAPI metadata.
Returns
List of discovered endpoints with full ASP.NET metadata.
method RefreshEndpoints() #
RefreshEndpoints() #void RefreshEndpoints()
Force a refresh of the discovered endpoints. Call this after endpoints are registered (e.g., after MapControllers).
interface IAspNetEndpointOverrideMerger
public interface IAspNetEndpointOverrideMerger : IEndpointOverrideMerger
Interface for merging endpoint overrides with ASP.NET-specific authorization mapping strategy support. Extends the base IEndpointOverrideMergerto support strategy-aware claim merging.
interface IAspNetRouterRequestDispatcher
public interface IAspNetRouterRequestDispatcher
Dispatches Router request frames through the ASP.NET Core pipeline.
Members
| Member | Kind | Summary |
|---|---|---|
DispatchAsync( | method | Dispatch a Router request frame through the ASP.NET pipeline. |
method DispatchAsync(RequestFrame, CancellationToken) #
DispatchAsync(RequestFrame, CancellationToken) #Task<ResponseFrame> DispatchAsync(RequestFrame request, CancellationToken cancellationToken = default)
Dispatch a Router request frame through the ASP.NET pipeline.
Parameters
request: The incoming Router request frame.cancellationToken: Cancellation token.
Returns
The response frame after ASP.NET processing.
interface IAuthorizationClaimMapper
public interface IAuthorizationClaimMapper
Maps ASP.NET authorization metadata to Router claim requirements.
Members
| Member | Kind | Summary |
|---|---|---|
Map( | method | Synchronous version of MapAsync for scenarios where async is not needed. |
MapAsync( | method | Map ASP.NET authorization metadata from a RouteEndpoint to Router claims. |
method Map(RouteEndpoint) #
Map(RouteEndpoint) #AuthorizationMappingResult Map(RouteEndpoint endpoint)
Synchronous version of MapAsync for scenarios where async is not needed.
Parameters
endpoint: The ASP.NET RouteEndpoint to analyze.
Returns
The authorization mapping result.
method MapAsync(RouteEndpoint, CancellationToken) #
MapAsync(RouteEndpoint, CancellationToken) #Task<AuthorizationMappingResult> MapAsync(RouteEndpoint endpoint, CancellationToken cancellationToken = default)
Map ASP.NET authorization metadata from a RouteEndpoint to Router claims.
Parameters
endpoint: The ASP.NET RouteEndpoint to analyze.cancellationToken: Cancellation token.
Returns
The authorization mapping result with claims, policies, and roles.
interface IRouterTenantResolver
public interface IRouterTenantResolver
Binds the tenant of a request that the Router dispatches into ASP.NET Core.
Remarks
A dispatched request does not run the host’s middleware pipeline, so tenant middleware never sees it. A host that resolves its tenant in middleware registers one implementation of this interface. AspNetRouterRequestDispatcherresolves it from the request services and calls it once per request whose identity came from a verified gateway identity envelope, after the dispatcher has authenticated the request and before it matches the endpoint.
The implementation reads HttpContext.User and the request headers and stores the tenant in the host’s own request state. The dispatcher does not read a result. When no implementation is registered, the dispatcher binds no tenant.
The call is synchronous, so a value the implementation writes to an AsyncLocal<T> stays visible to the endpoint that the dispatcher runs next.
Members
| Member | Kind | Summary |
|---|---|---|
ResolveTenant( | method | Resolves the tenant of the dispatched request and binds it for the endpoint. |
method ResolveTenant(HttpContext) #
ResolveTenant(HttpContext) #void ResolveTenant(HttpContext httpContext)
Resolves the tenant of the dispatched request and binds it for the endpoint.
Parameters
httpContext: The request context the dispatcher built from the Router frame.
enum MissingAuthorizationBehavior
public enum MissingAuthorizationBehavior
Behavior when an endpoint has no authorization metadata.
record ParameterDescriptor
public sealed record ParameterDescriptor
Describes a parameter for an endpoint.
Members
| Member | Kind | Summary |
|---|---|---|
ParameterDescriptor( | constructor | Creates an instance of ParameterDescriptor. |
DefaultValue | property | Default value if the parameter is optional. |
Description | property | Description for documentation. |
IsRequired | property | Whether the parameter is required. |
JsonSchemaType | property | JSON Schema type name (for OpenAPI). |
Name | property | Parameter name. |
Source | property | Source of the parameter value (route, query, header, body, services). |
Type | property | CLR type of the parameter. |
constructor ParameterDescriptor() #
ParameterDescriptor() #public ParameterDescriptor()
Creates an instance of ParameterDescriptor.
property DefaultValue #
DefaultValue #public object? DefaultValue { get; init; }
Default value if the parameter is optional.
property Description #
Description #public string? Description { get; init; }
Description for documentation.
property IsRequired #
IsRequired #public bool IsRequired { get; init; }
Whether the parameter is required.
property JsonSchemaType #
JsonSchemaType #public string? JsonSchemaType { get; init; }
JSON Schema type name (for OpenAPI).
property Name #
Name #public required string Name { get; init; }
Parameter name.
property Source #
Source #public required ParameterSource Source { get; init; }
Source of the parameter value (route, query, header, body, services).
property Type #
Type #public required Type Type { get; init; }
CLR type of the parameter.
enum ParameterSource
public enum ParameterSource
Source of a parameter value.
record ResponseDescriptor
public sealed record ResponseDescriptor
Describes a response for an endpoint.
Members
| Member | Kind | Summary |
|---|---|---|
ResponseDescriptor( | constructor | Creates an instance of ResponseDescriptor. |
ContentType | property | Content type (default: application/json). |
Description | property | Description for documentation. |
ResponseType | property | CLR type of the response body (null for no content). |
SchemaRef | property | JSON Schema reference for the response type. |
StatusCode | property | HTTP status code. |
constructor ResponseDescriptor() #
ResponseDescriptor() #public ResponseDescriptor()
Creates an instance of ResponseDescriptor.
property ContentType #
ContentType #public string ContentType { get; init; }
Content type (default: application/json).
property Description #
Description #public string? Description { get; init; }
Description for documentation.
property ResponseType #
ResponseType #public Type? ResponseType { get; init; }
CLR type of the response body (null for no content).
property SchemaRef #
SchemaRef #public string? SchemaRef { get; init; }
JSON Schema reference for the response type.
property StatusCode #
StatusCode #public required int StatusCode { get; init; }
HTTP status code.
class RouterPublicationExclusionMetadata
public sealed class RouterPublicationExclusionMetadata
Endpoint metadata that keeps one ASP.NET endpoint off the Router entirely: the bridge does not publish it in the HELLO payload, so the gateway cannot resolve it, and the router request dispatcher refuses it (404), so a frame that names its path still cannot reach it. The endpoint stays served by the host’s own HTTP listener.
Remarks
Attach it at the mapping site with ASP.NET’s own convention: ..
This differs from StellaRouterBridgeOptions.in two ways. It is declared at the mapping site of one endpoint, not estate-wide by prefix. And it makes the endpoint unreachable through the Router, where a prefix exclusion only unpublishes (the dispatcher still serves an excluded prefix).
Use it only for a service-to-service endpoint that callers inside the network reach directly and that must not be exposed at the gateway. The reason is required and is logged at discovery, because an exclusion without a recorded reason cannot be told apart from an oversight (the rule stated on StellaRouterBridgeOptions.).
Members
| Member | Kind | Summary |
|---|---|---|
RouterPublicationExclusionMetadata( | constructor | Creates the marker. |
Reason | property | Why the endpoint is kept off the Router. |
constructor RouterPublicationExclusionMetadata(string) #
RouterPublicationExclusionMetadata(string) #public RouterPublicationExclusionMetadata(string reason)
Creates the marker.
Parameters
reason: Why the endpoint must not be reachable through the Router.
property Reason #
Reason #public string Reason { get; }
Why the endpoint is kept off the Router.
class StellaRouterBridgeExtensions
public static class StellaRouterBridgeExtensions
Extension methods for configuring the StellaOps Router ASP.NET Core bridge.
Members
| Member | Kind | Summary |
|---|---|---|
AddStellaRouterBridge( | extension method | Adds StellaOps Router bridge services to the service collection. |
AddStellaRouterBridge< | extension method | Adds StellaOps Router bridge services with a custom authorization claim mapper. |
RefreshStellaRouterEndpoints( | extension method | Refreshes the endpoint discovery cache. |
UseStellaRouterBridge( | extension method | Enables the StellaOps Router bridge middleware. |
extension method AddStellaRouterBridge(IServiceCollection, Action<StellaRouterBridgeOptions>, bool) #
AddStellaRouterBridge(IServiceCollection, Action<StellaRouterBridgeOptions>, bool) #public static IServiceCollection AddStellaRouterBridge(this IServiceCollection services, Action<StellaRouterBridgeOptions> configure, bool registerMicroserviceServices = true)
Adds StellaOps Router bridge services to the service collection. This enables ASP.NET Core endpoints to be automatically registered and dispatched via the Router.
Parameters
services: The service collection.configure: Action to configure the bridge options.register: If true (default), also registers the base microservice services. Set to false when using AddStellaRouter() which handles this separately.Microservice Services
Returns
The service collection for chaining.
Exceptions
Argument: Thrown if services or configure is null.Null Exception Invalid: Thrown if required options are not configured.Operation Exception
extension method AddStellaRouterBridge<TMapper>(IServiceCollection, Action<StellaRouterBridgeOptions>) #
AddStellaRouterBridge<TMapper>(IServiceCollection, Action<StellaRouterBridgeOptions>) #public static IServiceCollection AddStellaRouterBridge<TMapper>(this IServiceCollection services, Action<StellaRouterBridgeOptions> configure) where TMapper : class, IAuthorizationClaimMapper
Adds StellaOps Router bridge services with a custom authorization claim mapper.
Type parameters
TMapper: The custom authorization claim mapper type.
Parameters
services: The service collection.configure: Action to configure the bridge options.
Returns
The service collection for chaining.
extension method RefreshStellaRouterEndpoints(IApplicationBuilder) #
RefreshStellaRouterEndpoints(IApplicationBuilder) #public static IApplicationBuilder RefreshStellaRouterEndpoints(this IApplicationBuilder app)
Refreshes the endpoint discovery cache. Call this after all endpoints are registered (e.g., after MapControllers).
Parameters
app: The application builder.
Returns
The application builder for chaining.
extension method UseStellaRouterBridge(IApplicationBuilder) #
UseStellaRouterBridge(IApplicationBuilder) #public static IApplicationBuilder UseStellaRouterBridge(this IApplicationBuilder app)
Enables the StellaOps Router bridge middleware. This should be called after UseRouting() and before endpoint registration.
Parameters
app: The application builder.
Returns
The application builder for chaining.
Exceptions
Invalid: Thrown if called before UseRouting() or if bridge services are not configured.Operation Exception
class StellaRouterBridgeOptions
public sealed class StellaRouterBridgeOptions
Configuration options for the ASP.NET Core Router bridge.
Members
| Member | Kind | Summary |
|---|---|---|
StellaRouterBridgeOptions( | constructor | Creates an instance of Stella. |
AuthorizationMapping | property | Strategy for mapping ASP.NET authorization to Router claims. |
AuthorizationTrustMode | property | How the bridge sets the caller identity (HttpContext.User) of a dispatched request. |
DefaultTimeout | property | Default timeout for bridged endpoints (overridable per-endpoint via YAML). |
EnableStreaming | property | Enable streaming support for endpoints marked as streaming-capable. |
EndpointFilter | property | Endpoint path filter. |
ExcludedPathPrefixes | property | Path prefixes withheld from the HELLO payload (publication only — the dispatcher still matches the raw ASP.NET EndpointDataSource, so an excluded path is unpublished, not unservable). |
ExtractOpenApiMetadata | property | Extract OpenAPI metadata (summary, description, tags). |
ExtractSchemas | property | Extract JSON schemas from Produces/Accepts metadata. |
IdentityEnvelopeClockSkew | property | Allowed clock skew when validating gateway identity envelope timestamps. |
IdentityEnvelopeSigningKey | property | Shared signing key used to verify gateway identity envelopes. |
IncludeExcludedPathsInRouter | property | Whether to include excluded paths in the Router registration. |
InstanceId | property | Unique instance identifier. |
OnMissingAuthorization | property | Behavior when endpoint has no authorization metadata and no YAML override. |
OnUnsupportedConstraint | property | Behavior for unsupported route constraints. |
Region | property | Deployment region. |
Routers | property | The gateways to connect to. |
ServiceDescription | property | Service description for documentation. |
ServiceName | property | Service name for Router registration. |
Version | property | Service version (semver). |
YamlConfigPath | property | Path to microservice.yaml for endpoint overrides. |
constructor StellaRouterBridgeOptions() #
StellaRouterBridgeOptions() #public StellaRouterBridgeOptions()
Creates an instance of Stella.
property AuthorizationMapping #
AuthorizationMapping #public AuthorizationMappingStrategy AuthorizationMapping { get; set; }
Strategy for mapping ASP.NET authorization to Router claims. Default: Hybrid (ASP.NET metadata + YAML overrides, YAML wins on conflict).
property AuthorizationTrustMode #
AuthorizationTrustMode #public GatewayAuthorizationTrustMode AuthorizationTrustMode { get; set; }
How the bridge sets the caller identity (HttpContext.User) of a dispatched request. The identity comes only from the identity envelope the gateway signs with StellaRouterBridgeOptions.; identity request headers such as X-StellaOps-Actor or X-StellaOps-Scopes are never read, whatever the mode. Default: Hybrid.
property DefaultTimeout #
DefaultTimeout #public TimeSpan DefaultTimeout { get; set; }
Default timeout for bridged endpoints (overridable per-endpoint via YAML). Default: 30 seconds.
property EnableStreaming #
EnableStreaming #public bool EnableStreaming { get; set; }
Enable streaming support for endpoints marked as streaming-capable. Default: false (all responses are buffered).
property EndpointFilter #
EndpointFilter #public Func<RouteEndpoint, bool>? EndpointFilter { get; set; }
Endpoint path filter. Only endpoints matching this predicate are bridged. Default: all endpoints (null).
property ExcludedPathPrefixes #
ExcludedPathPrefixes #public IList<string> ExcludedPathPrefixes { get; set; }
Path prefixes withheld from the HELLO payload (publication only — the dispatcher still matches the raw ASP.NET EndpointDataSource, so an excluded path is unpublished, not unservable).
Remarks
Matching is StartsWith, so a prefix also withholds every endpoint below it; add the narrowest prefix that applies. The defaults withhold the health, readiness and liveness probes, the metrics, the API description documents, the build information and the catalog change feed: per-instance signals, or paths that the gateway serves itself or routes explicitly.
property ExtractOpenApiMetadata #
ExtractOpenApiMetadata #public bool ExtractOpenApiMetadata { get; set; }
Extract OpenAPI metadata (summary, description, tags). Default: true.
property ExtractSchemas #
ExtractSchemas #public bool ExtractSchemas { get; set; }
Extract JSON schemas from Produces/Accepts metadata. Default: true.
property IdentityEnvelopeClockSkew #
IdentityEnvelopeClockSkew #public TimeSpan IdentityEnvelopeClockSkew { get; set; }
Allowed clock skew when validating gateway identity envelope timestamps.
property IdentityEnvelopeSigningKey #
IdentityEnvelopeSigningKey #public string? IdentityEnvelopeSigningKey { get; set; }
Shared signing key used to verify gateway identity envelopes. The gateway signs with the same key. Without it no envelope verifies: Hybrid requests run without a caller identity and GatewayEnforced requests are refused.
property IncludeExcludedPathsInRouter #
IncludeExcludedPathsInRouter #public bool IncludeExcludedPathsInRouter { get; set; }
Whether to include excluded paths in the Router registration. When false (default), excluded endpoints are not registered with Router.
property InstanceId #
InstanceId #public string? InstanceId { get; set; }
Unique instance identifier. Auto-generated if not set.
property OnMissingAuthorization #
OnMissingAuthorization #public MissingAuthorizationBehavior OnMissingAuthorization { get; set; }
Behavior when endpoint has no authorization metadata and no YAML override. Default: RequireExplicit (fail discovery if no auth metadata).
property OnUnsupportedConstraint #
OnUnsupportedConstraint #public UnsupportedConstraintBehavior OnUnsupportedConstraint { get; set; }
Behavior for unsupported route constraints. Default: WarnAndStrip (log warning, strip constraint, continue).
property Region #
Region #public required string Region { get; set; }
Deployment region. Required.
property Routers #
Routers #public List<RouterEndpointConfig> Routers { get; set; }
The gateways to connect to. StellaRouterBridgeExtensions.passes them to the microservice options; at least one is required when it registers the microservice services.
property ServiceDescription #
ServiceDescription #public string? ServiceDescription { get; set; }
Service description for documentation.
property ServiceName #
ServiceName #public required string ServiceName { get; set; }
Service name for Router registration. Required.
property Version #
Version #public required string Version { get; set; }
Service version (semver). Required.
property YamlConfigPath #
YamlConfigPath #public string? YamlConfigPath { get; set; }
Path to microservice.yaml for endpoint overrides. Optional.
enum UnsupportedConstraintBehavior
public enum UnsupportedConstraintBehavior
Behavior for unsupported route constraints.