We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It supports a variety of strategies, such as JWT, and the OPA module supports it comprehensively
https://www.openpolicyagent.org/
docker run -d --name opa -p 8181:8181 openpolicyagent/opa:latest run -s
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" }'
curl -X POST '127.0.0.1:8181/v1/data/example1/allow' \ -H 'Content-Type: application/json' \ -d '{"input":{"request":{"method":"GET"}}}'
package main import ( "context" "github.com/open-policy-agent/opa/rego" ) func main() { mod := ` package test import future.keywords.if default allow := false allow if { input.x == 1 } ` pq, err := rego.New( rego.Query("data.test.allow"), rego.Module("test.rego", mod), rego.Input(map[string]interface{}{"x": 1})).PrepareForEval(context.Background()) if err != nil { panic(err) } result, err := pq.Eval(context.Background()) if err != nil { panic(err) } print(result.Allowed()) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What does pixiu need to do with OPA ?
It supports a variety of strategies, such as JWT, and the OPA module supports it comprehensively
PIxiu needs to be implemented in two ways (Choose one of the two)
introduce
https://www.openpolicyagent.org/
Directions for use
start opa server
Create opa pollicy
Query policy
OPA rules
The text was updated successfully, but these errors were encountered: