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

Short Circuit Filter Expression Security If User Checks would pass/fail. #1275

Merged
merged 9 commits into from
Apr 21, 2020

Conversation

aklish
Copy link
Member

@aklish aklish commented Apr 21, 2020

Description

Evaluating security for filter expressions currently fetches the relationships involved in the filter expression. This can result in unnecessary database queries if the only security rules are User checks.

Motivation and Context

Remove unnecessary database calls when we can evaluate security statically.

How Has This Been Tested?

Unit Tests - TBD

License

I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

…curity evaluation if User Check would pass/fail
@coveralls
Copy link
Collaborator

coveralls commented Apr 21, 2020

Coverage Status

Coverage increased (+0.08%) to 80.276% when pulling a669980 on ShortCircuitRelationshipFetches into 6c13c00 on master.

@wcekan
Copy link
Contributor

wcekan commented Apr 21, 2020

I like the optimization, and will look again after the new unit tests.

@aklish aklish merged commit 6993e35 into master Apr 21, 2020
@aklish aklish deleted the ShortCircuitRelationshipFetches branch April 21, 2020 21:45
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.

3 participants