Expand description
Wolf-RBAC authorization plugin (wolf-rbac) — token-check subset.
Port of the request-time authorization core of APISIX’s wolf-rbac plugin.
On each request it extracts the caller’s wolf RBAC token, parses it, and asks
the wolf-server whether that token may perform the request’s method on the
request’s path. On allow it copies the returned user identity into request
headers and context.message; on deny it rejects with WOLF_RBAC_DENIED.
Only the _M.rewrite authorization path is ported. The interactive
/apisix/plugin/wolf-rbac/{login,change_pwd,user_info} admin endpoints —
which proxy credential exchange to wolf-server and mint tokens — are a
session/login concern and are not implemented. See the Deviations in
website/docs/reference/plugins/wolf-rbac.md.
Structs§
- User
Info 🔒 - The subset of wolf-server’s
userInfopayload the plugin propagates. - Wolf
Rbac Plugin - Checks a wolf RBAC token against a wolf-server
access_checkendpoint.
Constants§
- TOKEN_
VERSION 🔒 - The rbac-token version prefix wolf uses (
V1#appid#wolf_token).
Functions§
- build_
access_ 🔒check_ url - Builds the
access_checkURL with the query arguments wolf-server expects. - extract_
rbac_ 🔒token - Extracts the rbac token from (in APISIX precedence order): the
rbac_tokenquery argument, theAuthorizationheader, theX-RBAC-Tokenheader, then thex-rbac-tokencookie. - parse_
rbac_ 🔒token - Parses a
V1#<appid>#<wolf_token>rbac token into(appid, wolf_token). Errors on the wrong version prefix or the wrong number of#segments. - parse_
user_ 🔒info - Extracts
data.userInfo.{id,username,nickname}from a wolf-server response body.nicknamefalls back tousername; a missingusernameyieldsNone(no identity to propagate). - percent_
encode 🔒 - Percent-encodes a query-argument value (RFC3986 unreserved chars kept).