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
When using the TokenFileWebIdentity, the data plane will successfully initialize with a token, but when a request is sent to refresh the token, an additional region is added to the hostname (Ex: sts.us-west-2.us-west-2.amazonaws.com). Rapid succession requests will continue to add regions to the host name as well (Ex: sts.us-west-2.us-west-2.us-west-2.us-west-2.us-west-2.amazonaws.com). This causes a DNS resolution error and the data plane is no longer authenticated with AWS.
The generate_service_methods will add additional regions if the region currently exists in the hostname, but I'm not certain that is causing the issue given that the function is called in init.lua and the class is only initialized once with no config passed as an argument.
Steps to Reproduce
Initialize plugin with TokenFileWebIdentity
Wait for token to expire (about an hour)
Send requests to routes using the AWS SDK
DNS Resolution error will appear with the additional regions in the hostname
The text was updated successfully, but these errors were encountered:
After some testing, it was found that lines 325-327 of init.lua are the cause of the issue. This code is executed each time the token needs to be refreshed which is why the region is added each time.
Summary
When using the TokenFileWebIdentity, the data plane will successfully initialize with a token, but when a request is sent to refresh the token, an additional region is added to the hostname (Ex: sts.us-west-2.us-west-2.amazonaws.com). Rapid succession requests will continue to add regions to the host name as well (Ex: sts.us-west-2.us-west-2.us-west-2.us-west-2.us-west-2.amazonaws.com). This causes a DNS resolution error and the data plane is no longer authenticated with AWS.
The generate_service_methods will add additional regions if the region currently exists in the hostname, but I'm not certain that is causing the issue given that the function is called in init.lua and the class is only initialized once with no config passed as an argument.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: