spacewander commented on a change in pull request #5970: URL: https://github.com/apache/apisix/pull/5970#discussion_r776902038
########## File path: docs/en/latest/config.json ########## @@ -78,7 +78,8 @@ "plugins/ip-restriction", "plugins/ua-restriction", "plugins/referer-restriction", - "plugins/consumer-restriction" + "plugins/consumer-restriction", + "plugins/opa" Review comment: IMHO, it should be put into Authentication as opa is similar to casbin/keycloak ########## File path: docs/en/latest/plugins/opa.md ########## @@ -0,0 +1,275 @@ +--- +title: opa +--- + +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +## Summary + +- [**Description**](#description) +- [**Attributes**](#attributes) +- [**Data Definition**](#data-definition) +- [**Example**](#example) + +## Description + +The `opa` plugin is used to integrate with Open Policy Agent. By using this plugin, users can decouple functions such as authentication and access to services and reduce the complexity of the application system. + +## Attributes + +| Name | Type | Requirement | Default | Valid | Description | +| -- | -- | -- | -- | -- | -- | +| host | string | required | | | Open Policy Agent service host (eg. https://localhost:8181) | +| ssl_verify | boolean | optional | true | | Whether to verify the certificate | +| policy | string | required | | | OPA policy path (It is a combination of `package` and `decision`. When you need to use advanced features such as custom response, `decision` can be omitted) | +| timeout | integer | optional | 60000ms | [1, 60000]ms | OpenWhisk Action and HTTP call timeout. | +| keepalive | boolean | optional | true | | HTTP keepalive | +| keepalive_timeout | integer | optional | 60000ms | [1000,...] | keepalive idle timeout | +| keepalive_pool | integer | optional | 5 | [1,...] | Connection pool limit | +| with_route | boolean | optional | false | | Whether to send information about the current route. | +| with_service | boolean | optional | false | | Whether to send information about the current service. | +| with_consumer | boolean | optional | false | | Whether to send information about the current consumer. (It may contain sensitive information such as apikey, so please turn it on again if you are sure it is safe) | Review comment: ```suggestion | with_consumer | boolean | optional | false | | Whether to send information about the current consumer. (It may contain sensitive information such as apikey, so please turn it on only if you are sure it is safe) | ``` ########## File path: docs/en/latest/plugins/opa.md ########## @@ -0,0 +1,275 @@ +--- +title: opa +--- + +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> + +## Summary + +- [**Description**](#description) +- [**Attributes**](#attributes) +- [**Data Definition**](#data-definition) +- [**Example**](#example) + +## Description + +The `opa` plugin is used to integrate with Open Policy Agent. By using this plugin, users can decouple functions such as authentication and access to services and reduce the complexity of the application system. + +## Attributes + +| Name | Type | Requirement | Default | Valid | Description | +| -- | -- | -- | -- | -- | -- | +| host | string | required | | | Open Policy Agent service host (eg. https://localhost:8181) | +| ssl_verify | boolean | optional | true | | Whether to verify the certificate | +| policy | string | required | | | OPA policy path (It is a combination of `package` and `decision`. When you need to use advanced features such as custom response, `decision` can be omitted) | +| timeout | integer | optional | 60000ms | [1, 60000]ms | OpenWhisk Action and HTTP call timeout. | Review comment: This row is incorrect -- 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 For queries about this service, please contact Infrastructure at: us...@infra.apache.org