-
Notifications
You must be signed in to change notification settings - Fork 73
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
Property rules documentation #1076
Conversation
This PR includes documentation updates. You can view the updated docs at https://neo4j-docs-operations-1076.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review comments so far
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/manage-privileges.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have the main file left to look at but you can have these comments for now XD
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial comments on main file
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
@HannesSandberg, Which version does this PR apply to? I'll review it after you finish discussing it. |
Hello! Thank you @renetapopova it does not belong to any version yet. The feature is released behind a feature flag in 5.13 but we do not know yet when it will properly released. |
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
@renetapopova Therese have approved this now, feel free to take a look when you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some editorial comments.
@@ -332,3 +332,42 @@ Due to this, each node with the `:Person` label needs to be accessed and examine | |||
Due to the additional data accesses that the security checks need to do, this operation will be slower compared to executing the query as an unrestricted user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are repetitions of "due to" and "make sure", which would be good to address, but I can't add a suggestion there.
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Outdated
Show resolved
Hide resolved
@@ -148,6 +181,13 @@ For example if you want to grant the ability to read the properties `language` a | |||
GRANT MATCH { language, length } ON GRAPH neo4j NODES Message TO regularUsers | |||
---- | |||
|
|||
The following query exemplifies how you can grant the ability to find nodes `Post` and `Likes` where property `secret` is set to `false`, as well as reading all their properties to the role `regularUsers`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now I remember why I've changed it - "grants" is too far from "the regularUsers
role."
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
modules/ROOT/pages/authentication-authorization/limitations.adoc
Outdated
Show resolved
Hide resolved
Nice suggestions! Thanks @renetapopova |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @HannesSandberg and @Hunterness!
@HannesSandberg, when are we going to merge this one? |
Hello @renetapopova! Not yet, this feature is still under early access and not yet publicly available. I have a question for you as well. Me and @phil198 are making further improvements for this feature that must be documented as well. Do you want that to be added to this pull request? In that case I suggest that I squash all of the commits in this PR into one that are approved, and then we can add new ones on top of that one. |
Sounds good to me. Thanks! |
ed2372f
to
547d12b
Compare
We have added the new syntax and an example in the last commit. Could you please re-review @Hunterness @renetapopova |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updates looks good
---- | ||
([var][:label["|" ...]] "{" property: value "}") | ||
| (var[:label["|" ...]]) WHERE [NOT] var.property { { = | <> | > | >= | < | <= } value | IS NULL | IS NOT NULL } | ||
| (var[:label["|" ...]] WHERE [NOT] var.property { { = | <> | > | >= | < | <= } value | IS NULL | IS NOT NULL } ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing to keep in mind for when this is ready for merge/GA is that we'll need to update the additions, deprecations, removals
section (currently in cypher manual, but I think there was some talk about making something for the operations manual/administration section as well since it moved manual so I guess wherever it is at time of GA)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates for IN
looks good
aa2bd90
to
f4c01be
Compare
Added new syntax in the last commit. Could you please review @renetapopova ? |
It looks good! |
f4c01be
to
6b8607d
Compare
add property rules example to limitations section add new section for property-based access control recomend to use Block Storage review fixes: limitations page update images for granting/denying privilege syntax Update modules/ROOT/pages/authentication-authorization/manage-privileges.adoc Co-authored-by: Phil Wright <[email protected]> review fixes review fixes review fix review fixes change header in limitations page Update modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc Co-authored-by: Phil Wright <[email protected]> Apply suggestions from code review Co-authored-by: Reneta Popova <[email protected]>
6b8607d
to
9aed4a6
Compare
Made a small update, feel free to review @Hunterness and @renetapopova. Also changing this from draft to PR now since the feature will be released in 5.21. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor suggestion from me. Also, please don't merge it into dev
, as dev
still refers to 5.20.
@@ -30,6 +30,8 @@ Some of the factors that can worsen the impact on performance when having proper | |||
For performance-critical scenarios, it is recommended to design privileges based on labels. | |||
For more information, see xref:authentication-authorization/privileges-reads.adoc[Read privileges]. | |||
|
|||
When using property-based access control, ensure the property used for the rule cannot be modified. Users who can change this property can affect granted property-based privileges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One sentence per line and a small correction.
When using property-based access control, ensure the property used for the rule cannot be modified.
Users who can change this property can affect the granted property-based privileges.
modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc
Show resolved
Hide resolved
Thanks for the documentation updates. The preview documentation has now been torn down - reopening this PR will republish it. |
Co-authored-by: Reneta Popova <[email protected]>
No description provided.