-
Notifications
You must be signed in to change notification settings - Fork 150
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
Order of fields on a type matter for @authorization validation #4054
Comments
Many thanks for raising this bug report @afreakk. 🐛 We will now attempt to reproduce the bug based on the steps you have provided. Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket. Thanks again! 🙏 |
1 similar comment
Many thanks for raising this bug report @afreakk. 🐛 We will now attempt to reproduce the bug based on the steps you have provided. Please ensure that you've provided the necessary information for a minimal reproduction, including but not limited to:
If you have a support agreement with Neo4j, please link this GitHub issue to a new or existing Zendesk ticket. Thanks again! 🙏 |
We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @afreakk! 🙏 We will now prioritise the bug and address it appropriately. |
This bug report has been assigned high priority to fix. If you wish to contribute a fix, please branch from |
Hey @afreakk, I've been taking a look at this the past days. This is primarily down to the nature of authorization rules are checked directly before and after each operation, rather than before and after the entire query or mutation. The fix here is to change this architecture to the latter, which as you can maybe guess, is a very large bug fix! We don't consider there to be a security issue here, so we are going to take this to the drawing board to think about how to achieve this over the coming weeks and months. |
Describe the bug
In certain scenarios, the order of fields on a type matter for @authorization validation.
To Reproduce
Clone the following repo https://github.com/afreakk/n4j-issue
yarn install
./test.sh watch-test
Test should now fail with:
Now if you change the following type in schema.graphql:
By moving the pointed to line up so the type will look like this:
Tests will now pass...
(you can force save index.test.js to force rerun of tests)
Expected behavior
Order of fields should not have an impact on @authorization.
System (please complete the following information):
The text was updated successfully, but these errors were encountered: