Skip to content

[Bug] BE loses S3 access once the EKS Pod Identity token rotates; token file is never re-read #66554

Description

@Owen-CH-Leung

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master (also 4.1.x)

What's Wrong?

Under EKS Pod Identity, the BE cannot reach s3 once its credentials expire, because it cannot refresh them.

The CustomAwsCredentialsProviderChain only reads the credential endpoint's token from AWS_CONTAINER_AUTHORIZATION_TOKEN, once at construction. EKS Pod Identity supplies that token as a file stored in AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE and rotates it, which the chain never reads.

Reference: https://docs.aws.amazon.com/eks/latest/userguide/pod-id-how-it-works.html

So the BE keeps presenting the token it captured at startup. After first rotation, the agent will reject it and therefore every s3 request from BE fails.

What You Expected?

The BE reads AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE and re-reads it on each refresh, so BE can hit s3 across token rotations.

How to Reproduce?

  1. Run the BE in EKS with a Pod Identity association and no static credentials
  2. Query a s3-backed catalog, and then wait for the token file to rotate
  3. Subsequent queries will fail

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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