-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Schema queries are allowed even when ACL rules are set #4105
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
Comments
I can take a look at this. |
I am wondering if access to predicate is (currently) acceptable when no rules are defined, why access to schema is not acceptable. It would be a good idea to create a matrix with scenarios before adding allow/block rules. |
Yeah, that is weird and I think there's another issue to make predicates not accessible by default. Usually it's a good idea to allow the least access by default but this was overlooked. |
Related to #4082. |
Now, on further thought, I feel like we currently have no rules around reading schema. We have no way of blocking to read the schema. We can specify rules for modifying schema, though. This seems like this will require additional ACL rules if we want to do something about it. I think this needs more thought. cc: @campoy |
Not a fan of doing it all in a single PR because a lot of tests will break. |
But I think before that, we need to fix on the behaviour of access to predicates by default.
|
Here's the other issue for blocking predicates: #4082 It's not a terrible thing to be able to read the schema but the default behavior should be as strict as possible. |
Fixed by #4082 |
What version of Dgraph are you using?
v1.1.0
Have you tried reproducing the issue with the latest release?
Yes
What is the hardware spec (RAM, OS)?
N/A
Steps to reproduce the issue (command/config used to run Dgraph).
--hmac_secret_file
).schema {}
query.Expected behaviour and actual result.
Actual result:
The schema query succeeds and returns the schema of the db.
Expected result:
I expect the schema query to be disallowed unless I am 1) logged in and 2) logged in as a user with the appropriate permissions.
The text was updated successfully, but these errors were encountered: