Nabs.Launchpad.Core.Gateway 10.0.214

Prefix Reserved
dotnet add package Nabs.Launchpad.Core.Gateway --version 10.0.214
                    
NuGet\Install-Package Nabs.Launchpad.Core.Gateway -Version 10.0.214
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nabs.Launchpad.Core.Gateway" Version="10.0.214" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.Gateway" Version="10.0.214" />
                    
Directory.Packages.props
<PackageReference Include="Nabs.Launchpad.Core.Gateway" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nabs.Launchpad.Core.Gateway --version 10.0.214
                    
#r "nuget: Nabs.Launchpad.Core.Gateway, 10.0.214"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nabs.Launchpad.Core.Gateway@10.0.214
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nabs.Launchpad.Core.Gateway&version=10.0.214
                    
Install as a Cake Addin
#tool nuget:?package=Nabs.Launchpad.Core.Gateway&version=10.0.214
                    
Install as a Cake Tool

Nabs Launchpad Core Gateway Library

A comprehensive API Gateway library built on Microsoft's YARP (Yet Another Reverse Proxy) with integrated Azure Active Directory authentication and custom authorization features.

Overview

The Nabs.Launchpad.Core.Gateway library provides a robust, production-ready API Gateway solution that acts as a reverse proxy for microservices architectures. It includes built-in authentication, authorization, CORS support, and service discovery capabilities.

Key Features

  • YARP-based Reverse Proxy: Built on Microsoft's high-performance YARP reverse proxy
  • Azure AD Integration: Full integration with Microsoft Identity platform for authentication
  • Custom Authorization: JWT token generation and validation for downstream services
  • Service Discovery: Integration with .NET Aspire service discovery
  • CORS Support: Configurable Cross-Origin Resource Sharing
  • Request Transformation: Automatic header injection and authorization token forwarding
  • Development Authentication: Test authentication handler for development scenarios
  • Configuration Validation: FluentValidation-based configuration validation

Key Components

Gateway Configuration

The library uses GatewayOptions to configure the gateway behavior:

public sealed class GatewayOptions
{
    public AuthorizationIssuerOptions AuthorizationIssuerOptions { get; set; }
    public YarpOptions YarpOptions { get; set; }
}

Authentication & Authorization

  • Production: Uses Microsoft Identity Web with Azure AD/Entra ID
  • Development: Optional test authentication handler for local development
  • JWT Token Generation: Issues custom JWT tokens for downstream service authentication
  • Authorization Policies: Configurable policies for UI and API access

YARP Integration

  • Service Discovery: Automatic service resolution using .NET Aspire
  • Request Transformation: Adds custom headers and authorization tokens
  • Load Balancing: Built-in load balancing capabilities through YARP

Usage

Basic Setup

var builder = WebApplication.CreateBuilder(args);

builder.AddGateway(gatewayOptions =>
{
    // Configure YARP options
    gatewayOptions.YarpOptions.HeaderName = "X-Custom-Header";
    gatewayOptions.YarpOptions.HeaderValue = "CustomValue";

    // Configure authorization issuer
    gatewayOptions.AuthorizationIssuerOptions.Issuer = "https://your-gateway";
    gatewayOptions.AuthorizationIssuerOptions.Audience = "https://your-api";
    gatewayOptions.AuthorizationIssuerOptions.Key = "your-secret-key";
});

var app = builder.Build();

app.UseGateway();

await app.RunAsync();

Configuration

The gateway expects YARP configuration in appsettings.json:

{
  "ReverseProxy": {
    "Routes": {
      "api-route": {
        "ClusterId": "api-cluster",
        "Match": {
          "Path": "/api/{**catch-all}"
        }
      }
    },
    "Clusters": {
      "api-cluster": {
        "Destinations": {
          "destination1": {
            "Address": "http://api-service/"
          }
        }
      }
    }
  },
  "AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "TenantId": "your-tenant-id",
    "ClientId": "your-client-id",
    "RedirectUri": "https://your-gateway/signin-oidc"
  }
}

