-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix issues in AzureFileShareService introduced by #779 #818
Comments
motus
added a commit
that referenced
this issue
Aug 3, 2024
To use token-based authentication for `ShareClient`, I think we should be passing in the credential object derived from `TokenCredential` (in our case, some instance of `DefaultAzureCredential`. Previously, we were passing specific string tokens to the `credential` argument, which is being intepreted as a SAS token. This leads to errors like: `azure.core.exceptions.ClientAuthenticationError: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.` [ShareClient](https://learn.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.shareclient?view=azure-python) documentation on the `credential` argument. By passing in the whole `TokenCredential` object, I believe `ShareClient` will manage the token lifecycle and we won't need to do so as mentioned in #818. --------- Co-authored-by: Eu Jing Chua <eujingchua@microsoft.com> Co-authored-by: Sergiy Matusevych <sergiym@microsoft.com>
Closed by #820 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
_get_share_client
is now only called once, but needs to be refreshed on demand using theAuthService
This change caused tests to try and authenticate, but we need to mock that for tests:
motus#14
Originally posted by @bpkroth in #779 (comment)
The text was updated successfully, but these errors were encountered: