tokers commented on a change in pull request #4710:
URL: https://github.com/apache/apisix/pull/4710#discussion_r681654637



##########
File path: docs/en/latest/plugins/authz-casbin.md
##########
@@ -0,0 +1,207 @@
+---
+title: authz-casbin
+---
+
+<!--
+#
+# 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
+
+- [**Name**](#name)
+- [**Attributes**](#attributes)
+- [**Metadata**](#metadata)
+- [**How To Enable**](#how-to-enable)
+- [**Test Plugin**](#test-plugin)
+- [**Disable Plugin**](#disable-plugin)
+- [**Examples**](#examples)
+
+## Name
+
+`authz-casbin` is an authorization plugin based on [Lua 
Casbin](https://github.com/casbin/lua-casbin/). This plugin supports powerful 
authorization scenarios based on various access control models.
+
+For detailed documentation on how to create model and policy, refer 
[Casbin](https://casbin.org/docs/en/supported-models).
+
+## Attributes
+
+| Name        | Type   | Requirement | Default | Valid | Description           
                                       |
+| ----------- | ------ | ----------- | ------- | ----- | 
------------------------------------------------------------ |
+| model_path  | string | required    |         |       | The path of the 
Casbin model configuration file.             |
+| policy_path | string | required    |         |       | The path of the 
Casbin policy file.                          |
+| username    | string | required    |         |       | The header you will 
be using in request to pass the username (subject). |
+
+**NOTE**: You must either specify both the `model_path` and `policy_path` in 
plugin config or specify both the `model` and `policy` in the plugin metadata 
for the schema to be valid.
+
+## Metadata

Review comment:
       @spacewander What's your opinion? If the policy in plugin metadata is 
used to be the default one, we'd better to keep the configuration items 
consistent.

##########
File path: docs/en/latest/plugins/authz-casbin.md
##########
@@ -0,0 +1,207 @@
+---
+title: authz-casbin
+---
+
+<!--
+#
+# 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
+
+- [**Name**](#name)
+- [**Attributes**](#attributes)
+- [**Metadata**](#metadata)
+- [**How To Enable**](#how-to-enable)
+- [**Test Plugin**](#test-plugin)
+- [**Disable Plugin**](#disable-plugin)
+- [**Examples**](#examples)
+
+## Name
+
+`authz-casbin` is an authorization plugin based on [Lua 
Casbin](https://github.com/casbin/lua-casbin/). This plugin supports powerful 
authorization scenarios based on various access control models.
+
+For detailed documentation on how to create model and policy, refer 
[Casbin](https://casbin.org/docs/en/supported-models).
+
+## Attributes
+
+| Name        | Type   | Requirement | Default | Valid | Description           
                                       |
+| ----------- | ------ | ----------- | ------- | ----- | 
------------------------------------------------------------ |
+| model_path  | string | required    |         |       | The path of the 
Casbin model configuration file.             |
+| policy_path | string | required    |         |       | The path of the 
Casbin policy file.                          |
+| username    | string | required    |         |       | The header you will 
be using in request to pass the username (subject). |
+
+**NOTE**: You must either specify both the `model_path` and `policy_path` in 
plugin config or specify both the `model` and `policy` in the plugin metadata 
for the schema to be valid.
+
+## Metadata

Review comment:
       @spacewander What's your opinion? If the policy in plugin metadata is 
used to be the default one, we'd better keep the configuration items consistent.




-- 
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