Skip to content

blob/azblob: Fix SAS token not being used to open a container#2934

Merged
vangent merged 1 commit into
google:masterfrom
stanhu:sh-fix-issue-2933
Dec 18, 2020
Merged

blob/azblob: Fix SAS token not being used to open a container#2934
vangent merged 1 commit into
google:masterfrom
stanhu:sh-fix-issue-2933

Conversation

@stanhu

@stanhu stanhu commented Dec 18, 2020

Copy link
Copy Markdown
Contributor

Prior to #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 #2933

@google-cla google-cla Bot added the cla: yes Google CLA has been signed! label Dec 18, 2020
Comment thread blob/azureblob/azureblob.go
Comment thread go.sum Outdated
Comment thread blob/azureblob/azureblob.go
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
@codecov

codecov Bot commented Dec 18, 2020

Copy link
Copy Markdown

Codecov Report

Merging #2934 (b334d89) into master (2aed3ca) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
blob/azureblob/azureblob.go 76.53% <100.00%> (ø)
server/health/sqlhealth/sqlhealth.go 56.75% <0.00%> (-21.63%) ⬇️
runtimevar/filevar/filevar.go 83.87% <0.00%> (-1.08%) ⬇️
blob/s3blob/s3blob.go 89.47% <0.00%> (+0.52%) ⬆️
runtimevar/awssecretsmanager/awssecretsmanager.go 76.27% <0.00%> (+0.84%) ⬆️
docstore/docstore.go 89.42% <0.00%> (+2.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aed3ca...b334d89. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Google CLA has been signed!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blob/azureblob: Using a SAS token no longer works

3 participants