Dependencies

  • Microsoft.AspNetCore.App: Core ASP.NET Core framework
  • Yarp.ReverseProxy: Microsoft's reverse proxy implementation
  • Microsoft.Extensions.ServiceDiscovery.Yarp: Service discovery integration
  • Microsoft.Identity.Web: Azure AD authentication
  • FluentValidation: Configuration validation
  • CommunityToolkit.Mvvm: MVVM helpers

Architecture

The gateway follows a layered architecture:

  1. Entry Point: ProjectExtensions provides fluent configuration API
  2. Authentication Layer: Handles Azure AD authentication and test scenarios
  3. Authorization Layer: Issues JWT tokens for downstream services
  4. Proxy Layer: YARP handles request routing and transformation
  5. Service Discovery: Automatic service resolution and load balancing

Request Flow

  1. Incoming Request: Client sends request to gateway
  2. Authentication: Azure AD validates user identity
  3. Authorization: Gateway generates JWT token for downstream services
  4. Transformation: Custom headers and authorization tokens are added
  5. Routing: YARP routes request to appropriate backend service
  6. Response: Backend response is returned to client

Testing

The library includes comprehensive test harnesses:

  • Launchpad.Harness.Gateway: Test gateway application
  • Launchpad.Core.Gateway.UnitTests: Unit test suite
  • Integration Tests: Full end-to-end testing capabilities

Best Practices

  1. Security: Always use HTTPS in production
  2. Configuration: Validate all configuration options
  3. Monitoring: Implement proper logging and telemetry
  4. Performance: Configure appropriate timeouts and connection limits
  5. Scalability: Use service discovery for dynamic service resolution

Development

For development scenarios, the gateway can be configured with test authentication:

// Uncomment for development testing
builder.Services.AddAuthentication("TestAuth")
    .AddScheme<AuthenticationSchemeOptions, TestAuthHandler>("TestAuth", null);
  • Nabs.Launchpad.Core.ServiceDefaults: Common service configurations
  • Nabs.Launchpad.Core.Portal: Blazor UI that can run behind the gateway
  • Nabs.Launchpad.Core.SiloClient: Orleans client integration

License

