baerwang opened a new issue, #605:
URL: https://github.com/apache/dubbo-go-pixiu/issues/605

   # introduce 
   
   https://www.openpolicyagent.org/
   
   # Directions for use
   
   # start opa server
   
   ```shell
   docker run -d --name opa -p 8181:8181 openpolicyagent/opa:latest run -s
   ```
   
   # Create opa pollicy
   
   ```shell
   curl -X PUT '127.0.0.1:8181/v1/policies/example1' \
     -H 'Content-Type: text/plain' \
     -d 'package example1
   
   import input.request
   
   default allow = false
   
   allow {
       # HTTP method must GET
       request.method == "GET"
   }'
   ```
   
   # Query policy
   
   ```shell
   curl -X POST '127.0.0.1:8181/v1/data/example1/allow' \
     -H 'Content-Type: application/json' \
     -d '{"input":{"request":{"method":"GET"}}}'
   ```
   
   


-- 
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...@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to