Commit Graph

1288 Commits

Author SHA1 Message Date
罗泽轩
5b97223592
feat: implemented referer-restriction plugin (#2352) 2020-10-06 18:20:17 +08:00
Firstsawyou
c3de84e285
feature: support consumer_name as key for limit-req plugin. (#2270)
fix #2267
2020-10-06 18:18:22 +08:00
L
720d135fd2
fix: Update error message when Route doesn't exist (#2304)
Fixes #2302

Co-authored-by: YuanSheng Wang <membphis@gmail.com>
2020-10-06 11:48:52 +08:00
罗泽轩
16a2d4dfa9
feat: also call picker.after_balance before retry (#2350) 2020-10-05 23:19:40 +08:00
YuanSheng Wang
50c99a5e3b
bugfix: create etcd object in xpcall, this step may fail (#2312)
* bugfix: create the etcd object in `xpcall`, it may fail, the return values of `etcd.new` should be `res, err`.

fix issue: #2310

1. The old process, if creating etcd fails, etcd data will no longer be synchronized. We need to create the etcd object in xpcall.
2. the return value should be res, err of etcd.new.

* test: old test case is unstable, should delete some checkpoint which is wrong.
2020-10-05 10:22:28 +08:00
YuanSheng Wang
5d172d606f
test: use the absolute path of $apisix_home instead of ., search the lua source fine in the folder $apisix_home. (#2348) 2020-10-05 08:42:13 +08:00
Wen Ming
a4e3526049
bugfix: remove unsupported algorithm in jwt plugin. (#2356)
* bugfix: remove unsupported algorithm in jwt plugin.

support algorithm: https://github.com/SkyLothar/lua-resty-jwt/blob/master/lib/resty/jwt.lua#L505

* revert doc auto-format

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>

Co-authored-by: yiyiyimu <wosoyoung@gmail.com>
2020-10-05 07:26:40 +08:00
Wen Ming
3e959032f1
CI: skip run tengine test cases. (#2354)
Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
2020-10-04 20:23:10 +08:00
YuanSheng Wang
20c670ce09
change(hmac-auth): update the organization of signing_string . (#2337)
fix #2336 .

ref:
https://help.aliyun.com/document_detail/29475.html?spm=a2c4g.11186623.2.15.62c73e789LVg02
https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationConstructingCanonicalizedAmzHeaders
2020-10-04 19:57:57 +08:00
Firstsawyou
dd5a36e207
feat: support to fetch consumer_name or consumer_id via ctx.var (#2333) 2020-10-04 19:16:29 +08:00
Shuyang Wu
c228675a81
doc: update etcd installation step for v3.4 (#2346) 2020-10-04 19:15:58 +08:00
罗泽轩
a6611d3058
feat(proxy-cache): store the temporary file under cache directory. (#2317)
When the temporary file directory and cache directory are under
different disk, this option can avoid unexpected performance hurt.
2020-10-04 16:23:32 +08:00
Swayam Raina
385f2a471b
chore: remove apisix_cores (#2260) 2020-10-04 15:23:42 +08:00
罗泽轩
1db42368c0
fix(basic-auth): split schema to adapt different occasions (#2331) 2020-10-04 14:39:20 +08:00
diaosj
2f3d6786e2
doc: update router variable example (#2351) 2020-10-04 13:52:04 +08:00
YuanSheng Wang
c5dcced1cf
bugfix: when service works with upstream that contains a domain name, the merged configuration should not always changing. (#2322) 2020-10-04 13:12:28 +08:00
YuanSheng Wang
7be1134295
doc: field key should be optional in upstream object. (#2349) 2020-10-01 23:24:40 +08:00
YuanSheng Wang
05840ca9e2
test: wait for more time and check the error log, old way is unstable. (#2341) 2020-09-30 17:05:46 +08:00
Shuyang Wu
89479194cc
bugfix: use correct version of etcd in linux_apisix_master_luarocks (#2343) 2020-09-29 10:30:13 +08:00
Shuyang Wu
e0ee327c08
bugfix: use etcd:watchcancel to reduce connections in etcdv3 (#2299) 2020-09-28 18:05:47 +08:00
Joey
ebe4f6620a
feat: Add labels for upstream object (#2279) 2020-09-28 11:20:09 +08:00
nic-chen
c375bd0cac
feat: replace timestamp with date and time in GMT format in plugin hmac-auth (#2301) 2020-09-28 09:10:26 +08:00
Firstsawyou
b1770d4ca7
feat: support to fetch route_id and service_id via ctx.var (#2326) 2020-09-27 22:29:59 +08:00
罗泽轩
70bd9802c5
bugfix: avoid overwriting Vary header in cors plugin (#2271) 2020-09-27 16:43:09 +08:00
YuanSheng Wang
65db7a4837
bugfix(lrucache): store the original value in a new table, and use ver to store the cached version. (#2321) 2020-09-27 11:38:05 +08:00
guyang
ce6dc643dd
bugfix: return right response code when http_to_https enabled in redirect plugin. (#2311) 2020-09-27 09:35:28 +08:00
Shuyang Wu
2f7949a1b7
doc: fix typo in doc(#2282) 2020-09-26 09:21:01 +08:00
Wen Ming
13b0968340
Revert "feat(http-logger): support for specified the log formats via admin API (#2294)" (#2307)
This reverts commit 89f89f3004.
2020-09-24 23:50:22 +08:00
YuanSheng Wang
89f89f3004
feat(http-logger): support for specified the log formats via admin API (#2294) 2020-09-24 20:45:50 +08:00
YuanSheng Wang
3f9685f823
feat(http-logger): support to concat multiple log with separator. (#2286) 2020-09-24 10:58:44 +08:00
Vinci Xu
7beafd345a
fix: increase wait to avoid fail (#2290) 2020-09-23 22:48:34 +08:00
nic-chen
1b24f36639
feat: support storing metadata for plugins (#2268)
fix #2263
2020-09-23 21:02:56 +08:00
Wen Ming
44e05b08ab
doc: removed qrcode of qq group. (#2246) 2020-09-23 14:28:30 +08:00
Shuyang Wu
6f06622382
doc: plugin attributes format unification (#2278)
* [WIP] doc api unify

* [WIP] doc api unify

* doc api format

* fix typo
2020-09-23 08:11:27 +08:00
Alex Zhang
36d3b82ec4
bugfix: supported the encryption/decryption for multi priv keys (#2179)
Co-authored-by: Wen Ming <moonbingbing@gmail.com>
2020-09-22 20:37:14 +08:00
YuanSheng Wang
6a1fe8a546
bugfix(CLI): if the user used default token and allow any IP to access Admin API, will show a WARNING message.(#2244)
Co-authored-by: Wen Ming <moonbingbing@gmail.com>
2020-09-22 16:09:35 +08:00
Firstsawyou
a651a29e20
feature: allow empty service object, it does not contain any upstream and plugin (#2259) 2020-09-21 16:52:18 +08:00
罗泽轩
8493a607ce
test: also lint the test helpers (#2252)
Close #2215
2020-09-19 19:07:39 +08:00
Firstsawyou
e94a5b3f58
feature: consumer provides access to a collection of service (#2241)
* test: add more test cases.

Co-authored-by: Yuansheng Wang <membphis@gmail.com>
2020-09-19 18:21:21 +08:00
Vinci Xu
89f4389ba7
fix[key-auth]: skip consumer when config has no key (#2120) 2020-09-18 21:49:01 +08:00
nic-chen
0a4bc95e3d
feat: hmac-auth add signed headers to calculate signature (#2239)
Co-authored-by: YuanSheng Wang <membphis@gmail.com>
2020-09-18 20:25:41 +08:00
YuanSheng Wang
03d818e175
test: before creating and deleting routes in batches, clear all routes first (#2253)
* test: set larger timeout.
2020-09-18 18:43:02 +08:00
Alex Zhang
dd6ee5e99f
improve: use optimistic locking to avoid concurrency problem in admin PATCH APIs. (#2216)
There is a potential concurrency problem in all admin PATCH APIs when
two patch requests come in simultaneously, in such case, the patched
result of the first applied request will be overridden, also the
probability is tidy, but from the perspective of software's robust,
that's not what we wanna to see.

In this commit, we use the optimistic locking to avoid this problem, for
the example aforementioned, the second PATCH request will failure, and
it's up to the user to retry this PATCH request again.

The optimistic locking mechanism in ETCD v3 APIs is showed by it's
transcation mechanism.

Signed-off-by: tokers <zchao1995@gmail.com>
2020-09-18 17:20:55 +08:00
YuanSheng Wang
973c481ef1
chore: get the complete error stack when sync etcd data, it is very useful when a (#2251)
serious error occurs.

Co-authored-by: Wen Ming <moonbingbing@gmail.com>
2020-09-18 15:44:19 +08:00
YuanSheng Wang
4f900390f9
bugfix: independently check the "disabled" field to avoid schema ve… (#2099)
* bugfix: independently check the "disabled" field to avoid `schema` verification
  with other parameters.
2020-09-17 22:31:02 +08:00
Zhang Qiang
d05071868d
fix: return ok in kafka-logger (#2222) 2020-09-17 15:17:51 +08:00
Shuyang Wu
9d1a210413
chore: bump lua-resty-etcd to version 1.2 (#2242)
fix #2238
2020-09-17 13:15:52 +08:00
YuanSheng Wang
68b1f9cc57
bugfix: clear all cached object when got delete action, and removing (#2168)
stale boolean data in table `self.values` with a safer way.
2020-09-17 09:30:44 +08:00
Alex Zhang
e93cdbd48a
change: check etcd cluster version when init_etcd (#2233) 2020-09-16 17:46:53 +08:00
Wen Ming
455e7df005
change: remove dashboard sub module. (#2231) 2020-09-16 17:07:18 +08:00