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

Provide s3 driver with session token #65

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

gogakoreli
Copy link
Contributor

@gogakoreli gogakoreli commented Dec 19, 2024

For S3 Driver to work it needs all three, access key, secret key and session token

libcloud S3StorageDriver constructor accepts following: def __init__(self,key,secret=None,secure=True,host=None,port=None,region=None,token=None,**kwargs)

See more: https://github.com/apache/libcloud/blob/trunk/libcloud/storage/drivers/s3.py#L1231

For S3 Driver to work it needs all three, access key, secret key and session token
Copy link

Binder 👈 Launch a Binder on branch gogakoreli/jupyter-drives/patch-1

@@ -107,7 +107,7 @@ async def list_drives(self):
if self._config.access_key_id and self._config.secret_access_key:
if self._config.provider == "s3":
S3Drive = get_driver(Provider.S3)
drives = [S3Drive(self._config.access_key_id, self._config.secret_access_key)]
drives = [S3Drive(self._config.access_key_id, self._config.secret_access_key, True, None, None, None, self._config.session_token)]
Copy link

Choose a reason for hiding this comment

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

in case of an iam user there will be no session_token, this should still work because it will be none.
Can you test it by configuring with an iam user ?

Copy link
Member

Choose a reason for hiding this comment

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

Good point. I have tested this locally, and it works in the case of using only an access_key and secret_access_key, so with the session_token set to none.

@DenisaCG DenisaCG added the bug Something isn't working label Jan 6, 2025
Copy link
Member

@DenisaCG DenisaCG left a comment

Choose a reason for hiding this comment

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

Thanks for opening this @gogakoreli! I will merge this and make a release, but please feel free to open an issue if the auth problem persists.

@DenisaCG DenisaCG merged commit cf120af into QuantStack:main Jan 6, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants