Reputation: 17
We are using the community version of Tyk. When trying to add new API via file-based add, and then reloading - it doesn't seem to work! It produces this in logs.
tyk-gateway_1 | time="Jun 21 04:56:28" level=warning msg="Attempted administrative access with invalid or missing key!" prefix=main
When I execute this…
curl -H "x-tyk-authorization: '352d20ee67be67f6340b4c0605b044b7'" -s http://localhost:8080/tyk/reload/group | python3 -mjson.tool
I am 100% sure the docker-compose took secret listed in tyk.standalone.conf file. I even logged into the container created and checked “tyk.conf” and it has this very secret. Not sure what is wrong at this stage. It just doesn’t seem to recognize it as an admin key. Any advice?
Upvotes: 1
Views: 868
Reputation: 21
Please check whether docker-compose.yaml file has the environment variable TYK_GW_SECRET set. If so, please use that value as secret as the environment variable takes precedence over the config values.
Please refer to https://tyk.io/docs/tyk-environment-variables/ for more information.
Upvotes: 2
Reputation: 21
Please remove the single quote covering the secret value.
Please try with below command and let us know.
curl -H "x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7" -s http://localhost:8080/tyk/reload/group | python3 -mjson.tool
Upvotes: 0