API7 Gateway 3.9.21 Release Notes
Release Date: 2026-09-24
Breaking Changes
Plugins
-
Upgrade note
When a token is verified through remote introspection, the issuer allowlist in
claim_validator.issuer.valid_issuersis now enforced. An introspection response whoseissis missing or is not in the list is rejected withHTTP 401andWWW-Authenticate: Bearer realm="apisix", error="invalid_token", error_description="issuer validation failed", and the request does not reach the upstream. On 3.9.20 the allowlist was not applied on the introspection path, and such a token was forwarded upstream.Before upgrading, check every route whose
openid-connectconfiguration sets bothintrospection_endpointandclaim_validator.issuer.valid_issuers, and confirm that the introspection response of your identity provider carries anissthat is in the list. -
Upgrade note
The Data Plane now checks the SAML response as the SAML profile requires, without any new configuration. A login is refused when an assertion carries an
AudienceRestrictionthat does not name this service provider —sp_issuer, unlesssp_audiencesis set; when the assertion is used outside itsNotBeforeandNotOnOrAfterwindow by more than 60 seconds; when itsRecipient, or the response'sDestination, does not name this service provider's assertion consumer service URL; or when it answers a login request other than the one this session started. The identity is now read only from an assertion covered by the verified signature. On 3.9.20 none of these was checked.Unless
sp_acs_urlis set, the assertion consumer service URL is built from the scheme and host of the callback request. Behind a load balancer or ingress that terminates TLS without settingX-Forwarded-Proto, or that rewrites the host, the URL built by the gateway differs from the one your identity provider writes intoRecipient, and every login is refused after the upgrade.Before upgrading the Data Plane, set
sp_acs_urlto the public callback URL on routes served behind such a proxy, setsp_audiencesif your identity provider issues assertions for an audience other thansp_issuer, and make sure the gateway's clock is synchronized. A login that is in progress while its gateway instance is upgraded is started again rather than refused. -
batch-requests
Upgrade noteThe plugin now bounds the response bodies it aggregates, in addition to the limit on pipelined sub-requests added in 3.9.14. A single sub-response larger than
max_response_body_size(default1048576bytes, 1 MiB), or a batch whose sub-responses together exceedmax_response_body_size_total(default10485760bytes, 10 MiB), is answered withHTTP 502and, for example,{"error_msg":"response body of pipeline request 1 exceeds max_response_body_size"}. Sub-responses without aContent-Lengthare measured as well. On 3.9.20 neither limit existed, and every sub-response body was buffered in full.Both limits are options of the
batch-requestsplugin metadata. If you rely on batching large responses, raise them before upgrading the Data Plane. -
Upgrade note
Each rule's
actionsmust now hold exactly one[name, conf]pair. An action with extra elements and a rule with more than one action were accepted, stored and run on 3.9.20. The Control Plane now rejects both withHTTP 400and a message naming the problem, such asinvalid workflow plugin: invalid action: expected [name, conf]orworkflow plugin: rules.0.actions: Array must have at most 1 items.A workflow configuration of these two shapes that was stored before the upgrade becomes an error-level entry in the configuration compatibility report once its gateway instance is upgraded, and has to be corrected before it can be edited again.
Upgrade Notes
The Dashboard console is now served by the Control Plane binary itself. The api7-ee-3-integrated image runs a single process, contains neither Node.js nor a shell, no longer listens on port 3000, and no longer reads the dashboard_configuration.console.addr option.
The docker-compose.yaml in the offline package of this release is already updated. If you start the Control Plane from your own compose file or manifest that runs /nodejs/bin/node /app/server.js & /usr/local/api7/api7-ee-dashboard -c /usr/local/api7/conf/conf.yaml, or health checks it with /nodejs/bin/node, the container fails to start or is reported unhealthy after the upgrade. Pass only -c /usr/local/api7/conf/conf.yaml as the command, use /usr/local/api7/api7-ee-dashboard healthz as the health check, and remove console.addr and any exposure of port 3000. Deployments with the Helm chart need no change to their values.
Features
Plugins
- SAML Auth
- Added options to tighten or adjust how a login response is checked.
idp_issuersrestricts which issuers are accepted,sp_audiencessets the audiences this service provider answers to,sp_acs_urlpins the assertion consumer service URL instead of building it from the request, andclock_skewsets the tolerance for assertion timestamps (default60seconds).replay_dictnames a shared dictionary in which accepted assertions are remembered until they can no longer be accepted, plusclock_skew, or forreplay_ttlseconds (default600) when they carry no expiry, so that each is accepted only once per gateway instance. If the dictionary is full, the login still succeeds but its assertion is not recorded, and the gateway logs an error. The gateway declaresplugin-saml-auth-replay(10 MiB) for this purpose; its size can be changed undernginx_config.http.lua_shared_dictin the gateway configuration file.
- Added options to tighten or adjust how a login response is checked.
- OpenAPI to MCP
- Added
cache_enabled(defaulttrue) andcache_ttl(default3600seconds), so that each route decides how long the tools generated from its OpenAPI document are cached. Withcache_enabledset tofalse, the document is read again for every session, which suits a document that is still changing. The options need theapi7/openapi-to-mcpsidecar 1.0.5 or later; this release ships 1.0.6.
- Added
- Limit Count, Limit Count Advanced, GraphQL Limit Count, Limit Conn, Limit Req, AI Rate Limiting and AI Cache
- TLS connections to Redis now send the server name (SNI), and the new
redis_server_nameoption sets it. When the option is unset,redis_hostis sent, unless it is an IP address. Previously no server name was sent, so withredis_sslenabled a Redis endpoint that routes TLS connections by name, as many managed Redis services do, could not be reached.
- TLS connections to Redis now send the server name (SNI), and the new
- Prometheus
- A request answered with
101 Switching Protocolsis now classified asrequest_type=websocket, so WebSocket sessions land in their ownapisix_http_status,apisix_http_latencyandapisix_bandwidthseries and can be excluded from latency queries withrequest_type!="websocket". Ordinary requests keep their existing series, and a refused handshake staystraditional_http. Dashboards and alerting rules that aggregate these metrics without filtering onrequest_typewill see WebSocket traffic separated out of the series it used to be counted in.
- A request answered with
Control Plane
- The offline installation package now includes the
api7/openapi-to-mcpsidecar image, so that theopenapi-to-mcpandmcp-tools-aclplugins can be used in air-gapped deployments.run.sh startloads the image; the sidecar still has to be started next to the gateway, in the same network namespace.
Console (Dashboard)
- Plugin cards on services, routes, stream routes, consumers and global rules have an enable/disable switch, and the plugin editor has the same switch. Disabling a plugin keeps its configuration and stops the gateway from running it. Previously this required editing
_meta.disableby hand. - The Control Plane version is shown in a footer at the bottom of the side menu, and can be copied with a click.
- The license page shows the deployment ID, with a copy button.
- Resources synchronized by ADC, which carry the label
managed-by: adc, are marked with a Managed by ADC tag and a banner on their detail pages, and editing or deleting one of them asks for confirmation first, so that a change that ADC would overwrite on its next sync is not made by accident. - The Dashboard is now available in Traditional Chinese and Vietnamese. A user who had chosen Chinese keeps Simplified Chinese.
Fixes
Plugins
- AI Rate Limiting
- Fixed issue: With the
redis-sentinelpolicy,redis_usernameandredis_passwordwere not passed on, so rate limiting failed at runtime against a Redis that requires authentication, even though the configuration was accepted. With theredisandredis-clusterpolicies,redis_keepalive_timeoutandredis_keepalive_poolwere ignored and the built-in values were always used.
- Fixed issue: With the
- AI Aliyun Content Moderation
- Fixed issue: When a streamed model response carried no
usagefield, the final moderation check was skipped, and the client received the answer with no moderation result. When the response also ended without a[DONE]event, the client never received one. The final check now always runs and its result is reported, and the gateway sends the closing[DONE]itself when the upstream does not.
- Fixed issue: When a streamed model response carried no
- AI Proxy
- Fixed issue: A streamed response could be cut short and logged as a client disconnect when a periodic flush found nothing new to send, which could happen with SSE events split across reads or with a plugin that buffers the response body.
- feishu-auth and dingtalk-auth
- Fixed issue: The authorization code was not bound to the browser session that started the login, so a code obtained elsewhere was accepted on any session that presented it (login CSRF). The redirect to the identity provider now carries a random
state, and a callback whosestateis missing or does not match the session is rejected withHTTP 401and{"message":"Invalid state"}. A login that is in progress while its gateway instance is upgraded has to be started again. An integration that obtains the code itself should pass it in theX-Feishu-CodeorX-DingTalk-Codeheader, which is handled as before.
- Fixed issue: The authorization code was not bound to the browser session that started the login, so a code obtained elsewhere was accepted on any session that presented it (login CSRF). The redirect to the identity provider now carries a random
- Prometheus
- Fixed issue: The metrics library
nginx-lua-prometheus-api7was upgraded in 3.9.18, and on 3.9.18, 3.9.19 and 3.9.20 it could cause CPU spikes on the gateway workers whenexpirewas set for metrics underplugin_attr.prometheus.metricsin the gateway configuration file. To avoid the problem, this release rolls the library back to the version used up to 3.9.15. Theexpireoption is still honored, and no configuration change is needed.
- Fixed issue: The metrics library
Data Plane
- Fixed issue: With
apisix.normalize_uri_like_servletenabled, the request sent to the upstream did not match the request that was routed. A percent-encoded?(%3F) in the path was decoded, so that everything after it arrived as a query string; the client's own query string was dropped; and a service'sstrip_path_prefixwas ignored, so that the upstream received the path with the prefix still on it. - Fixed issue: A stream route referencing a plugin that the Data Plane does not have — a custom plugin not enabled for the gateway group, for example — was discarded as a whole, taking the route out of service. The plugin is now skipped and the route keeps working, as HTTP routes already did.
- Fixed issue: The configuration compatibility report did not cover stream routes, so a gateway instance could be reported as having no problems while some of its stream routes were invalid or referenced unavailable plugins. Stream routes are now reported like any other resource.
- Fixed issue: A configuration change written while the gateway was starting could be lost without any error, because the configuration watch could start from the wrong revision or before etcd was reachable. The affected worker kept running the old configuration until the same resource was changed again.
Control Plane
- Fixed issue: A Workflow rule whose action had no configuration, such as
[["return"]], made the Control Plane answerHTTP 500, and the route was not created. Such a rule is now rejected withHTTP 400andinvalid workflow plugin: invalid action: expected [name, conf]. - Fixed issue: The Control Plane accepted a DeGraphQL
querythat the gateway cannot run — subscriptions,nullliterals, block strings, and directives on fragment or variable definitions. The route was saved, but the gateway discarded it and requests to it answeredHTTP 404. Such a query is now rejected withHTTP 400and a message naming the construct, for exampledegraphql does not support subscription operations. In the other direction, a query with an empty selection set, which the gateway runs, is now accepted.
Console (Dashboard)
- Fixed issue: On a list with a page size other than the default, the range shown as Results: X–Y of N was wrong from the second page onwards. The rows listed were correct.
- Fixed issue: In the trace view of a debug session, every span name was prefixed with the same service name and the span name column could not be widened. The prefix is removed, the column can be resized, and the service is still shown in the span details.
- Fixed issue: On an API product's details page, the last linked gateway service could be deleted, leaving the product with no backend. Its delete button is now disabled, with a tooltip explaining why.
- Fixed issue: A long error message overflowed its notification. Notifications now have a consistent width, and a long message can be scrolled.