You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/16 09:26:19 UTC

[GitHub] [apisix-ingress-controller] juzhiyuan commented on a diff in pull request #1018: doc: update "enable-authentication-and-restriction.md" doc, and examples of `jwt-auth` and `wolf-rbac`.

juzhiyuan commented on code in PR #1018:
URL: https://github.com/apache/apisix-ingress-controller/pull/1018#discussion_r873509385


##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods

Review Comment:
   For me, I think we don't need the `methods` explanation 😄



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods
 
-#### [`keyAuth`](https://apisix.apache.org/docs/apisix/plugins/key-auth/)
+#### `keyAuth`
 
-Consumers add their key either in a header `apikey` to authenticate their requests.
+Consumers add their key either in a header `apikey` to authenticate their requests. For more information about `keyAuth`, please refer to [APISIX jwt-auth](https://apisix.apache.org/docs/apisix/plugins/key-auth/).
+
+<details>

Review Comment:
   😂 May I know what's `details` usage here?



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods
 
-#### [`keyAuth`](https://apisix.apache.org/docs/apisix/plugins/key-auth/)
+#### `keyAuth`
 
-Consumers add their key either in a header `apikey` to authenticate their requests.
+Consumers add their key either in a header `apikey` to authenticate their requests. For more information about `keyAuth`, please refer to [APISIX jwt-auth](https://apisix.apache.org/docs/apisix/plugins/key-auth/).

Review Comment:
   I notice you use `either` here, then where we could use except for `header`?



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods
 
-#### [`keyAuth`](https://apisix.apache.org/docs/apisix/plugins/key-auth/)
+#### `keyAuth`
 
-Consumers add their key either in a header `apikey` to authenticate their requests.
+Consumers add their key either in a header `apikey` to authenticate their requests. For more information about `keyAuth`, please refer to [APISIX jwt-auth](https://apisix.apache.org/docs/apisix/plugins/key-auth/).
+
+<details>
+  <summary>keyAuth yaml configure</summary>
 
 ```yaml
-keyAuth:
-  value:
-    key: ${key}
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixConsumer
+metadata:
+  name: ${name}

Review Comment:
   I would suggest we keep using the same style when passing variables, cc @navendu-pottekkat @hf400159 



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -314,10 +516,10 @@ EOF
 
 **Example usage**
 
-Requests from jack1:
+* Requests from jack1:

Review Comment:
   Just to make sure: whether the `*` signal is added by your IDE?



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods
 
-#### [`keyAuth`](https://apisix.apache.org/docs/apisix/plugins/key-auth/)
+#### `keyAuth`
 
-Consumers add their key either in a header `apikey` to authenticate their requests.
+Consumers add their key either in a header `apikey` to authenticate their requests. For more information about `keyAuth`, please refer to [APISIX jwt-auth](https://apisix.apache.org/docs/apisix/plugins/key-auth/).
+
+<details>
+  <summary>keyAuth yaml configure</summary>
 
 ```yaml
-keyAuth:
-  value:
-    key: ${key}
+apiVersion: apisix.apache.org/v2beta3
+kind: ApisixConsumer
+metadata:
+  name: ${name}
+spec:
+  authParameter:
+    keyAuth:
+      value:
+        key: ${key} #required
+```
+
+</details>
+
+#### `basicAuth`
+
+Consumers add their key either in a header `Authentication` to authenticate their requests.For more information about `basicAuth`, please refer to [APISIX basic-auth](https://apisix.apache.org/docs/apisix/plugins/basic-auth/).

Review Comment:
   `either`



##########
docs/en/latest/practices/enable-authentication-and-restriction.md:
##########
@@ -27,36 +27,124 @@ Consumers are used for the authentication method controlled by Apache APISIX, if
 
 ## Attributes
 
-### Authentication
+### Authentication methods
 
-#### [`keyAuth`](https://apisix.apache.org/docs/apisix/plugins/key-auth/)
+#### `keyAuth`

Review Comment:
   How about using `Key Auth`, `JWT Auth` as title style?



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

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