You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize FLS/DLS setup in IndicePermission authz (#77832) (#78297)
This change optimizes the creation and tracking of FieldPermissions
and DocumentLevelPermissions in IndiciesPermission.authorize so that
the method executes more quickly when dealing with large numbers of
indices that do not make use of FLS/DLS
The core of this change is a recognition that
1. Most usage of Elasticsearch does not rely on DLS/FLS and therefore
the FieldPermissions and DocumentLevelPermissions objects will be
the default/allow-all objects only.
2. In cases where DLS/FLS are used, most security configurations will
have a single set of DLS/FLS permissions per index
However, prior to this change the internal data structures were
optimized for cases where there were multiple FLS/DLS rules to merge
and apply. Performance for the overwhelming majority of use cases can
be improved by optimizing for the single-rule scenario and treating
the mergine of DLS/FLS rules as an exceptional case.
Co-authored-by: Tim Vernum <[email protected]>
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java
+37-12Lines changed: 37 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -312,21 +312,45 @@ public Map<String, IndicesAccessControl.IndexAccessControl> authorize(
312
312
if (actionCheck || bwcMappingActionCheck) {
313
313
// propagate DLS and FLS permissions over the concrete indices
0 commit comments