-
Notifications
You must be signed in to change notification settings - Fork 91
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
Adding a new condition to identify when a everyone deny is found and … #677
base: develop
Are you sure you want to change the base?
Adding a new condition to identify when a everyone deny is found and … #677
Conversation
…if that is the case, all configured acls on the node are removed and installed again
// usually happens when SP installs some rep:policy nodes | ||
if ((acl.size() - countOutsideConfig <= configuredAceEntries.size()) | ||
&& (StringUtils.startsWith(actualAceBeanCompareStr, "everyone") && StringUtils.contains(actualAceBeanCompareStr, "deny"))) { | ||
everyoneDenyFound = true; |
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.
Can you add a test case for that condition?
@@ -97,6 +98,12 @@ protected void installAcl(Set<AceBean> aceBeanSetFromConfig, String path, Set<St | |||
if (!principalsInConfiguration.contains(acePrincipalName)) { | |||
countOutsideConfig++; | |||
diffLog.append(" OUTSIDE (not in Config) " + actualAceBeanCompareStr + "\n"); | |||
// Condition will check if everyone deny was added at the bottom, blocking all permissions created by actool | |||
// usually happens when SP installs some rep:policy nodes | |||
if ((acl.size() - countOutsideConfig <= configuredAceEntries.size()) |
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 don't understand how this condition checks the position of the everyone deny (what is stated in the comment), or is everyoneDenyFound
always true
irrespective of the position of the deny for everyone?
// Condition will check if everyone deny was added at the bottom, blocking all permissions created by actool | ||
// usually happens when SP installs some rep:policy nodes | ||
if ((acl.size() - countOutsideConfig <= configuredAceEntries.size()) | ||
&& (StringUtils.startsWith(actualAceBeanCompareStr, "everyone") && StringUtils.contains(actualAceBeanCompareStr, "deny"))) { |
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.
please act on actualAceBean
instead of the string serialization for those checks
@@ -134,6 +141,18 @@ protected void installAcl(Set<AceBean> aceBeanSetFromConfig, String path, Set<St | |||
|
|||
} | |||
|
|||
// will override the logic to apply all ACLs on the path, and removing all elements present in config files |
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.
wouldn't it make more sense that instead of reapplying everything just reorder the deny?
Please also add a reference to #676 in the commit message to autolink it. |
The change is going to find an everyone deny at the bottom of the list and if that is the case, loops again the entire permissions on the node removing the permission in the configuration files to apply them again on top.