satishviswanathan commented on issue #10408:
URL: https://github.com/apache/apisix/issues/10408#issuecomment-1791126528

   @shreemaan-abhishek  thank you for your response. I'm still relatively and 
trying to figure out overall how it works.
   
   I used the following curl command to create a route.
   
   ```
   curl "http://127.0.0.1:9180/apisix/admin/routes/1"; -X PUT -d '
   {
     "methods": ["GET"],
     "host": "example.com",
     "uri": "/anything/*",
     "upstream": {
       "type": "roundrobin",
       "nodes": {
         "httpbin.org:80": 1
       }
     }
   }'
   ```
   
   Used the following to test the route.
   
   ` curl -i -X GET "http://127.0.0.1:9080/anything/foo?arg=10"; -H "Host: 
example.com" `
   
   **Following are the plugins in my config.yml file.**
   To the existing plugin list I have added authz-casbin and authz-casdoor
   
    ```
   plugins:                          # plugin list (sorted in alphabetical 
order)
     - api-breaker
     - authz-keycloak
     - basic-auth
     - batch-requests
     - consumer-restriction
     - cors
     # - dubbo-proxy
     - echo
     # - error-log-logger
     # - example-plugin
     - fault-injection
     - grpc-transcode
     - hmac-auth
     - http-logger
     - ip-restriction
     - jwt-auth
     - kafka-logger
     - key-auth
     - limit-conn
     - limit-count
     - limit-req
     # - log-rotate
     # - node-status
     - openid-connect
     - prometheus
     - proxy-cache
     - proxy-mirror
     - proxy-rewrite
     - redirect
     - referer-restriction
     - request-id
     - request-validation
     - response-rewrite
     - serverless-post-function
     - serverless-pre-function
     # - skywalking
     - sls-logger
     - syslog
     - tcp-logger
     - udp-logger
     - uri-blocker
     - wolf-rbac
     - zipkin
     - server-info
     - traffic-split
     - authz-casbin
     - authz-casdoor
   ```
   
   Casbin model and policy used.
   
   
   [policy.csv](https://github.com/apache/apisix/files/13242496/policy.csv)
   
   model.conf (unable to upload this file so sharing the code here)
   
   ```
   [request_definition]
   r = sub, obj, act
   
   [policy_definition]
   p = sub, obj, act
   
   [role_definition]
   g = _, _
   
   [policy_effect]
   e = some(where (p.eft == allow))
   
   [matchers]
   m = (g(r.sub, p.sub) || keyMatch(r.sub, p.sub)) && keyMatch(r.obj, p.obj) && 
keyMatch(r.act, p.act)
   ```
   
   The part I'm struggling to figure out is where to place the policy and model 
files so that apisix can load it


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to