Require that all app privileges have actions#32272
Merged
tvernum merged 2 commits intoelastic:security-app-privsfrom Jul 24, 2018
Merged
Require that all app privileges have actions#32272tvernum merged 2 commits intoelastic:security-app-privsfrom
tvernum merged 2 commits intoelastic:security-app-privsfrom
Conversation
The javadoc and validation for ApplicationPrivileges supports the idea that a privilege could have no actions. However, in that case every privilege that had no actions grants every other action-less privilege within the same action, including the NONE privilege. This commit makes the following changes: - It is not possible to PUT a privilege without any actions - A permission with no actions, never grants another privilege even if that privilege is also a zero-action privilege (which, ideally would never exist, but can occur through missing privileges or index manipulation).
Collaborator
|
Pinging @elastic/es-security |
Contributor
Author
|
This change was triggered by conversation here: |
jaymode
approved these changes
Jul 23, 2018
| import static java.util.Collections.singletonList; | ||
| import static org.hamcrest.Matchers.equalTo; | ||
|
|
||
| @TestLogging("org.elasticsearch.xpack.core.security.authz.permission:TRACE") |
Member
There was a problem hiding this comment.
do we still need this test logging?
Contributor
Author
|
@elasticmachine run gradle build tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The javadoc and validation for ApplicationPrivileges supports the idea
that a privilege could have no actions. However, in that case every
privilege that had no actions grants every other action-less privilege
within the same action, including the NONE privilege.
This commit makes the following changes:
that privilege is also a zero-action privilege (which, ideally would
never exist, but can occur through missing privileges or index
manipulation).