-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
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
doc: update "enable-authentication-and-restriction.md" doc, and examples of jwt-auth
and wolf-rbac
.
#1018
Conversation
cc @navendu-pottekkat |
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂 May I know what's details
usage here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have specific reason to use this? If so, could you add it to the style guide on when to use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea is that there are many authentication methods we haven't written in. If we add configuration to each one later, it may appear very bloated. I think the display effect will be better if we use it. Users can choose the configuration content they care about. What do you think?
apiVersion: apisix.apache.org/v2beta3 | ||
kind: ApisixConsumer | ||
metadata: | ||
name: ${name} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest we keep using the same style when passing variables, cc @navendu-pottekkat @hf400159
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I've added this to the next edition of the writing guide last week, and I'll be releasing the new style guide this Friday.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlinsRan Does the ${name}
here refer to a value the user has to set? Or is it somehow a variable they are passing?
In the past we have been using name: user-configured-name
or some placeholder like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a variable that users can customize. Do I need to follow the style of the past?
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
@@ -314,10 +516,10 @@ EOF | |||
|
|||
**Example usage** | |||
|
|||
Requests from jack1: | |||
* Requests from jack1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure: whether the *
signal is added by your IDE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not, I added it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why not keep using -
?
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
password: ${password} #required | ||
``` | ||
|
||
</details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think after each example, we need to give users a tip about using the valueRef
field to reference a K8s Secret object so that we can avoid the hardcoded sensitive data in the ApisixConsumer object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved.
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the content is correct
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
Hi @navendu-pottekkat, please have a review when you have time, thanks! |
a kind reminder @navendu-pottekkat @juzhiyuan @hf400159 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some grammar issues left, after updating we could merge.
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
@@ -314,10 +516,10 @@ EOF | |||
|
|||
**Example usage** | |||
|
|||
Requests from jack1: | |||
* Requests from jack1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why not keep using -
?
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
docs/en/latest/practices/enable-authentication-and-restriction.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jintao Zhang <tao12345666333@163.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
let's move forward.
…rbac examples. (apache#1018) Co-authored-by: Jintao Zhang <tao12345666333@163.com>
Type of change:
What this PR does / why we need it:
Pre-submission checklist:
The doc update contains:
jwt-auth
config and example.wolf-rbac
config.key-auth
reference K8s Secret object in example.