-
Notifications
You must be signed in to change notification settings - Fork 336
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: add 'enable authentication and restriction' document #972
Conversation
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.
thanks!
EOF | ||
``` | ||
|
||
**Test keyAuth** |
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 an example without headers can be added here.
enable: true | ||
config: | ||
whitelist: | ||
- "default_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.
Here you can add its generated rules
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
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
Requests from jack1: | ||
|
||
```shell | ||
kubectl exec -it -n ${namespace of Apache APISIX} ${pod of Apache APISIX} -- curl http://127.0.0.1:9080/anything -H 'Host: local.httpbin.org' -H 'apikey:jack1-key' -v |
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.
Usually, the command and return result need to be separated. And for long commands, we need to format them. Please check the full text.
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.
ok
And @navendu-pottekkat, also this one. |
|
||
## Description | ||
|
||
Consumers are useful when you have different consumers requesting the same API and you need to execute different Plugin and Upstream configurations based on the consumer. These need to be used in conjunction with the user authentication system. |
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.
Consumers are used for the authentication method controlled by Apache APISIX, if users want to use their own auth system or 3rd party systems, use OIDC.
ping @tokers @navendu-pottekkat for review, thanks |
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.
You can mention the plugins being used in the first step and link every reference to a particular Plugin to its documentation page.
Apisix to APISIX.
Kubernetes cluster: | ||
|
||
1. [apisix-ingress-controller](../deployments/minikube.md). | ||
2. httpbin. | ||
|
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.
Could you make this clearer that we want readers to setup APISIX ingress and install HTTPBin on their cluster?
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 don't think it's necessary.
- This article mainly demonstrates the use of
ApisixConsumer
. - The focus is not on the installation of the environment.
- This is based on the fact that the user can already use
APISIX Ingress
andKubernetes
.
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 agree that we shouldn't talk about how to install but I think we should make it clear that the **user have to install ingress controller and HTTPbin for the rest of the tutorial to work. Point to other documents on how to do 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.
Solved!
How to get `default_jack1`: | ||
|
||
> view ApisixConsumer resource object from this namespace `default` | ||
> | ||
> ```shell | ||
> $ kubectl get apisixconsumers.apisix.apache.org -n default | ||
> NAME AGE | ||
> foo 14h | ||
> jack1 14h | ||
> jack2 14h | ||
> ``` | ||
> | ||
> `${consumer_name}` = `${namespace}_${ApisixConsumer_name}` --> `default_foo` | ||
> `${consumer_name}` = `${namespace}_${ApisixConsumer_name}` --> `default_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.
Do we follow this style elsewhere? Would Admonitions be good here? https://docusaurus.io/docs/next/markdown-features/admonitions
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 tried. Doesn't support Admonitions
.
How to change 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.
The apisix-website repo supports admonitions. It should work. In this repo, preview is not available as it cannot be built.
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!
ping @AlinsRan any update? |
a kind reminder @navendu-pottekkat @tokers @juzhiyuan @hf400159 |
@tao12345666333 Please help to check if the guide is correct except for Style. @navendu-pottekkat and I are discussing Doc Maintainers Program, and for this PR, if the contents are correct we could merge first. |
The guide is correct. I have approved it before |
One of our current problems is that we don't have enough approvers. So I need your help. |
Just checked, and LGTM. |
Type of change:
What this PR does / why we need it:
Pre-submission checklist: