-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Introduce Application Privileges with support for Kibana RBAC #32309
Commits on Jun 7, 2018
-
Introduce Application Privileges to Roles (#30164)
This commit introduces "Application Privileges" (aka custom privileges) to the X-Pack security model. Application Privileges are managed within Elasticsearch, and can be tested with the _has_privileges API, but do not grant access to any actions or resources within Elasticsearch. Their purpose is to allow applications outside of Elasticsearch to represent and store their own privileges model within Elasticsearch roles. Specifically, this adds - GET/PUT/DELETE actions for defining application level privileges - application privileges in role definitions - application privileges in the has_privileges API
Configuration menu - View commit details
-
Copy full SHA for 03e5e72 - Browse repository at this point
Copy the full SHA 03e5e72View commit details
Commits on Jun 12, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 53961b0 - Browse repository at this point
Copy the full SHA 53961b0View commit details
Commits on Jun 15, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 4f33b36 - Browse repository at this point
Copy the full SHA 4f33b36View commit details
Commits on Jun 20, 2018
-
Merge branch 'master' into security-app-privs
# Conflicts: # x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java # x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesActionTests.java
Configuration menu - View commit details
-
Copy full SHA for baf9b47 - Browse repository at this point
Copy the full SHA baf9b47View commit details
Commits on Jun 21, 2018
-
Refactor Privileges API/Store to use separate class (#31191)
The ApplicationPrivilege class had a dual purpose of defining application privileges as stored in the security index, and also being the means by which those privileges were tested against roles. This made the class difficult to work with - in particular validation was dependent on which purpose it was being used for. This commit splits the index storage part into a new ApplicationPrivilegeDescriptor class
Configuration menu - View commit details
-
Copy full SHA for ecea2e4 - Browse repository at this point
Copy the full SHA ecea2e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for acb0060 - Browse repository at this point
Copy the full SHA acb0060View commit details
Commits on Jun 25, 2018
-
Merge branch 'master' into security-app-privs
# Conflicts: # x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportHasPrivilegesAction.java
Configuration menu - View commit details
-
Copy full SHA for 179615f - Browse repository at this point
Copy the full SHA 179615fView commit details
Commits on Jun 26, 2018
-
Fix case sensitivity bug in application privileges (#31491)
The was a spurious toLowerCase in the privilege check that was left over from a previous design approach
Configuration menu - View commit details
-
Copy full SHA for d509bd2 - Browse repository at this point
Copy the full SHA d509bd2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c8f649 - Browse repository at this point
Copy the full SHA 2c8f649View commit details -
Allowing the kibana system role to get/put privileges (#31201)
* Allowing the kibana system role to get/put privileges and roles * Removing the ability to get/put roles * Removing unnecessary white-space
Configuration menu - View commit details
-
Copy full SHA for 5f36981 - Browse repository at this point
Copy the full SHA 5f36981View commit details
Commits on Jun 28, 2018
-
Configuration menu - View commit details
-
Copy full SHA for c3f7fcc - Browse repository at this point
Copy the full SHA c3f7fccView commit details
Commits on Jun 29, 2018
-
Merge branch 'master' into security-app-privs
# Conflicts: # x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java
Configuration menu - View commit details
-
Copy full SHA for 985802a - Browse repository at this point
Copy the full SHA 985802aView commit details
Commits on Jul 2, 2018
-
Configuration menu - View commit details
-
Copy full SHA for b8d7462 - Browse repository at this point
Copy the full SHA b8d7462View commit details
Commits on Jul 3, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 1746510 - Browse repository at this point
Copy the full SHA 1746510View commit details -
Serialize application privileges in PutRoleRequest (#31712)
The serialization methods for `PutRoleRequest` did not handle the applicationPrivileges array. Fixes this and added tests
Configuration menu - View commit details
-
Copy full SHA for 95948c7 - Browse repository at this point
Copy the full SHA 95948c7View commit details
Commits on Jul 4, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 9d61760 - Browse repository at this point
Copy the full SHA 9d61760View commit details
Commits on Jul 5, 2018
-
Support wider range of application names (#31752)
This extends the validation for application names to allow an optional suffix of "-" (or "_") followed by any number of "filename safe characters" (excluding '*') The purpose of this is to support multiple kibana instances against a single ES cluster where the name of each kibana application is "kibana-${kibana-index}", assuming some reasonable limits on the Kibana index name. The change also retricts the wildcard handling of application names to only support a trailing wildcard: e.g `*`, `kibana-*`, etc.
Configuration menu - View commit details
-
Copy full SHA for 4e1031b - Browse repository at this point
Copy the full SHA 4e1031bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 77e69a3 - Browse repository at this point
Copy the full SHA 77e69a3View commit details
Commits on Jul 6, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 35c08f4 - Browse repository at this point
Copy the full SHA 35c08f4View commit details
Commits on Jul 12, 2018
-
Merge branch 'master' into security-app-privs
# Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/Role.java # x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java
Configuration menu - View commit details
-
Copy full SHA for 02bfc8d - Browse repository at this point
Copy the full SHA 02bfc8dView commit details
Commits on Jul 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 610e587 - Browse repository at this point
Copy the full SHA 610e587View commit details -
Extend ClusterPermission to consider requests (#31998)
This lays the foundation for OLS on cluster privileges as it means that a cluster permission can be applied not just to actions, but also the objects being acted upon by the request.
Configuration menu - View commit details
-
Copy full SHA for 0083161 - Browse repository at this point
Copy the full SHA 0083161View commit details -
Add test for merging roles (#32008)
This commit adds a test for the most basic function of the `CompositeRolesStore` which is to merge 2 simple role descriptors into a single role. There were a lot of tests around FLS/DLS and custom roles providers, but nothing for the most simple case.
Configuration menu - View commit details
-
Copy full SHA for 154eb1f - Browse repository at this point
Copy the full SHA 154eb1fView commit details
Commits on Jul 17, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 7fa9f49 - Browse repository at this point
Copy the full SHA 7fa9f49View commit details -
Introduce "ConditionalClusterPrivilege" (#32073)
A conditional cluster privilege is like the existing cluster privilege, except that it has a Predicate over the request as well as over the action name. It is the "role descriptor" level representation for the newly introduced "ConditionalClusterPermission" This change adds the ConditionalClusterPrivilege interface, and allows them to be attached to RoleDescriptors, but does not provide any JSON/XContent support. This means that they cannot be used in the Roles API, nor are they stored in the security index, but they can be defined by custom Roles Providers and will be consulted as part of authorization decisions on Roles.
Configuration menu - View commit details
-
Copy full SHA for df1ca1f - Browse repository at this point
Copy the full SHA df1ca1fView commit details
Commits on Jul 19, 2018
-
Configuration menu - View commit details
-
Copy full SHA for fd42a9b - Browse repository at this point
Copy the full SHA fd42a9bView commit details -
Add manage-application-privileges conditional cluster privilege (#32116)
This includes support in the Roles API and for storing in the security index. 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-*")
Configuration menu - View commit details
-
Copy full SHA for 69a42b3 - Browse repository at this point
Copy the full SHA 69a42b3View commit details
Commits on Jul 23, 2018
-
kibana_system can only manage kibana privileges (#32221)
The kibana_system role can only manage privileges for applications named "kibana-*". The default kibana instance will have an application name of "kibana-.kibana", and other instances will be named similarly but with the ".kibana" replaced by the name of their kibana index.
Configuration menu - View commit details
-
Copy full SHA for ef7961b - Browse repository at this point
Copy the full SHA ef7961bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab641d3 - Browse repository at this point
Copy the full SHA ab641d3View commit details
Commits on Jul 24, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 22c0eb4 - Browse repository at this point
Copy the full SHA 22c0eb4View commit details -
Kibana reserved role app privs (#32137)
* Changed kibaan_user and kibana_dashboard_only_user to use the app privs * Fixing ReservedRoleTests * Fixing some style issues with the tests * Adding the action to the patterns if there are no descriptors * KibanaUserRoleIntegTests now inherits from NativeRealmIntegTestCase This causes the test to properly close the security index in the @after to ensure we aren't leaving the .security index open * Switching the AuditTrailTests to use monitoring_user This way the test doesn't transiently load the .security index because it has application privileges and need to close the index when it's done * kibana_user can no longer create indexes, or index documents * Deleting unused imports * Assigning both index and application privileges * Fix line length * Fix bad merge * No longer adding privilege to actions when it has no actions * Putting test back how it was
Configuration menu - View commit details
-
Copy full SHA for 1c1240d - Browse repository at this point
Copy the full SHA 1c1240dView commit details -
Require that all app privileges have actions (#32272)
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).
Configuration menu - View commit details
-
Copy full SHA for 6087767 - Browse repository at this point
Copy the full SHA 6087767View commit details -
Support "source" parameter in _has_privileges (#32310)
The rest tests require that any request that supports GET with body must also support GET with source="..." This changes the _has_privileges rest action to support the source parameter as an alternative to reading a body
Configuration menu - View commit details
-
Copy full SHA for 32e4f62 - Browse repository at this point
Copy the full SHA 32e4f62View commit details -
Rename "policy" to "global" in role definition (#32324)
The "global" field stores cluster privileges that have a richer privilege model than the traditional "cluster" privileges. This commit renames the JSON field (in the API and security index) from "policy" to "global"
Configuration menu - View commit details
-
Copy full SHA for 8b14e2c - Browse repository at this point
Copy the full SHA 8b14e2cView commit details