Skip to content

ARROW-10675: [C++][Python] Support AWS S3 web identity credentials.#8977

Closed
balancap wants to merge 1 commit into
apache:masterfrom
balancap:ARROW-10675-support-aws-s3-sts-web-identity-credentials
Closed

ARROW-10675: [C++][Python] Support AWS S3 web identity credentials.#8977
balancap wants to merge 1 commit into
apache:masterfrom
balancap:ARROW-10675-support-aws-s3-sts-web-identity-credentials

Conversation

@balancap

Copy link
Copy Markdown
Contributor

Add support for AWS STS web identity.

The AWS SDK has made the strange choice to force users to pass web identity arguments through environment variables (see https://github.com/aws/aws-sdk-cpp/blob/2be13177875e944151132d90305dbc46e80bf8e3/aws-cpp-sdk-core/source/auth/STSCredentialsProvider.cpp), and does not provide a way of directly passing these values.

I am not sure the design choice made in this PR is so great, but I have failed to find a nicer way to integrate, considering the limitations of the AWS sdk.

@balancap balancap force-pushed the ARROW-10675-support-aws-s3-sts-web-identity-credentials branch from 27a43e9 to 4cf3abd Compare December 20, 2020 20:02
@github-actions

Copy link
Copy Markdown

@balancap balancap force-pushed the ARROW-10675-support-aws-s3-sts-web-identity-credentials branch from 4cf3abd to a168ca4 Compare December 20, 2020 21:48
@balancap balancap force-pushed the ARROW-10675-support-aws-s3-sts-web-identity-credentials branch from a168ca4 to 374f47d Compare December 20, 2020 21:56

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for posting this PR! The basic approach looks ok to me, just two comments below.

Comment thread python/pyarrow/_s3fs.pyx
An optional unique identifier that might be required when you assume
a role in another account.
use_web_identity: bool, default False
...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add the argument description here?

Comment thread python/pyarrow/_s3fs.pyx
elif anonymous:
options = CS3Options.Anonymous()
elif use_web_identity:
options = CS3Options.FromAssumeRoleWithWebIdentity()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If use_web_identity, anonymous, role_arn and (access_key or secret_key) are all exclusive, we should probably test for such cases and raise an error.

@balancap

balancap commented Jan 6, 2021

Copy link
Copy Markdown
Contributor Author

@pitrou Thanks for checking the MR! I'll push some modifications following your comments, and look more closely at the CI failures in the next couple of days.

@jorisvandenbossche

Copy link
Copy Markdown
Member

@balancap do you have time to update this?

@balancap

Copy link
Copy Markdown
Contributor Author

@jorgecarleitao @pitrou I am really sorry I did not take the time to update this PR. I'll get that done for the end of the week.

@jorisvandenbossche

Copy link
Copy Markdown
Member

No problem, take your time! (but a reminder can sometimes help ;))

@pitrou

pitrou commented Apr 15, 2021

Copy link
Copy Markdown
Member

@sahil1105 Perhaps you would be interested in this PR?

@sahil1105

Copy link
Copy Markdown
Contributor

@sahil1105 Perhaps you would be interested in this PR?

In reviewing it?

@pitrou

pitrou commented Apr 15, 2021

Copy link
Copy Markdown
Member

@sahil1105 Reviewing, and potentially suggesting updates (or submitting a fresh new PR) if you are motivated enough :-)

@sahil1105

Copy link
Copy Markdown
Contributor

@sahil1105 Reviewing, and potentially suggesting updates (or submitting a fresh new PR) if you are motivated enough :-)

Sure. I'll take a crack at it this weekend (or early next week) and submit a PR.

@pitrou

pitrou commented Jun 1, 2021

Copy link
Copy Markdown
Member

Closing this, since it was superseded by #10088.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants