feat: wolf-rbac plugin if password error, no useful messages returned
- Dominant language
- Lua
- Stars
- 17.1k
- Forks
- 2.9k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 63
Description
### Current Behavior
I followed the guide: https://apisix.apache.org/docs/apisix/plugins/wolf-rbac/
When I using a wrong password, the apisix returned:
```
{"message":"request to wolf-server failed!"}
```
and from the apisix logs:
```
2025/05/19 08:41:09 [error] 64#64: *112501465 [lua] wolf-rbac.lua:381: request_to_wolf_server(): request [{"reason":"ERR_PASSWORD_ERROR","ok":false,"data":{}}] failed! response body:{"reason":"ERR_PASSWORD_ERROR","ok":false,"data":{}}, client: XXXX server: _, request: "POST /auth/token HTTP/1.1", host: "devicbc.XXXX.cn:88"
2025/05/19 08:41:09 [info] 74#74: *112501656 [lua] timers.lua:39: run timer[plugin#server-info], context: ngx.timer
```
### Expected Behavior
The error should make it sense when some known errors found from wolf.
### Error Logs
See above.
### Steps to Reproduce
1、follow the wolf rbac doc
2、use a wrong password in wolf user
### Environment
- APISIX version (run `apisix version`): 3.6.0
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
Contributor guide
Research direction
The failure is logged in wolf-rbac.lua at request_to_wolf_server(), around line 381; start there and review the wolf-rbac plugin guide and the logged ERR_PASSWORD_ERROR response. Done means a wrong password produces a useful error message for this known Wolf error, verified by repeating the documented reproduction steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100