This project is part of the Nabs Launchpad framework by Net Advantage Business Solutions.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.214 0 1/1/2026
10.0.213 0 1/1/2026 10.0.213 is deprecated because it is no longer maintained.
10.0.212 0 1/1/2026 10.0.212 is deprecated because it is no longer maintained.
10.0.211 0 12/31/2025 10.0.211 is deprecated because it is no longer maintained.
10.0.210 32 12/30/2025 10.0.210 is deprecated because it is no longer maintained.
10.0.209 40 12/30/2025 10.0.209 is deprecated because it is no longer maintained.
10.0.208 36 12/30/2025 10.0.208 is deprecated because it is no longer maintained.
10.0.207 46 12/29/2025 10.0.207 is deprecated because it is no longer maintained.
10.0.206 42 12/29/2025 10.0.206 is deprecated because it is no longer maintained.
10.0.205 162 12/24/2025 10.0.205 is deprecated because it is no longer maintained.
10.0.204 162 12/21/2025 10.0.204 is deprecated because it is no longer maintained.
10.0.203 260 12/18/2025 10.0.203 is deprecated because it is no longer maintained.
10.0.202 259 12/17/2025 10.0.202 is deprecated because it is no longer maintained.
10.0.200 264 12/17/2025 10.0.200 is deprecated because it is no longer maintained.
10.0.199 423 12/10/2025 10.0.199 is deprecated because it is no longer maintained.
10.0.197 156 12/5/2025 10.0.197 is deprecated because it is no longer maintained.
10.0.196 667 12/3/2025 10.0.196 is deprecated because it is no longer maintained.
10.0.195 666 12/3/2025 10.0.195 is deprecated because it is no longer maintained.
10.0.194 661 12/3/2025 10.0.194 is deprecated because it is no longer maintained.
10.0.193 661 12/2/2025 10.0.193 is deprecated because it is no longer maintained.
10.0.192 162 11/28/2025 10.0.192 is deprecated because it is no longer maintained.
10.0.190 179 11/27/2025 10.0.190 is deprecated because it is no longer maintained.
10.0.189 162 11/23/2025 10.0.189 is deprecated because it is no longer maintained.
10.0.187 164 11/23/2025 10.0.187 is deprecated because it is no longer maintained.
10.0.186 145 11/23/2025 10.0.186 is deprecated because it is no longer maintained.
10.0.184 401 11/20/2025 10.0.184 is deprecated because it is no longer maintained.
10.0.181-rc3 275 11/11/2025 10.0.181-rc3 is deprecated because it is no longer maintained.
10.0.180 283 11/11/2025 10.0.180 is deprecated because it is no longer maintained.
10.0.179-rc2 273 11/11/2025 10.0.179-rc2 is deprecated because it is no longer maintained.
10.0.178-rc2 235 11/10/2025 10.0.178-rc2 is deprecated because it is no longer maintained.
10.0.177-rc2 220 11/10/2025 10.0.177-rc2 is deprecated because it is no longer maintained.
10.0.176-rc2 191 11/6/2025 10.0.176-rc2 is deprecated because it is no longer maintained.
10.0.175-rc2 185 11/6/2025 10.0.175-rc2 is deprecated because it is no longer maintained.
10.0.174-rc2 185 11/5/2025 10.0.174-rc2 is deprecated because it is no longer maintained.
10.0.173-rc2 183 11/3/2025 10.0.173-rc2 is deprecated because it is no longer maintained.
10.0.172-rc2 137 11/2/2025 10.0.172-rc2 is deprecated because it is no longer maintained.
10.0.170-rc2 115 11/1/2025 10.0.170-rc2 is deprecated because it is no longer maintained.
10.0.169-rc2 114 11/1/2025 10.0.169-rc2 is deprecated because it is no longer maintained.
10.0.168-rc2 124 10/31/2025 10.0.168-rc2 is deprecated because it is no longer maintained.
10.0.166-rc2 117 10/31/2025 10.0.166-rc2 is deprecated because it is no longer maintained.
10.0.164-rc2 179 10/28/2025 10.0.164-rc2 is deprecated because it is no longer maintained.
10.0.162-rc2 180 10/24/2025 10.0.162-rc2 is deprecated because it is no longer maintained.
10.0.161 183 10/24/2025 10.0.161 is deprecated because it is no longer maintained.
9.0.151 113 10/17/2025 9.0.151 is deprecated because it is no longer maintained.
9.0.150 172 9/10/2025 9.0.150 is deprecated because it is no longer maintained.
9.0.146 119 8/15/2025 9.0.146 is deprecated because it is no longer maintained.
9.0.145 196 8/11/2025 9.0.145 is deprecated because it is no longer maintained.
9.0.144 179 8/8/2025 9.0.144 is deprecated because it is no longer maintained.
9.0.137 135 7/29/2025 9.0.137 is deprecated because it is no longer maintained.
9.0.136 130 7/29/2025 9.0.136 is deprecated because it is no longer maintained.
9.0.135 153 7/28/2025 9.0.135 is deprecated because it is no longer maintained.
9.0.134 166 7/9/2025 9.0.134 is deprecated because it is no longer maintained.
9.0.133 180 7/9/2025 9.0.133 is deprecated because it is no longer maintained.
9.0.132 174 7/9/2025 9.0.132 is deprecated because it is no longer maintained.
9.0.131 186 7/9/2025 9.0.131 is deprecated because it is no longer maintained.
9.0.130 179 7/7/2025 9.0.130 is deprecated because it is no longer maintained.