fix(gateway): standalone local route config with full Node/Transport/Routing/OpenApi sections

Mount router-gateway-local.json as appsettings.json (not appsettings.local.json)
so it fully replaces the baked-in config instead of merging. Add Node, Transports,
Routing, and OpenApi sections to make the file self-contained. Test validates all
required top-level sections are present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
master
2026-04-10 12:28:28 +03:00
parent a3fcee5ffa
commit f50a422939
6 changed files with 84 additions and 3 deletions

View File

@@ -143,7 +143,9 @@ docker compose -f docker-compose.stella-ops.yml logs -f scanner-web
### Router Frontdoor Configuration
`router-gateway` uses the microservice-first route table in `router-gateway-local.json`.
`router-gateway` uses the microservice-first route table in `router-gateway-local.json`,
mounted as the container's `appsettings.json` so the local route table replaces the baked-in
gateway route list instead of merging with it.
First-party Stella APIs are expected to flow through router transport; reverse proxy remains only for
external/bootstrap surfaces that cannot participate in router registration yet (for example OIDC browser
flows, Rekor, and static/platform bootstrap assets).

View File

@@ -372,7 +372,7 @@ services:
volumes:
- *cert-volume
- console-dist:/app/wwwroot:ro
- ${ROUTER_GATEWAY_CONFIG:-./router-gateway-local.json}:/app/appsettings.local.json:ro
- ${ROUTER_GATEWAY_CONFIG:-./router-gateway-local.json}:/app/appsettings.json:ro
- ./envsettings-override.json:/app/envsettings-override.json:ro
- ./gateway-ca-bundle.crt:/etc/ssl/certs/ca-certificates.crt:ro
ports:

View File

@@ -209,7 +209,7 @@ services:
volumes:
- ${STELLAOPS_CERT_VOLUME}
- console-dist:/app/wwwroot:ro
- ${ROUTER_GATEWAY_CONFIG:-./router-gateway-local.json}:/app/appsettings.local.json:ro
- ${ROUTER_GATEWAY_CONFIG:-./router-gateway-local.json}:/app/appsettings.json:ro
- ./envsettings-override.json:/app/envsettings-override.json:ro
- ./gateway-ca-bundle.crt:/etc/ssl/certs/ca-certificates.crt:ro
ports:

View File

@@ -1,5 +1,48 @@
{
"Gateway": {
"Node": {
"Region": "local",
"NodeId": "gw-local-01",
"Environment": "dev",
"NeighborRegions": [
]
},
"Transports": {
"Tcp": {
"Enabled": false,
"BindAddress": "0.0.0.0",
"Port": 9100,
"ReceiveBufferSize": 65536,
"SendBufferSize": 65536,
"MaxFrameSize": 16777216
},
"Tls": {
"Enabled": false,
"BindAddress": "0.0.0.0",
"Port": 9443,
"ReceiveBufferSize": 65536,
"SendBufferSize": 65536,
"MaxFrameSize": 16777216,
"CertificatePath": "",
"CertificateKeyPath": "",
"CertificatePassword": "",
"RequireClientCertificate": false,
"AllowSelfSigned": false
}
},
"Routing": {
"DefaultTimeout": "60s",
"GlobalTimeoutCap": "120s",
"MaxRequestBodySize": "100MB",
"StreamingEnabled": true,
"PreferLocalRegion": true,
"AllowDegradedInstances": true,
"StrictVersionMatching": true,
"NeighborRegions": [
]
},
"Auth": {
"DpopEnabled": false,
"AllowAnonymous": true,
@@ -23,6 +66,15 @@
]
}
},
"OpenApi": {
"Enabled": true,
"CacheTtlSeconds": 300,
"Title": "StellaOps Gateway API",
"Description": "Unified API aggregating all connected microservices.",
"Version": "1.0.0",
"ServerUrl": "/",
"TokenUrl": "/auth/token"
},
"Health": {
"StaleThreshold": "30s",
"DegradedThreshold": "20s",