Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
theweakgod authored Feb 4, 2024
2 parents ef9b3de + 3faeff6 commit 9b5aef2
Show file tree
Hide file tree
Showing 70 changed files with 2,628 additions and 194 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,17 @@ jobs:
- name: Start Dubbo Backend
if: matrix.os_name == 'linux_openresty' && (steps.test_env.outputs.type == 'plugin' || steps.test_env.outputs.type == 'last')
run: |
cur_dir=$(pwd)
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
cd dubbo-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
cd $cur_dir/t/lib/dubbo-serialization-backend
mvn package
cd dubbo-serialization-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/centos7-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,18 @@ jobs:
- name: Start Dubbo Backend
run: |
cur_dir=$(pwd)
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
cd dubbo-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
cd $cur_dir/t/lib/dubbo-serialization-backend
mvn package
cd dubbo-serialization-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/gm-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,17 @@ jobs:
- name: Start Dubbo Backend
if: steps.test_env.outputs.type == 'plugin'
run: |
cur_dir=$(pwd)
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
cd dubbo-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
cd $cur_dir/t/lib/dubbo-serialization-backend
mvn package
cd dubbo-serialization-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/redhat-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,17 @@ jobs:
- name: Start Dubbo Backend
run: |
cur_dir=$(pwd)
sudo apt update
sudo apt install -y maven
cd t/lib/dubbo-backend
mvn package
cd dubbo-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java.log &
cd $cur_dir/t/lib/dubbo-serialization-backend
mvn package
cd dubbo-serialization-backend-provider/target
java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-provider.one-jar.jar > /tmp/java2.log &
- name: Build xDS library
if: steps.test_env.outputs.type == 'last'
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ client_body_temp
utils/lj-releng
utils/reindex
*.etcd/
t/lib/dubbo-backend/dubbo-backend-interface/target/
t/lib/dubbo-backend/dubbo-backend-provider/target/
t/lib/dubbo*/**/target/
.idea/
*.iml
\.*
Expand Down Expand Up @@ -88,3 +87,5 @@ pack-v*-linux.tgz*
# release tar package
*.tgz
release/*


2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache APISIX
Copyright 2019-2023 The Apache Software Foundation
Copyright 2019-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
28 changes: 26 additions & 2 deletions apisix/plugins/elasticsearch-logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,23 @@ local schema = {
ssl_verify = {
type = "boolean",
default = true
}
},
include_req_body = {type = "boolean", default = false},
include_req_body_expr = {
type = "array",
minItems = 1,
items = {
type = "array"
}
},
include_resp_body = { type = "boolean", default = false },
include_resp_body_expr = {
type = "array",
minItems = 1,
items = {
type = "array"
}
},
},
encrypt_fields = {"auth.password"},
oneOf = {
Expand Down Expand Up @@ -138,7 +154,10 @@ local function send_to_elasticsearch(conf, entries)
end
local uri = selected_endpoint_addr .. "/_bulk"
local body = core.table.concat(entries, "")
local headers = {["Content-Type"] = "application/x-ndjson"}
local headers = {
["Content-Type"] = "application/x-ndjson;compatible-with=7",
["Accept"] = "application/vnd.elasticsearch+json;compatible-with=7"
}
if conf.auth then
local authorization = "Basic " .. ngx.encode_base64(
conf.auth.username .. ":" .. conf.auth.password
Expand Down Expand Up @@ -168,6 +187,11 @@ local function send_to_elasticsearch(conf, entries)
end


function _M.body_filter(conf, ctx)
log_util.collect_body(conf, ctx)
end


function _M.log(conf, ctx)
local entry = get_logger_entry(conf, ctx)

Expand Down
5 changes: 3 additions & 2 deletions apisix/plugins/forward-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ local schema = {
properties = {
uri = {type = "string"},
allow_degradation = {type = "boolean", default = false},
status_on_error = {type = "integer", minimum = 200, maximum = 599, default = 403},
ssl_verify = {
type = "boolean",
default = true,
Expand Down Expand Up @@ -131,8 +132,8 @@ function _M.access(conf, ctx)
if not res and conf.allow_degradation then
return
elseif not res then
core.log.error("failed to process forward auth, err: ", err)
return 403
core.log.warn("failed to process forward auth, err: ", err)
return conf.status_on_error
end

if res.status >= 300 then
Expand Down
Loading

0 comments on commit 9b5aef2

Please sign in to comment.