@rick It worked, thanks for this !!
But my further use case is to enable OAuth 2.0 plugin having client credentials enable for these services and routes but when I am enabling the plugin and trying to fetch access token by
curl -k -X POST https://localhost:8443/oauth2/token \
--data "client_id=456" \
--data "client_secret=789" \
--data "grant_type=client_credentials"
I am getting error: [“message”:“no Route matched with those values”]
This is because of these route
hosts
configured. For conformation, I have tried removing them for routes and it worked.
Any idea how can we solve that and get access token ?
Route which is working with oauth2.0 plugin
{
"methods": [
"GET",
"POST"
],
"protocols": [
"http",
"https"
],
"regex_priority": 0,
"paths": null,
"created_at": 1726744945,
"request_buffering": true,
"response_buffering": true,
"service": {
"id": "64a57a49-151e-41b2-a3e5-4c66bc06829d"
},
"strip_path": true,
"https_redirect_status_code": 426,
"updated_at": 1726745067,
"snis": null,
"id": "6a92f4a5-2317-4fa6-a2be-4c92b564733c",
"tags": [],
"path_handling": "v0",
"sources": null,
"headers": null,
"hosts": null,
"destinations": null,
"preserve_host": false,
"name": "BoardRoute"
}
Route which is not working:
{
"methods": [
"GET",
"POST"
],
"protocols": [
"http",
"https"
],
"regex_priority": 0,
"paths": null,
"request_buffering": true,
"response_buffering": true,
"service": {
"id": "64a57a49-151e-41b2-a3e5-4c66bc06829d"
},
"strip_path": true,
"https_redirect_status_code": 426,
"snis": null,
"id": "6a92f4a5-2317-4fa6-a2be-4c92b564733c",
"tags": [],
"path_handling": "v0",
"sources": null,
"headers": null,
"hosts": [
"localhost:8000"
],
"destinations": null,
"preserve_host": false,
"name": "BoardRoute"
}