feat(services/s3): add container credentials support for ECS and EKS#6525
Open
jackye1995 wants to merge 2 commits intoapache:mainfrom
Open
feat(services/s3): add container credentials support for ECS and EKS#6525jackye1995 wants to merge 2 commits intoapache:mainfrom
jackye1995 wants to merge 2 commits intoapache:mainfrom
Conversation
Contributor
Author
|
Looks like the credentials provider should go to reqsign, will create a PR there first |
d527892 to
bc58c86
Compare
Contributor
Author
|
Pending merge of apache/opendal-reqsign#598 and upgrading reqsign |
Add aws_metadata_endpoint and metadata_endpoint as aliases to container_metadata_uri_override for better compatibility. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
@Xuanwo - now that the reqsign ECS support has been merged and released in v0.17.0, could this PR be reviewed? We're blocked on this for EKS Pod Identity support in iceberg-rust with REST catalog. Happy to help test! |
Member
Thank you for the reminder! @jackye1995, are you interested in updating this PR and rebasing it on the new reqsign API for ECS support? |
rohankmr414
added a commit
to rohankmr414/opendal
that referenced
this pull request
Jan 27, 2026
…EKS Pod Identity Add support for AWS container credentials to enable authentication in containerized environments: - ECS Task IAM roles - EKS Pod Identity - AWS Fargate - Custom container credential endpoints Changes: - Add 5 new configuration fields to S3Config with AWS-prefixed aliases - Add 5 builder methods to S3Builder for container credentials - Integrate ECSCredentialProvider into credential chain - Add comprehensive tests for configuration parsing - Add detailed documentation for ECS and EKS Pod Identity usage The implementation uses reqsign-aws-v4's ECSCredentialProvider which supports both ECS and EKS Pod Identity through standard AWS container credential environment variables. Related to PR apache#6525
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive support for AWS container credentials used in ECS tasks and EKS pods, enabling OpenDAL to seamlessly work in containerized AWS environments. The implementation leverages reqsign's
ECSCredentialProviderto provide robust credential handling.Background
Container credentials are essential for AWS workloads running in ECS and EKS:
This feature addresses issue #6456 and replaces the previous placeholder implementation with a complete solution based on reqsign's proven credential provider.
Implementation
Integration with reqsign's ECSCredentialProvider
The implementation directly uses reqsign's
ECSCredentialProvider, which provides:New Configuration Fields
container_credentials_relative_uriaws_container_credentials_relative_uricontainer_credentials_endpointaws_container_credentials_full_uri,container_credentials_full_uricontainer_authorization_tokenaws_container_authorization_tokencontainer_authorization_token_fileaws_container_authorization_token_filecontainer_metadata_uri_overrideaws_container_metadata_uri_overrideBuilder Methods
Added corresponding builder methods for programmatic configuration:
container_credentials_relative_uri(uri: &str)container_credentials_endpoint(endpoint: &str)container_authorization_token(token: &str)container_authorization_token_file(file: &str)container_metadata_uri_override(uri: &str)Example Usage
JSON Configuration
{ "bucket": "my-bucket", "aws_container_credentials_relative_uri": "/v2/credentials/task-role" }Implementation Details
Architecture Changes
ECSCredentialProviderin the build process usingcustomized_credential_load()Key Features
ECSCredentialProviderDesign Decisions
Testing
Dependencies
This implementation depends on reqsign's
ECSCredentialProviderwhich is currently under review in Xuanwo/reqsign#598. The code is ready and will work once that dependency is merged.Compatibility
This change is fully backward compatible. Existing configurations continue to work unchanged, with new fields providing additional flexibility for containerized environments.
Fixes #6456