Current Behavior
Server-side session stores that support locking remain locked after authentication until the default or configured lock ttl (https://github.com/bungle/lua-resty-session#redis-storage-adapter) expires. This results in subsequent requests (using the same APISIX session) hanging until the lock expires.
Apisix plugin code:
|
response, err, _, session = openidc.authenticate(conf) |
Does not implement explicit session:close() as recommended by zmartzone/lua-resty-openidc https://github.com/zmartzone/lua-resty-openidc#sessions-and-locking
Expected Behavior
APISIX openid-connect plugin should call explicit session:close() and subsequent requests (using the same APISIX session) should complete immediately.
Error Logs
No response
Steps to Reproduce
- Configure APISIX openid-connect plugin for a server-side session store that supports locking
- Configure route using the openid-connect plugin
- Authenticate on protected route
- Immediately refresh route using the same session cookie - request will hang until the default or configured lock ttl
Environment
- APISIX version (run
apisix version): 2.15.0
- Operating system (run
uname -a): Linux apisix-6fcbf58999-t8x9r 5.15.0-48-generic # 54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 Linux
- OpenResty / Nginx version (run
openresty -V or nginx -V): nginx version: openresty/1.21.4.1
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): N/A
- APISIX Dashboard version, if relevant: N/A
- Plugin runner version, for issues related to plugin runners: N/A
- LuaRocks version, for installation issues (run
luarocks --version): /usr/local/bin/luarocks 3.8.
Current Behavior
Server-side session stores that support locking remain locked after authentication until the default or configured lock ttl (https://github.com/bungle/lua-resty-session#redis-storage-adapter) expires. This results in subsequent requests (using the same APISIX session) hanging until the lock expires.
Apisix plugin code:
apisix/apisix/plugins/openid-connect.lua
Line 312 in cf8de8e
Does not implement explicit session:close() as recommended by zmartzone/lua-resty-openidc https://github.com/zmartzone/lua-resty-openidc#sessions-and-locking
Expected Behavior
APISIX openid-connect plugin should call explicit session:close() and subsequent requests (using the same APISIX session) should complete immediately.
Error Logs
No response
Steps to Reproduce
Environment
apisix version): 2.15.0uname -a): Linux apisix-6fcbf58999-t8x9r 5.15.0-48-generic # 54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 Linuxopenresty -Vornginx -V): nginx version: openresty/1.21.4.1curl http://127.0.0.1:9090/v1/server_info): N/Aluarocks --version): /usr/local/bin/luarocks 3.8.