-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: support hide the authentication header in basic-auth with a config #6039
Changes from 14 commits
dc2570a
f0d6f6f
3845a27
db0c9e7
0cee869
79ca875
9a9565c
10d35fd
c642635
29d3077
1c42db0
7a663fa
6e8d684
ec3bec6
37076a7
484d05d
63aa704
210c9d5
cb53193
395ac1a
25602a7
41bb17e
49b7850
a1deeef
4fc743f
8440045
8531227
31af04d
ccc46b6
1b0ffe4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -39,10 +39,18 @@ For more information on Basic authentication, refer to [Wiki](https://en.wikiped | |||||
|
||||||
## Attributes | ||||||
|
||||||
| Name | Type | Requirement | Default | Valid | Description | | ||||||
| -------- | ------ | ----------- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| username | string | required | | | Different `consumer` should have different value which is unique. When different `consumer` use a same `username`, a request matching exception would be raised. | | ||||||
| password | string | required | | | the user's password | | ||||||
For consumer side: | ||||||
|
||||||
| Name | Type | Requirement | Default | Valid | Description | | ||||||
| -------- | ------ | ----------- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| username | string | required | | | Different `consumer` should have different value which is unique. When different `consumer` use a same `username`, a request matching exception would be raised. | | ||||||
| password | string | required | | | the user's password | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mangoGoForward IMHO there's no need to change this. How about revert it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
|
||||||
For route side: | ||||||
|
||||||
| Name | Type | Requirement | Default | Valid | Description | | ||||||
| -------- | ------ | ----------- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||||
| hide_credentials | boolean | optional | false | | Whether to return the Authentication request headers to the upstream. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
|
||||||
## How To Enable | ||||||
|
||||||
|
@@ -129,8 +137,8 @@ hello, world | |||||
## Disable Plugin | ||||||
|
||||||
When you want to disable the `basic-auth` plugin, it is very simple, | ||||||
you can delete the corresponding json configuration in the plugin configuration, | ||||||
no need to restart the service, it will take effect immediately: | ||||||
you can delete the corresponding json configuration in the plugin configuration, | ||||||
no need to restart the service, it will take effect immediately: | ||||||
|
||||||
```shell | ||||||
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -X PUT -d ' | ||||||
|
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.
is ok?
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.
Done.