Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source file: AWS Assumed role credentials doesn't work with source-file connector #8227

Open
JD-V opened this issue Nov 24, 2021 · 7 comments

Comments

@JD-V
Copy link

JD-V commented Nov 24, 2021

Enviroment

  • Airbyte version: v0.32.25-alpha
  • OS Version / Instance: macOS
  • Deployment: Kubernetes
  • Source Connector and version: source-file:0.2.7-beta
  • Severity: Medium
  • Step where error happened: Setup new connection

Current Behavior

When I try to use standalone image of source-file to create source connection, it accepts access key and secret key of a user to and creates AWS session. If I have a IAM user in aws this flow works fine but If I have generated access/secret by Assume role service with STS I will have to pass aws_session_token along with aws_access_key_id and aws_secret_access_key while creating boto3 sesion. But since _setup_boto_session( ) does not add aws_session_token, at session creation, it fails.

Expected Behavior

*_setup_boto_session() should add aws_session_token optionally while creating session in order for assumed role credentials to work *

Steps to Reproduce

  1. run source-file image standalone with assumed role credentials

Are you willing to submit a PR?

Yes

@JD-V JD-V added the type/bug Something isn't working label Nov 24, 2021
@JD-V JD-V changed the title AWS Assumed role credentials don't work with source-file connector AWS Assumed role credentials doesn't work with source-file connector Nov 24, 2021
@alafanechere alafanechere changed the title AWS Assumed role credentials doesn't work with source-file connector 🐛 Source file: AWS Assumed role credentials doesn't work with source-file connector Nov 30, 2021
@alafanechere alafanechere added the area/connectors Connector related issues label Nov 30, 2021
@alafanechere alafanechere changed the title 🐛 Source file: AWS Assumed role credentials doesn't work with source-file connector Source file: AWS Assumed role credentials doesn't work with source-file connector Nov 30, 2021
@alafanechere alafanechere added type/enhancement New feature or request and removed type/bug Something isn't working needs-triage labels Nov 30, 2021
@alafanechere
Copy link
Contributor

Hi @JD-V our source file connector nor S3 connector supports STS sessions. I'm not sure offering the user to fill a aws_session_token field would be the right approach as STS session are temporary and it will lead to a broken source if the user does not update the token manually. I'd suggest to ask for an enhancement on the S3 connector to make it support assume role mechanism as it is made in our source_amazon_seller_partner connector.

@alafanechere
Copy link
Contributor

This is closely related to the following issue: #5942

@JD-V
Copy link
Author

JD-V commented Dec 30, 2021

While I agree with your point @alafanechere, there are users like me who just wants to use airbyte for one time replication. My organisation refrains me from using IAM credentials, hence the only option left to me is to assume a role and use that creds to run Airbyte.

If you are worried about temporary sessions breaking the source, how about just adding this feature in backend/image so that atleast apis can support it?

@alafanechere
Copy link
Contributor

@JD-V do you feel comfortable enough contributing to this feature? I'm pinging @sherifnada and @misteryeo to give you definitive feedback on this feature addition, but whatever their answer you'll still be able to use your contribution as a custom connector.

@JD-V
Copy link
Author

JD-V commented Jan 1, 2022 via email

@misteryeo
Copy link
Contributor

@JD-V Sorry for the delay here. As yet, we haven't heard from others who have the same use case as you for a one time replication. This is just a thought experiment but I'm curious if you'd be okay with making this change just for your version of the connector and not being merged which the official connector at this time until we see more requests for this particular use case come up. Would that be feasible? We'll keep this issue open to collect feedback from other users in the meantime.

@gtrak
Copy link

gtrak commented Apr 19, 2022

I'm trying to test this locally on docker and the existing AWS setup requires the STS option.

It is OK for the credentials to be temporary when evaluating airbyte, and the boto default fallback using standard AWS env-vars and instance-profile would also be fine and is standard across industry tools.

Is there a method to pass credentials down through envvars when running through docker? I tried adding them to the docker-compose.yaml file in the worker section, and it wasn't enough.

@bleonard bleonard added autoteam team/tse Technical Support Engineers labels Apr 26, 2022
@marcosmarxm marcosmarxm added team/extensibility and removed team/tse Technical Support Engineers labels Jun 14, 2022
@bleonard bleonard added the frozen Not being actively worked on label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests