shreemaan-abhishek commented on code in PR #13842:
URL: https://github.com/apache/apisix/pull/13842#discussion_r3820127549


##########
CHANGELOG.md:
##########
@@ -85,6 +86,184 @@ title: Changelog
 - [0.7.0](#070)
 - [0.6.0](#060)
 
+## 3.18.0
+
+**The changes marked with :warning: are not backward compatible.**
+
+### Change
+
+- :warning: change(debug): report executed plugins with phase in execution 
order. The `Apisix-Plugins` debug header now carries `name#phase` entries in 
execution order instead of a de-duplicated plugin-name list 
[#13710](https://github.com/apache/apisix/pull/13710)
+- :warning: feat: bound request and response body buffering in plugins. 
`max_req_body_size` / `max_resp_body_size` (default 64 MiB) added to ~19 
plugins; larger bodies are now rejected or truncated instead of being buffered 
without limit [#13705](https://github.com/apache/apisix/pull/13705)
+- :warning: fix(batch-processor): bound the pending entries backlog by 
default. Every batch-processor logger now defaults `max_pending_entries` to 
8192 and discards entries above it 
[#13826](https://github.com/apache/apisix/pull/13826)
+- :warning: refactor(ai-aws-content-moderation): moderate decoded LLM content 
in the access phase. Priority moved from 1050 to 1031, the plugin now requires 
ai-proxy/ai-proxy-multi, moderates the extracted prompt instead of the raw 
body, and denies with `deny_code` (default 200) instead of 400 
[#13647](https://github.com/apache/apisix/pull/13647)
+- :warning: feat(ai-aliyun-content-moderation): role-aware 
`request_check_mode` and O(n) content chunking. Request moderation now covers 
the user role of the latest turn by default instead of every message in the 
body [#13598](https://github.com/apache/apisix/pull/13598)
+- :warning: fix(sls-logger): verify the TLS certificate of the log server. New 
`ssl_verify` option, default `true` 
[#13785](https://github.com/apache/apisix/pull/13785)
+- :warning: fix(openid-connect): enforce audience, issuer and required scopes. 
Bearer introspection fails closed when the discovery document is unavailable, 
`claim_validator.audience.match_with_client_id` now implies `required`, and 
`required_scopes` is enforced on session (authorization code) flows 
[#13829](https://github.com/apache/apisix/pull/13829)
+- :warning: fix(admin): reject duplicate consumer authentication keys instead 
of silently accepting them [#13529](https://github.com/apache/apisix/pull/13529)
+- :warning: perf(core): sanitize the `X-Forwarded-*` headers in the NGINX 
config. `$var_x_forwarded_proto` is removed, while `$var_x_forwarded_host` and 
`$var_x_forwarded_port` are no longer writable from Lua, and a trusted peer 
that sends no `X-Forwarded-Host`/`X-Forwarded-Port` now receives the 
APISIX-observed values instead of falling through to `$host`/`$server_port` 
[#13803](https://github.com/apache/apisix/pull/13803)
+- :warning: feat: add `max_post_args_readable_size` to bound `post_arg.*` body 
reads. A request body above the 64 MiB default no longer resolves `post_arg.*`, 
so routes matching on those predicates stop matching it; raise the value or set 
it to `0` to restore the previous unbounded behavior 
[#13601](https://github.com/apache/apisix/pull/13601)
+- :warning: fix(ldap-auth): `tls_verify: true` now performs real certificate 
verification, which the previously pinned `lua-resty-ldap` silently ignored; an 
LDAP server with a self-signed or hostname-mismatched certificate must present 
a trusted certificate, or verification has to be turned off explicitly 
[#13762](https://github.com/apache/apisix/pull/13762)
+- :warning: fix(ldap-auth): key the consumer lookup on the escaped bind DN. A 
consumer whose `user_dn` was written in the previous unescaped form stops 
matching once the username contains RFC 4514 structural characters; rewrite 
such values in escaped form, e.g. `cn=comma\,user,ou=users,dc=example,dc=org` 
[#13805](https://github.com/apache/apisix/pull/13805)
+- :warning: feat(prometheus): add built-in LLM histograms for TTFT and token 
distribution. `apisix_llm_latency` gains a `type` label and streaming requests 
now emit both `type="total"` and `type="ttft"`, so existing queries, dashboards 
and alerts must select `type="total"` 
[#13487](https://github.com/apache/apisix/pull/13487)
+- :warning: feat(ai-plugins): add `fail_mode` for Consumer-bound protocol 
handling. Its `skip` default turns unrecognized or non-AI traffic from a hard 
error into pass-through in `ai-aliyun-content-moderation` and 
`ai-aws-content-moderation`; set `fail_mode: error` to keep the previous 
fail-closed behavior [#13489](https://github.com/apache/apisix/pull/13489)

Review Comment:
   Good catch, applied in a02cb7ecd. Verified the AWS pre-image: `_M.rewrite` 
read the body with `core.request.get_body()` and moderated it, with no 
content-type or protocol gate at all, so the gate added here is what turns 
non-JSON traffic into a skip. Calling that a "hard error" was wrong, and it hid 
the part that actually matters for upgraders: traffic that used to be scanned 
silently stops being scanned.
   
   I extended your wording slightly to cover the third plugin. 
`ai-prompt-guard` was not purely pass-through before either: a body that failed 
JSON parsing returned 400, which now becomes pass-through at the `skip` 
default. Its other path, a body matching no AI protocol, was silently allowed 
before and still is, so nothing changes there.
   
   The entry now reads:
   
   > Its `skip` default lets unrecognized or non-AI traffic through instead of 
failing: `ai-aliyun-content-moderation` and `ai-prompt-guard` no longer return 
an error, and `ai-aws-content-moderation` no longer moderates a non-JSON body 
as raw text. Set `fail_mode: error` where such traffic must be rejected.
   
   The Chinese counterpart in #13843 carries the same change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to