You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproduction steps
Steps to reproduce the behavior: (haven't tried yet)
Add oauth api.
Use it with an access token and make sure it successfully returns response
Stope redis and make another call to the api
Get error
Start redis again and make sure the api successfully returns response without restarting the gateway
Actual behavior
The flow that discovered the bug was:
The gateway made a call to redis to get OAuth client details
Redis was having connectivity issues and as such returned Error trying to set value: read tcp xx.xx.xx.xx:454354 ... Attempted access for deleted OAuth client.
Following this the gateway kept on notifying for a few oauth clients that they are deleted: Attempted access for deleted OAuth client.
Restarting the gateways sorted the issue and calls of the oauth clients were respected.
My conclusion was that that the gateway is wrongfully marking the oauth client as deleted in its in-memory and as such only a restart would allow this oauth client to be used again.
Expected behavior
If there's an error when getting an oauth client either not found or a network error the gateway will temporarily mark the oauth client as deleted in its in-memory cache for a certain interval (1 sec)
Logs (debug mode or log file):
"level=error msg=\"Error trying to set value: read tcp 10.32.xxx.xxx:3xxx: i/o timeout\""
--
" level=error msg=\"Could not send notification: read tcp i/o timeout\""
“level=error msg=\"Error trying to get TTL: read tcp : i/o timeout\""
"level=warning msg=\"Attempted access for deleted OAuth client.\" api_id=fdgddf api_name=quotation-external-orchestration key=\"****\" mw=Oauth2KeyExists oauthClientID={client-id} org_id={org-id} origin=fdsfdg path=\"/partner-quotation/\""
"level=error msg=\"Failure retreiving client ID key \\\"oauth-clientid.{client-id}\\\": key not found\""
Branch/Environment/Version
Describe the bug
Reproduction steps
Steps to reproduce the behavior: (haven't tried yet)
Actual behavior
The flow that discovered the bug was:
Error trying to set value: read tcp xx.xx.xx.xx:454354 ... Attempted access for deleted OAuth client.
Attempted access for deleted OAuth client.
My conclusion was that that the gateway is wrongfully marking the oauth client as deleted in its in-memory and as such only a restart would allow this oauth client to be used again.
Expected behavior
If there's an error when getting an oauth client either not found or a network error the gateway will temporarily mark the oauth client as deleted in its in-memory cache for a certain interval (1 sec)
Logs (debug mode or log file):
Configuration (tyk config file):
Attach tyk configuration file
Additional context
Commit: 6647450
set interval so the OAuth client won't be marked as deleted till next restart
The text was updated successfully, but these errors were encountered: