Closed BrunoQuaresma closed 6 years ago
I tried this and couldn't reproduce. Can you give us minimum example that shows this. E.g. commands to create API and plugin and consumer. The error:
{
"apikey": "apikey is an unknown field"
}
feels like it is coming from admin
(default 8001
and 8444
) port, and not from proxy
port (default 8000
and `8443
).
Or is it actually that you proxy to Admin API? https://github.com/Kong/kong/issues/1630
Even then I couldn't reproduce with config.hide_credentials
enabled.
@bungle Thanks for the feedback. Steps are updated!
I figured out the problem on my side. This error happens when the admin-api, and I don't know why, hasn't the key-auth plugin activated. For me, admin-api configurations shouldn't influence the other resources. :thinking:
Hi @BrunoQuaresma how did you solve this? I'm experiencing the same issue, thanks
Sorry @awalias I don't remember :/
Summary
When I send a POST to my API passing the apikey on URL or header it returns a 400 error with:
Steps To Reproduce
Register an API
Assign keyauth plugin to the API with config.hide_credentials=true
Make a POST using apikey on URL or header like: https://mykong.com/myapi/resource?apikey=some-key
It returns 400 with the message "apikey is an unknown field"
Additional Details & Logs