Skip to content

Commit

Permalink
[FT-2788]fix opa documents undefined return (#4211)
Browse files Browse the repository at this point in the history
* [FT-2788]fix opa documents undefined return

* add missing config params

* copy edit + vale

Co-authored-by: angel <angel.guarisma@konghq.com>
  • Loading branch information
windmgc and Guaris authored Aug 9, 2022
1 parent 1ae9f26 commit c9cdee8
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions app/_hub/kong-inc/opa/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ params:
default: false
description: |
If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.
- name: include_body_in_opa_input
required: false
datatype: boolean
default: false
description: |
If set to true, the current requests' request body is included as input to OPA.
- name: include_parsed_json_body_in_opa_input
required: false
datatype: boolean
default: false
description: |
If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.
---

## Usage
Expand All @@ -95,7 +107,9 @@ Create an `example.rego` file with the following content:
```rego
package example
default allow = false
default allowBoolean = false
default allowDetailed = false
allowBoolean {
header_present
Expand Down Expand Up @@ -140,7 +154,7 @@ curl -XPUT localhost:8181/v1/policies/example --data-binary @example.rego
The above command uses OPA's default port 8181. It could be different for your
setup.

### Set up Kong Gateway
### Set up {{site.base_gateway}}

Set up a Route and Service in {{site.base_gateway}} and then enable the plugin:

Expand Down

0 comments on commit c9cdee8

Please sign in to comment.