1

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?

RJNZ
  • 17
  • 6

2 Answers2

2

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.

0

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

  • Thank you! Yup tried that too but it doesn't seem to do it. I am also seeing this in the logs... `tyk-gateway_1 | time="Jun 28 05:13:12" level=warning msg="Reconnecting storage: Redis is either down or ws not configured" prefix=pub-sub"` – RJNZ Jun 28 '21 at 10:19
  • This is the log I got so far as soon as I start it up - https://mclo.gs/3YNof7a – RJNZ Jun 28 '21 at 22:57
  • Please share tyk.conf file and docker compose file – Padmaraj Ajeethadass Jun 29 '21 at 01:46
  • Those are both the default files straight from Git repo which I cloned – RJNZ Jun 29 '21 at 02:24
  • `root@support-tyk-api-gateway:~# curl localhost:8080/hello {"status":"pass","version":"v3.2.1","description":"Tyk GW","details":{"redis":{"status":"pass","componentType":"datastore","time":"2021-06-29T02:23:36Z"}}}` – RJNZ Jun 29 '21 at 02:24
  • tyk.conf file - paste.ofcode.org/M5CjPcvBxPGTiFqwKXw5Tv | Dockerfile - paste.ofcode.org/BrbrkmXAaXDadZQxDRxahz – RJNZ Jun 29 '21 at 02:44