blob/azblob: Fix SAS token not being used to open a container#2934
Merged
Conversation
stanhu
commented
Dec 18, 2020
vangent
self-requested a review
December 18, 2020 00:41
vangent
requested changes
Dec 18, 2020
stanhu
force-pushed
the
sh-fix-issue-2933
branch
from
December 18, 2020 00:45
dafa508 to
6e93d95
Compare
Prior to google#2873, setting the environment variable `AZURE_STORAGE_SAS_TOKEN` would work because the default behavior was to open the bucket via the environment. However, that pull request changed the behavior to only use the environment if an account key were provided, but the SAS token can be thought of as a temporary key. To fix this, we check whether an account key or a SAS token is provided. If one of them is available, open the container with the environment. Closes google#2933
stanhu
force-pushed
the
sh-fix-issue-2933
branch
from
December 18, 2020 00:46
6e93d95 to
b334d89
Compare
Codecov Report
@@ Coverage Diff @@
## master #2934 +/- ##
==========================================
- Coverage 69.24% 69.23% -0.01%
==========================================
Files 110 110
Lines 11449 11449
==========================================
- Hits 7928 7927 -1
- Misses 2872 2875 +3
+ Partials 649 647 -2
Continue to review full report at Codecov.
|
chrismellard
approved these changes
Dec 18, 2020
vangent
approved these changes
Dec 18, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prior to #2873, setting the
environment variable
AZURE_STORAGE_SAS_TOKENwould work because thedefault behavior was to open the bucket via the environment. However,
that pull request changed the behavior to only use the environment if an
account key were provided, but the SAS token can be thought of as a
temporary key.
To fix this, we check whether an account key or a SAS token is
provided. If one of them is available, open the container with the
environment.
Closes #2933