Skip to content

Commit a0a86d3

Browse files
authored
Merge branch 'apache:master' into master
2 parents 66fb79c + d4d99e7 commit a0a86d3

File tree

96 files changed

+6557
-1345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+6557
-1345
lines changed

.asf.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ github:
5353
dismiss_stale_reviews: true
5454
require_code_owner_reviews: true
5555
required_approving_review_count: 3
56+
release/3.11:
57+
required_pull_request_reviews:
58+
require_code_owner_reviews: true
59+
required_approving_review_count: 3
5660
release/3.10:
5761
required_pull_request_reviews:
5862
require_code_owner_reviews: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ uwsgi_temp
5656
proxy_temp
5757
fastcgi_temp
5858
client_body_temp
59-
utils/lj-releng
6059
utils/reindex
6160
*.etcd/
6261
t/lib/dubbo*/**/target/

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ header:
5555
- '.luacheckrc'
5656
# Exclude file contains certificate revocation information
5757
- 't/certs/ocsp/index.txt'
58+
- 'utils/lj-releng'
5859

5960
comment: on-failure

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ title: Changelog
2323

2424
## Table of Contents
2525

26+
- [3.11.0](#3110)
2627
- [3.10.0](#3100)
2728
- [3.9.0](#390)
2829
- [3.8.0](#380)
@@ -77,6 +78,33 @@ title: Changelog
7778
- [0.7.0](#070)
7879
- [0.6.0](#060)
7980

81+
## 3.11.0
82+
83+
### Change
84+
85+
- remove JWT signing endpoint and no longer require a private key to be uploaded in the jwt-auth plugin. [#11597](https://github.com/apache/apisix/pull/11597)
86+
- rewrite hmac-auth plugin for usability [#11581](https://github.com/apache/apisix/pull/11581)
87+
88+
### Plugins
89+
90+
- allow configuring keepalive_timeout in splunk-logger [#11611](https://github.com/apache/apisix/pull/11611)
91+
- add plugin attach-consmer-label [#11604](https://github.com/apache/apisix/pull/11604)
92+
- ai-proxy plugin [#11499](https://github.com/apache/apisix/pull/11499)
93+
- ai-prompt-decorator plugin [#11515](https://github.com/apache/apisix/pull/11515)
94+
- ai-prompt-template plugin [#11517](https://github.com/apache/apisix/pull/11517)
95+
96+
### Bugfixes
97+
98+
- Fix: adjust the position of enums in pb_option_def [#11448](https://github.com/apache/apisix/pull/11448)
99+
- Fix: encryption/decryption for non-auth plugins in consumer [#11600](https://github.com/apache/apisix/pull/11600)
100+
- Fix: confusion when substituting ENV in config file [#11545](https://github.com/apache/apisix/pull/11545)
101+
102+
### Core
103+
104+
- support gcp secret manager [#11436](https://github.com/apache/apisix/pull/11436)
105+
- support aws secret manager [#11417](https://github.com/apache/apisix/pull/11417)
106+
- add credential resource and include `X-Consumer-Username`, `X-Credential-Identifier`, and `X-Consumer-Custom-ID` headers in requests to upstream services [#11601](https://github.com/apache/apisix/pull/11601)
107+
80108
## 3.10.0
81109

82110
### Change

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,15 @@ install: runtime
377377
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-proxy/drivers
378378
$(ENV_INSTALL) apisix/plugins/ai-proxy/drivers/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-proxy/drivers
379379

380+
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/embeddings
381+
$(ENV_INSTALL) apisix/plugins/ai-rag/embeddings/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/embeddings
382+
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/vector-search
383+
$(ENV_INSTALL) apisix/plugins/ai-rag/vector-search/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/vector-search
384+
385+
# ai-content-moderation plugin
386+
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai
387+
$(ENV_INSTALL) apisix/plugins/ai/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai
388+
380389
$(ENV_INSTALL) bin/apisix $(ENV_INST_BINDIR)/apisix
381390

382391

@@ -429,7 +438,6 @@ compress-tar:
429438
./apisix \
430439
./bin \
431440
./conf \
432-
./apisix-$(VERSION)*.rockspec \
433441
./apisix-master-0.rockspec \
434442
LICENSE \
435443
Makefile \

apisix-master-0.rockspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = {
4747
"lua-resty-cookie = 0.2.0-1",
4848
"lua-resty-session = 3.10",
4949
"opentracing-openresty = 0.1",
50-
"lua-resty-radixtree = 2.9.1",
50+
"lua-resty-radixtree = 2.9.2",
5151
"lua-protobuf = 0.5.2-1",
5252
"lua-resty-openidc = 1.7.6-3",
5353
"luafilesystem = 1.7.0-2",
@@ -71,7 +71,6 @@ dependencies = {
7171
"ext-plugin-proto = 0.6.1",
7272
"casbin = 1.41.9-1",
7373
"inspect == 3.1.1",
74-
"lualdap = 1.2.6-1",
7574
"lua-resty-rocketmq = 0.3.0-0",
7675
"opentelemetry-lua = 0.2-3",
7776
"net-url = 0.9-1",
@@ -82,7 +81,8 @@ dependencies = {
8281
"lua-resty-t1k = 1.1.5",
8382
"brotli-ffi = 0.3-1",
8483
"lua-ffi-zlib = 0.6-0",
85-
"api7-lua-resty-aws == 2.0.1-1",
84+
"api7-lua-resty-aws == 2.0.2-1",
85+
"multipart = 0.5.9-1",
8686
}
8787

8888
build = {

apisix/cli/config.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ local _M = {
216216
"body-transformer",
217217
"ai-prompt-template",
218218
"ai-prompt-decorator",
219+
"ai-rag",
220+
"ai-content-moderation",
219221
"proxy-mirror",
220222
"proxy-rewrite",
221223
"workflow",

apisix/cli/ops.lua

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ local str_find = string.find
4949
local str_byte = string.byte
5050
local str_sub = string.sub
5151
local str_format = string.format
52+
local string = string
53+
local table = table
54+
5255

5356
local _M = {}
5457

@@ -502,17 +505,34 @@ Please modify "admin_key" in conf/config.yaml .
502505

503506

504507
if yaml_conf.apisix.ssl.ssl_trusted_certificate ~= nil then
505-
local cert_path = yaml_conf.apisix.ssl.ssl_trusted_certificate
506-
-- During validation, the path is relative to PWD
507-
-- When Nginx starts, the path is relative to conf
508-
-- Therefore we need to check the absolute version instead
509-
cert_path = pl_path.abspath(cert_path)
508+
local cert_paths = {}
509+
local ssl_certificates = yaml_conf.apisix.ssl.ssl_trusted_certificate
510+
for cert_path in string.gmatch(ssl_certificates, '([^,]+)') do
511+
cert_path = util.trim(cert_path)
512+
if cert_path == "system" then
513+
local trusted_certs_path, err = util.get_system_trusted_certs_filepath()
514+
if not trusted_certs_path then
515+
util.die(err)
516+
end
517+
table.insert(cert_paths, trusted_certs_path)
518+
else
519+
-- During validation, the path is relative to PWD
520+
-- When Nginx starts, the path is relative to conf
521+
-- Therefore we need to check the absolute version instead
522+
cert_path = pl_path.abspath(cert_path)
523+
if not pl_path.exists(cert_path) then
524+
util.die("certificate path", cert_path, "doesn't exist\n")
525+
end
510526

511-
if not pl_path.exists(cert_path) then
512-
util.die("certificate path", cert_path, "doesn't exist\n")
527+
table.insert(cert_paths, cert_path)
528+
end
513529
end
514530

515-
yaml_conf.apisix.ssl.ssl_trusted_certificate = cert_path
531+
local combined_cert_filepath = yaml_conf.apisix.ssl.ssl_trusted_combined_path
532+
or "/usr/local/apisix/conf/ssl_trusted_combined.pem"
533+
util.gen_trusted_certs_combined_file(combined_cert_filepath, cert_paths)
534+
535+
yaml_conf.apisix.ssl.ssl_trusted_certificate = combined_cert_filepath
516536
end
517537

518538
-- enable ssl with place holder crt&key

apisix/cli/schema.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ local config_schema = {
209209
ssl_trusted_certificate = {
210210
type = "string",
211211
},
212+
ssl_trusted_combined_path = {
213+
type = "string",
214+
},
212215
listen = {
213216
type = "array",
214217
items = {

apisix/cli/util.lua

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ local exit = os.exit
2424
local stderr = io.stderr
2525
local str_format = string.format
2626
local tonumber = tonumber
27+
local io = io
28+
local ipairs = ipairs
29+
local assert = assert
2730

2831
local _M = {}
2932

@@ -133,4 +136,54 @@ function _M.file_exists(file_path)
133136
return f ~= nil and close(f)
134137
end
135138

139+
do
140+
local trusted_certs_paths = {
141+
"/etc/ssl/certs/ca-certificates.crt", -- Debian/Ubuntu/Gentoo
142+
"/etc/pki/tls/certs/ca-bundle.crt", -- Fedora/RHEL 6
143+
"/etc/ssl/ca-bundle.pem", -- OpenSUSE
144+
"/etc/pki/tls/cacert.pem", -- OpenELEC
145+
"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", -- CentOS/RHEL 7
146+
"/etc/ssl/cert.pem", -- OpenBSD, Alpine
147+
}
148+
149+
-- Check if a file exists using Lua's built-in `io.open`
150+
local function file_exists(path)
151+
local file = io.open(path, "r")
152+
if file then
153+
file:close()
154+
return true
155+
else
156+
return false
157+
end
158+
end
159+
160+
function _M.get_system_trusted_certs_filepath()
161+
for _, path in ipairs(trusted_certs_paths) do
162+
if file_exists(path) then
163+
return path
164+
end
165+
end
166+
167+
return nil,
168+
"Could not find trusted certs file in " ..
169+
"any of the `system`-predefined locations. " ..
170+
"Please install a certs file there or set " ..
171+
"`lua_ssl_trusted_certificate` to a " ..
172+
"specific file path instead of `system`"
173+
end
174+
end
175+
176+
177+
function _M.gen_trusted_certs_combined_file(combined_filepath, paths)
178+
local combined_file = assert(io.open(combined_filepath, "w"))
179+
for _, path in ipairs(paths) do
180+
local cert_file = assert(io.open(path, "r"))
181+
combined_file:write(cert_file:read("*a"))
182+
combined_file:write("\n")
183+
cert_file:close()
184+
end
185+
combined_file:close()
186+
end
187+
188+
136189
return _M

0 commit comments

Comments
 (0)