Skip to content

Repeated region in STS Regional Endpoints for TokenFileWebIdentity #45

Closed
@hartmanCodes

Description

@hartmanCodes

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

  1. Initialize plugin with TokenFileWebIdentity
  2. Wait for token to expire (about an hour)
  3. Send requests to routes using the AWS SDK
  4. DNS Resolution error will appear with the additional regions in the hostname

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions