Skip to content
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

Object level security for Application Privilege Actions #31987

Closed

Conversation

tvernum
Copy link
Contributor

@tvernum tvernum commented Jul 12, 2018

Note: We've haven't reached a definitive agreement on what the JSON looks like for this, but I think it's worth getting the review started while we keep thinking about that.

This introduces "conditional cluster privileges" to the X-Pack permissions model.
From a pure authz point of view (Role and AuthorizationService), the change is simply the addition of a TransportRequest parameter to ClusterPermission.
This means that a permission is able to consider both the action name and the request content in order to decide whether a particular action should be allowed.

At the RoleDescriptor level, the change introduces a new ConditionalClusterPrivilege interface, alongside the existing String action-name cluster-privileges.
Logically these could be combined, but the separation allows for easy backwards compatibility in the the JSON API (and index format) for name based privileges. Traditional, action-name cluster privileges are still described by a cluster: [] element in the JSON, while conditional privileges are described in a policy: {} element (the name is subject to change).

For the roles API, and builtin roles providers (native + file) the only supported conditional privilege is ManageApplicationPrivileges represented in JSON as:

"application" : { "manage" : { "applications" : [ "my-app",  "app-*" ] } }

which restricts the use of the Get/Put/Delete Privileges actions to those that act upon the specified application names ("my-app", "app-*")

It is possible for custom role providers to provide additional conditional privileges (documentation and examples for this will be added in a later PR).

@tvernum tvernum added >feature review :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC labels Jul 12, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

/**
* @deprecated Use {@link #cluster(Set, Iterable)}
*/
@Deprecated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a follow up PR to remove the uses of this method (which are all in tests)

@tvernum
Copy link
Contributor Author

tvernum commented Jul 12, 2018

Actually, don't review this PR.
I'm going to split a small starting change out of to simply add that additional argument to ClusterPermission, and update all the relevant tests. That should cut some of the noise from this PR.

I'll leave this open for now so I can check the CI results.

@tvernum
Copy link
Contributor Author

tvernum commented Jul 12, 2018

I raised #31998 instead.

@tvernum tvernum removed the review label Jul 12, 2018
@tvernum tvernum closed this Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants