Skip to content

[fix](be): fix BE access to aws under eks pod identity - #66555

Closed
Owen-CH-Leung wants to merge 5 commits into
apache:masterfrom
qube-rt:chore-thirdparty-upgrade-aws-sdk-cpp-1.11.221
Closed

Owen-CH-Leung wants to merge 5 commits into
apache:masterfrom
qube-rt:chore-thirdparty-upgrade-aws-sdk-cpp-1.11.221

Conversation

@Owen-CH-Leung

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #66554

Problem Summary

Fixes the issue above by forwarding AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE alongside the inline token. Given a file path, the provider will re-read it before every fetch, so credentials survive token rotation. ECS, which sets only the inline variable AWS_CONTAINER_AUTHORIZATION_TOKEN, is unaffected.

Why the aws-sdp-cpp bump

The GeneralHTTPCredentialsProvider does not exist before 1.11.221. The only container provider available at the currently pinned version is TaskRoleCredentialsProvider, which takes the token as a string and has no notion of a token file. 1.11.221 is the first version whose GeneralHTTPCredentialsProvider re-reads the token file.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Owen-CH-Leung Owen-CH-Leung changed the title Chore thirdparty upgrade aws sdk cpp 1.11.221 chore(thirdparty): fix BE access to aws under eks pod identity Aug 6, 2026
@Owen-CH-Leung Owen-CH-Leung changed the title chore(thirdparty): fix BE access to aws under eks pod identity fix(be): fix BE access to aws under eks pod identity Aug 6, 2026
@morningman

Copy link
Copy Markdown
Contributor

/review

@morningman

Copy link
Copy Markdown
Contributor

@sollhui PTAL

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for two blocking issues: explicit CONTAINER routing still cannot use standard EKS Pod Identity, and supported stale/prebuilt third-party paths can compile this patch against AWS SDK 1.11.219.

Critical checkpoint conclusions

  • Goal, correctness, scope, and parallel paths: The default custom chain now forwards the rotating token-file path, but the public explicit CONTAINER routes in BE S3, Cloud recycler, and MSK remain relative-URI-only, including STS base-provider paths. This is the first inline blocker.
  • Concurrency, lifecycle, error handling, and special conditions: Token-file refresh locking, expiry-driven reload, provider/client ownership, mock-server request completion, environment/file cleanup, relative/full URI precedence, and empty-provider behavior were checked. No additional issue survived; the explicit-route failure is covered by the first inline comment.
  • Configuration, dynamic behavior, compatibility, and FE/BE variables: No new runtime variable or protocol/storage-format change is introduced. Existing FE/property/thrift/PB selection makes explicit CONTAINER reachable. The AWS SDK pin is a build-time compatibility change, but stale installs and the macOS prebuilt path are not invalidated; this is the second inline blocker.
  • Tests and results: The new unit test exercises two token-file reads in the default chain, but it does not cover explicit CONTAINER or its assume-role consumers, and no test protects dependency-version invalidation. Per the automated-review instructions, I did not run builds or tests.
  • Observability and performance: Authorization-token secrecy is preserved, provider-selection logging remains adequate, and refresh stays expiry-driven; no additional hot-path or observability issue was found.
  • Persistence, transactions, and data writes: Not applicable to this credential-provider and third-party dependency change.
  • User focus: review_focus.txt contained no additional focus points; the full PR was reviewed.
  • Completion status: The review converged after round 2. All independent reviewers returned NO_NEW_VALUABLE_FINDINGS against the unchanged two-finding set, every candidate was resolved, and there were no pre-existing live inline threads to duplicate.

Separately, the current PR title checker is failing because the title uses fix(be): rather than the repository's required [fix](be) form.

AddProvider(Aws::MakeShared<TaskRoleCredentialsProvider>(
DefaultCredentialsProviderChainTag, absoluteUri.c_str(), token.c_str()));
const auto tokenPath = Aws::Environment::GetEnv(AWS_EKS_CONTAINER_AUTHORIZATION_TOKEN_FILE);
AddProvider(Aws::MakeShared<GeneralHTTPCredentialsProvider>(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Apply the EKS provider wiring to explicit CONTAINER routes

This fixes CustomAwsCredentialsProviderChain, but CONTAINER is also a supported public provider mode. The BE S3 factory, Cloud recycler, and MSK auth paths still construct TaskRoleCredentialsProvider from only AWS_CONTAINER_CREDENTIALS_RELATIVE_URI. Standard EKS injects only AWS_CONTAINER_CREDENTIALS_FULL_URI plus AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE, so those branches pass an empty URI, create no HTTP client, and return no credentials (including when used as an STS base provider). Please centralize this construction so every explicit container-provider path forwards the relative URI, full URI, inline token, and rotating token-file path, and add coverage for explicit CONTAINER mode rather than only the default custom chain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kafka MSK also need support

Comment thread thirdparty/vars.sh Resolved
@Owen-CH-Leung Owen-CH-Leung changed the title fix(be): fix BE access to aws under eks pod identity [fix](be): fix BE access to aws under eks pod identity Aug 13, 2026
@sollhui sollhui self-assigned this Aug 14, 2026
… the credentialProvider path to the explicit container mode and MSK
@Owen-CH-Leung
Owen-CH-Leung requested a review from luwei16 as a code owner August 18, 2026 09:29
hello-stephen pushed a commit that referenced this pull request Aug 21, 2026
…6851)

### What problem does this PR solve?

Related PR: #66555 

### Problem Summary:

Bumps the pinned `aws-sdk-cpp` from **1.11.219** to **1.11.221** in
`thirdparty/vars.sh`. No source changes.

**1.11.221** is the first release that ships
`GeneralHTTPCredentialsProvider.h`, which is the prerequisite for
solving #66554. This PR is deliberately pin-only so that the pre-built
thirdparty artifacts and the docker image are re-published against
**1.11.221** before any code depends on the new header. #66555 is the
follow-up PR that uses it.
@Owen-CH-Leung

Copy link
Copy Markdown
Contributor Author

Apology for the spam. Will create another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants