guilhermevillote opened a new issue, #12349:
URL: https://github.com/apache/apisix/issues/12349

   ### Description
   
   I'm developing an ACL plugin for APISIX.
   Here's how it's configured:
   
   On the Route, I define the allowed groups (e.g., ["infra", "dev"]).
   
   On the Consumer, I define which groups the user belongs to (e.g., ["infra"]).
   
   In the access phase, I receive conf and ctx as parameters. However, conf 
always contains the configuration from the consumer, not the one from the route.
   
   My plugin runs after the authentication plugin, so I can access the 
consumer's group information via ctx.consumer or similar context fields — I 
don't need conf for that.
   
   What I really need is the plugin configuration from the route, so I can 
compare the route’s allowed groups with the consumer’s groups and decide 
whether to allow or deny access.
   
   How can I make sure my plugin receives or can access the route-level plugin 
configuration, even when the plugin is also defined on the consumer?
   
   plugin definitin:
   ```lua
   local _M = {
       version = 0.1,
       priority = 2401,
       name = plugin_name,
       schema = schema,
       consumer_schema = consumer_schema,
   }
   ```
   
   Thanks in advance!
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.11.0
   - Operating system (run `uname -a`): Linux apisix-87746fbcb-f5v4g 
6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 
x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 1.25.3.2
   - 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`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to