Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gateway/build-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ policies:
version: v1.0.2
gomodule: github.com/wso2/gateway-controllers/policies/mcp-acl-list@v1
- name: mcp-auth
version: v1.0.3
version: v1.1.0
gomodule: github.com/wso2/gateway-controllers/policies/mcp-auth@v1
- name: mcp-authz
version: v1.0.1
Expand Down
12 changes: 12 additions & 0 deletions gateway/configs/config-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,18 @@ connect_timeout_ms = 5000
server_header_transformation = "OVERWRITE"
server_header_value = "WSO2 API Platform"

# HTTP Connection Manager (downstream) timeouts
# A value of zero disables any of these timeout settings.
[router.http_listener.timeouts]
# Max duration for the entire downstream request
request_timeout = "0s"
# Max duration to receive the complete request headers
request_headers_timeout = "0s"
# Idle timeout for a single HTTP stream/request
stream_idle_timeout = "5m"
# Idle timeout for the downstream connection
idle_timeout = "1h"

[router.policy_engine]
host = "policy-engine"
port = 9001
Expand Down
61 changes: 59 additions & 2 deletions gateway/gateway-controller/api/management-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4194,6 +4194,8 @@ components:
description: List of API-level policies applied to all operations unless overridden
items:
$ref: "#/components/schemas/Policy"
resilience:
$ref: "#/components/schemas/Resilience"
operations:
type: array
description: List of HTTP operations/routes
Expand Down Expand Up @@ -4223,7 +4225,8 @@ components:
example: my-upstream-1
basePath:
type: string
description: Base path prefix for all endpoints in this upstream (e.g., /api/v2). All requests to this upstream will have this path prepended.
description: Base path prefix for all endpoints in this upstream (e.g., /api/v2). All requests to this upstream will have this path prepended. Must start with '/' and must not end with '/'; omit for root.
pattern: '^/[a-zA-Z0-9\-._~!$&''()*+,;=:@%/]*[^/]$'
example: /api/v2
timeout:
$ref: "#/components/schemas/UpstreamTimeout"
Expand All @@ -4243,7 +4246,7 @@ components:
example: http://prod-backend-1:5000
weight:
type: integer
description: Weight for load balancing (optional, default 100)
description: Relative weight for load balancing across multiple upstream targets. Reserved for future multi-target load balancing; not applied yet (only the first target is currently used).
minimum: 0
maximum: 100
example: 80
Expand All @@ -4258,6 +4261,25 @@ components:
pattern: '^\d+(\.\d+)?(ms|s|m|h)$'
example: 5s

Resilience:
type: object
description: >
Backend/route timeout configuration. Maps to Envoy RouteAction timeouts.
Can be set at the API level (applies to all routes) and/or the operation level
(applies to that operation's route). When set at both levels, the operation-level
value takes precedence. When unset, the gateway's global route timeout defaults apply.
properties:
timeout:
type: string
description: Maximum time for the entire route (request to upstream response). "0s" disables the timeout.
pattern: '^\d+(\.\d+)?(ms|s|m|h)$'
example: 15s
idleTimeout:
type: string
description: Per-route stream idle timeout (overrides the listener stream idle timeout for this route). "0s" disables the timeout.
pattern: '^\d+(\.\d+)?(ms|s|m|h)$'
example: 0s

Upstream:
type: object
oneOf:
Expand Down Expand Up @@ -4313,6 +4335,8 @@ components:
description: List of policies applied only to this operation (overrides or adds to API-level policies)
items:
$ref: "#/components/schemas/Policy"
resilience:
$ref: "#/components/schemas/Resilience"

Policy:
type: object
Expand Down Expand Up @@ -5322,6 +5346,11 @@ components:
minLength: 1
maxLength: 253
example: "mcp1.example.com"
upstreamDefinitions:
type: array
description: List of reusable upstream definitions with optional timeout configurations. Referenced by upstream.ref.
items:
$ref: "#/components/schemas/UpstreamDefinition"
upstream:
description: The backend MCP server url and auth configurations
allOf:
Expand Down Expand Up @@ -5350,6 +5379,15 @@ components:
enum: [deployed, undeployed]
default: deployed
example: deployed
resilience:
$ref: '#/components/schemas/Resilience'
description: >
API-level backend/route timeout configuration. Applies to the traffic-forwarding
routes generated for this MCP proxy (GET/POST/DELETE on the MCP resource path).
Supported at the API level only. Because MCP transports are long-lived streams,
the route timeout defaults to disabled ("0s") for MCP unless a timeout is set here
(unlike REST/LLM, which fall back to the gateway's global route timeout); the idle
timeout remains the liveness guard.

MCPTool:
type: object
Expand Down Expand Up @@ -5790,6 +5828,11 @@ components:
type: string
description: Template name to use for this LLM Provider
example: openai
upstreamDefinitions:
type: array
description: List of reusable upstream definitions with optional timeout configurations. Referenced by upstream.ref.
items:
$ref: "#/components/schemas/UpstreamDefinition"
upstream:
allOf:
- $ref: "#/components/schemas/Upstream"
Expand Down Expand Up @@ -5818,6 +5861,13 @@ components:
enum: [deployed, undeployed]
default: deployed
example: deployed
resilience:
$ref: '#/components/schemas/Resilience'
description: >
API-level backend/route timeout configuration. Applies to all routes generated
for this LLM Provider (the routes that forward traffic upstream). Supported at the
API level only - LLM routes are synthesized by the gateway, so there is no
operation-level override.

UpstreamAuth:
type: object
Expand Down Expand Up @@ -6108,6 +6158,13 @@ components:
enum: [deployed, undeployed]
default: deployed
example: deployed
resilience:
$ref: '#/components/schemas/Resilience'
description: >
API-level backend/route timeout configuration. Applies to all routes generated
for this LLM Proxy (the routes that forward traffic upstream). Supported at the
API level only - LLM routes are synthesized by the gateway, so there is no
operation-level override.

SecretConfigurationRequest:
type: object
Expand Down
Loading
Loading