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

Fix Storage Emulator rules resource evaluation #4214

Merged
merged 5 commits into from Feb 25, 2022

Conversation

tohhsinpei
Copy link
Member

Description

Issue

Fixes #3760.

The resource object was not being evaluated correctly in security rules for the Storage Emulator. An EvaluationException is thrown and the user receives a null value error. Moreover, the corresponding rule is not enforced.

Cause

The file metadata corresponding to the resource object was not being passed to the evaluator binary.

Scenarios Tested

Added additional security rule evaluating resource and verified that existing integration tests now pass with the fix.

Copy link
Contributor

@tonyjhuang tonyjhuang left a comment

Choose a reason for hiding this comment

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

Mostly lgtm, just some test related nits

scripts/storage-emulator-integration/tests.ts Outdated Show resolved Hide resolved
scripts/storage-emulator-integration/tests.ts Outdated Show resolved Hide resolved
scripts/storage-emulator-integration/tests.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@tonyjhuang tonyjhuang left a comment

Choose a reason for hiding this comment

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

Nice fix, thanks!

@tohhsinpei tohhsinpei enabled auto-merge (squash) February 25, 2022 18:24
@tohhsinpei tohhsinpei merged commit fa9093d into master Feb 25, 2022
@tohhsinpei tohhsinpei deleted the hsinpei/storage-write-rules branch February 25, 2022 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource is null in storage rules for "delete" rule
3 participants