Trellis.Yarp
0.1.0-alpha.29
dotnet add package Trellis.Yarp --version 0.1.0-alpha.29
NuGet\Install-Package Trellis.Yarp -Version 0.1.0-alpha.29
<PackageReference Include="Trellis.Yarp" Version="0.1.0-alpha.29" />
<PackageVersion Include="Trellis.Yarp" Version="0.1.0-alpha.29" />
<PackageReference Include="Trellis.Yarp" />
paket add Trellis.Yarp --version 0.1.0-alpha.29
#r "nuget: Trellis.Yarp, 0.1.0-alpha.29"
#:package Trellis.Yarp@0.1.0-alpha.29
#addin nuget:?package=Trellis.Yarp&version=0.1.0-alpha.29&prerelease
#tool nuget:?package=Trellis.Yarp&version=0.1.0-alpha.29&prerelease
Trellis.Yarp
YARP gateway integration for Trellis. Re-mints a per-cluster internal JWT from the full Trellis Actor (id + permissions + forbidden permissions + ABAC attributes), exposes an OIDC discovery + JWKS endpoint pair so downstream services can use AddJwtBearer(o => o.Authority = gatewayUrl) for transparent key rotation, and emits redacted audit telemetry on every mint.
Pairs with the consumer-side TrellisInternalJwtActorProvider in Trellis.Microservices.AspNetCore.
Key features
AddTrellisActorForwarding—IReverseProxyBuilderextension; per-request transform that mints a fresh per-cluster JWT from the fullActorand overwrites the upstreamAuthorizationheader.MapTrellisDiscoveryEndpoint— exposes/.well-known/openid-configuration+/.well-known/jwks.json. JWKS includes every key in the active rotation ring.- Asymmetric-only signing,
kidrequired on every key (startup-validated). - Sentinel + count claims —
trellis_actor_contract_version=1,trellis_permissions_count,trellis_forbidden_permissions_count(always emitted, even when zero) + freshjtiper token. Detects the privilege-escalation footgun where a misbehaving proxy strips the deny-permission set. - Redacted audit telemetry — every mint emits a
[LoggerMessage]event carrying only low-cardinality metadata:kid,jti,iss,aud,exp(unix-seconds), and projected permission / forbidden counts. NEVER the raw JWT, raw claim values, or actor IDs.
Security boundary
Signing-key compromise = full identity spoof until key revocation propagates. Mitigations: short token lifetimes (capped [1m, 30m] at startup), kid-aware overlapping JWKS rotation, audit-log redaction, emergency revocation procedure.
Not AOT-compatible (YARP itself is not AOT-clean).
See the Trellis Microservices cookbook (Recipe 2 — "Microservices behind YARP, end-to-end") for the full operational walkthrough.
| Product | Versions 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. |
-
net10.0
- Microsoft.IdentityModel.JsonWebTokens (>= 8.19.1)
- Microsoft.IdentityModel.Tokens (>= 8.19.1)
- Trellis.Authorization (>= 3.0.0-alpha.360)
- Trellis.Core (>= 3.0.0-alpha.360)
- Trellis.Microservices.Abstractions (>= 0.1.0-alpha.29)
- Yarp.ReverseProxy (>= 2.3.0)
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 |
|---|---|---|
| 0.1.0-alpha.29 | 64 | 6/7/2026 |