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

Return actual expiry including token expiry for presigned URLs #6328

Closed
arielshaqed opened this issue Aug 7, 2023 · 3 comments · Fixed by #6337
Closed

Return actual expiry including token expiry for presigned URLs #6328

arielshaqed opened this issue Aug 7, 2023 · 3 comments · Fixed by #6337
Assignees
Labels
area/API Improvements or additions to the API area/block-adapter area/cataloger Improvements or additions to the cataloger AWS azure Issues regarding azure block adapter and support

Comments

@arielshaqed
Copy link
Contributor

Clients can use our API to request presigned URLs to underlying storage. The lifetime of this URL is given by the minimum of:

  • The presigned expiry time, configured for the block adaptor.
  • The expiry time of any authentication tokens.
    For instance, when lakeFS is configured to run using AWS IAM STS, presigned URLs will expire when the current token expires. The client has no way of knowing either of these times. While the expiry time is static and conceivably might be configured on the client as well, lakeFS auth token expiration is dynamic and cannot be guessed by the client.

This might currently be causing isses at user sites using lakeFS Delta Sharing with Unity.

Add an expiration field to presigned responses.

@arielshaqed arielshaqed added area/cataloger Improvements or additions to the cataloger area/API Improvements or additions to the API area/block-adapter AWS azure Issues regarding azure block adapter and support labels Aug 7, 2023
@arielshaqed
Copy link
Contributor Author

First priority currently AWS (sorry, Azure folks...).

@johnnyaug
Copy link
Contributor

johnnyaug commented Aug 8, 2023

Not sure I agree with this solution. I would argue that it's within the responsibility of the lakeFS admin to make sure that lakeFS authenticates properly with the storage. Returning an expiry time which is deduced from two different expiry times seems confusing, and it's not really clear what the user is meant to do with this information.

We could help in other ways. For example, by introducing a mechanism to renew the storage session when it's about to expire.

@arielshaqed, could you elaborate what issue this may be causing on the user side?

@arielshaqed
Copy link
Contributor Author

@arielshaqed, could you elaborate what issue this may be causing on the user side?

Sure!

lakeFS Delta Sharing has to return presigned URLs. Meanwhile lakeFS Cloud authenticates to AWS S3 using some weird K8s/EKS token-based scheme -- that uses a token that expires. So we need to specify on the protocol when the presigned URL expires, otherwise the Delta Sharing client can try to use an expired URL and get a nasty error. This already happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API Improvements or additions to the API area/block-adapter area/cataloger Improvements or additions to the cataloger AWS azure Issues regarding azure block adapter and support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants