-
Notifications
You must be signed in to change notification settings - Fork 2.8k
bug: removed default access token for Admin API. #2092
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
Conversation
|
@membphis ping |
|
@apache/apisix-committers please take a look at this PR, it is ready to merge |
| admin.key = tostring(admin.key) | ||
| end | ||
|
|
||
| if admin.key == "" or admin.key:gsub("*", "") == "" then |
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.
After the user installs Apache APISIX, it will definitely fail at start, which is a very bad experience.
As discussed in the mailing list, we need to automatically generate a random key when apisix starts
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.
$ ./bin/apisix start
ERROR: missing valid apisix.admin_key
You can call `./bin/apisix gen_admin_key` to generate a new Admin API key or
manually update the `conf/config.yaml` file.
$ ./bin/apisix gen_admin_key
generate admin key successfully
$ ./bin/apisix start
$ ps -ef | grep apisix
resty 551863 1 0 06:45 ? 00:00:00 nginx: master process openresty -p /home/resty/git/membphis/apisix -c /home/resty/git/membphis/apisix/conf/nginx.conf
resty 552021 253872 0 06:46 pts/0 00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn apisixThere 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 user needs to call apisix gen_admin_key if missing a valid Admin API key.
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.
can we add gen_admin_key to the start function?
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 gen_admin_key will modify the conf/config.yaml, I think we should only update the conf/config.yaml when the user wants to update it.
When the service is started, APISIX should only be able to read the conf/config.yaml file by default.
#2139) * fix bug * optimiz * update grpc_server_example * add test cases * fix: test case * fix: test case * return val directly * fix: test case respond body compare text * fix test case error Co-authored-by: Wen Ming <moonbingbing@gmail.com>
|
I have to close this PR, this PR contains other people's commit logs. |
What this PR does / why we need it:
as title
Pre-submission checklist: