-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(ingest/iceberg): Extend iceberg source to allow role assumption #15288
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
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| catalog_config, GLUE_ROLE_ARN, AWS_ROLE_ARN | ||
| ) | ||
| if role_to_assume: | ||
| logger.debug( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be info level
|
|
||
| sts_client = session.client("sts") | ||
| identity = sts_client.get_caller_identity() | ||
| logger.debug( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also info
IMO :-)
| "Current role and the role we wanted to assume are the same, continuing without further assumption steps" | ||
| ) | ||
| else: | ||
| logger.debug(f"Assuming the role {role_to_assume}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info
| response = sts_client.assume_role( | ||
| RoleArn=role_to_assume, | ||
| RoleSessionName="session", | ||
| DurationSeconds=43200, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be a constant and we could mention that 12h is the max we can set
RoleSessionName could be more descriptive
…15288) Co-authored-by: pedro93 <pedro.cls93@gmail.com>
Currently pyiceberg library does not use
role-arnwhen connecting to Glue catalog (limits itself only to assume that role for s3 access). This is a workaround until such functionality is introduced inpyiceberg.