-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposed fixes for token-based auth in azure fileshare service (#820)
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 <[email protected]> Co-authored-by: Sergiy Matusevych <[email protected]>
- Loading branch information
1 parent
7fe167d
commit 45528cf
Showing
5 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters