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

Fixed bug where BlobBaseClient.Exists() did not function correctly for blobs encrypted with CPK #22425

Merged
merged 16 commits into from
Jun 24, 2021

Conversation

gapra-msft
Copy link
Member

@gapra-msft gapra-msft commented Jun 21, 2021

Not technically a 78 feature but I need the regenerated code.

This PR is to address a scenario when a customer has a blob encrypted with CPK and calls exists without the CPK on the client.

If someone does not have a CPK, it is fine to return back true since the service is not hiding the fact that the blob exists (otherwise it would return 404 like in incorrect SAS or auth scenarios). The service returns an error message saying the blob uses CPK so it cannot return back properties.

gapra-msft and others added 13 commits May 18, 2021 14:29
* swagger generation and hookup

regenerated files swagger for listing
hooked up generated and handwritten models
expanded client API to support new models

* testing and fixes

expanded test parameters for file listing.
swagger transform added.

* rerecorded file listing test

* more testing

also fixed a method name casing

* docstrings and samples

* checkstyle

* reverted primative boolean extended info arg

REST api accepts true or an absence of value. Alligning with .NET for
now on Boolean vs boolean.

* checkpoint

* pr feedback

* misused variable fix

* fixed test

* send nothing, not false: include-extended-info

other minor fixes
rerecorded tests

* import cleanup

* swagger regeneration and test fixes

* API comments

extendedInfo boolean => Boolean
renamed options class

* reidentified samples for options class name change

Co-authored-by: jschrepp-MSFT <[email protected]>
# Conflicts:
#	sdk/storage/azure-storage-blob/CHANGELOG.md
#	sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/AppendBlobAsyncClient.java
#	sdk/storage/azure-storage-common/CHANGELOG.md
#	sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/Constants.java
#	sdk/storage/azure-storage-file-datalake/CHANGELOG.md
#	sdk/storage/azure-storage-file-share/CHANGELOG.md
#	sdk/storage/azure-storage-queue/CHANGELOG.md
#	sdk/storage/azure-storage-queue/src/test/resources/session-records/QueueSASTestsAccountSASCreateDeleteQueue.json
@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jun 21, 2021
@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run java - [service] - ci

Copy link
Member

@jaschrep-msft jaschrep-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the description with more info on what we're trying to achieve here besides just this API not throwing in a certain context? What customer need are we responding to with this change? If someone doesn't have the CPK, is it acceptable that we relay true back to them? Is the REST service specifically hiding anything from us on this or is it acknowledging that the blob does indeed exist on this response?

@gapra-msft
Copy link
Member Author

Can you update the description with more info on what we're trying to achieve here besides just this API not throwing in a certain context? What customer need are we responding to with this change? If someone doesn't have the CPK, is it acceptable that we relay true back to them? Is the REST service specifically hiding anything from us on this or is it acknowledging that the blob does indeed exist on this response?

Updated the description

@gapra-msft gapra-msft requested a review from seanmcc-msft June 23, 2021 16:38
@kasobol-msft kasobol-msft deleted the branch Azure:main June 24, 2021 18:53
@kasobol-msft kasobol-msft reopened this Jun 24, 2021
@kasobol-msft kasobol-msft changed the base branch from feature/storage/stg78 to main June 24, 2021 19:03
@gapra-msft gapra-msft enabled auto-merge (squash) June 24, 2021 19:05
@gapra-msft gapra-msft merged commit 5ba39d1 into Azure:main Jun 24, 2021
@gapra-msft gapra-msft deleted the storage/cpkGetProperties branch June 24, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants