OpenSearch/plugins/examples
Yogesh Gaikwad 471d940c44
Refactor cluster privileges and cluster permission (#45265) (#45442)
The current implementations make it difficult for
adding new privileges (example: a cluster privilege which is
more than cluster action-based and not exposed to the security
administrator). On the high level, we would like our cluster privilege
either:
- a named cluster privilege
  This corresponds to `cluster` field from the role descriptor
- or a configurable cluster privilege
  This corresponds to the `global` field from the role-descriptor and
allows a security administrator to configure them.

Some of the responsibilities like the merging of action based cluster privileges
are now pushed at cluster permission level. How to implement the predicate
(using Automaton) is being now enforced by cluster permission.

`ClusterPermission` helps in enforcing the cluster level access either by
performing checks against cluster action and optionally against a request.
It is a collection of one or more permission checks where if any of the checks
allow access then the permission allows access to a cluster action.

Implementations of cluster privilege must be able to provide information
regarding the predicates to the cluster permission so that can be enforced.
This is enforced by making implementations of cluster privilege aware of
cluster permission builder and provide a way to specify how the permission is
to be built for a given privilege.

This commit renames `ConditionalClusterPrivilege` to `ConfigurableClusterPrivilege`.
`ConfigurableClusterPrivilege` is a renderable cluster privilege exposed
as a `global` field in role descriptor.

Other than this there is a requirement where we would want to know if a cluster
permission is implied by another cluster-permission (`has-privileges`).
This is helpful in addressing queries related to privileges for a user.
This is not just simply checking of cluster permissions since we do not
have access to runtime information (like request object).
This refactoring does not try to address those scenarios.

Relates #44048
2019-08-13 09:06:18 +10:00
..
custom-settings Testclusters: support for security and convert example plugins (#41864) 2019-05-08 14:04:00 +03:00
custom-suggester Fix suggestions for empty indices (#42927) 2019-06-12 15:42:23 +02:00
painless-whitelist Convert testclusters to use distro download plugin (#44253) (#44362) 2019-07-15 17:53:05 -07:00
rescore Fix parameter value for calling data.advanceExact (#44205) 2019-07-18 10:55:10 +02:00
rest-handler Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
script-expert-scoring Testclusters: support for security and convert example plugins (#41864) 2019-05-08 14:04:00 +03:00
security-authorization-engine Refactor cluster privileges and cluster permission (#45265) (#45442) 2019-08-13 09:06:18 +10:00
build.gradle [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00