limitations.asciidoc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. [role="xpack"]
  2. [[security-limitations]]
  3. == Security limitations
  4. [subs="attributes"]
  5. ++++
  6. <titleabbrev>Limitations</titleabbrev>
  7. ++++
  8. [discrete]
  9. === Plugins
  10. {es}'s plugin infrastructure is extremely flexible in terms of what can
  11. be extended. While it opens up {es} to a wide variety of (often custom)
  12. additional functionality, when it comes to security, this high extensibility level
  13. comes at a cost. We have no control over the third-party plugins' code (open
  14. source or not) and therefore we cannot guarantee their compliance with
  15. {stack-security-features}. For this reason, third-party plugins are not
  16. officially supported on clusters with {security-features} enabled.
  17. [discrete]
  18. === Changes in wildcard behavior
  19. {es} clusters with the {security-features} enabled apply `_all` and other
  20. wildcards to data streams, indices, and aliases the current user has privileges
  21. for, not all data streams, indices, and aliases on the cluster.
  22. [discrete]
  23. === Multi document APIs
  24. Multi get and multi term vectors API throw IndexNotFoundException when trying to access non existing indices that the user is
  25. not authorized for. By doing that they leak information regarding the fact that the data stream or index doesn't exist, while the user is not
  26. authorized to know anything about those data streams or indices.
  27. [discrete]
  28. === Filtered index aliases
  29. Aliases containing filters are not a secure way to restrict access to individual
  30. documents, due to the limitations described in
  31. <<alias-limitations, Index and field names can be leaked when using aliases>>.
  32. The {stack-security-features} provide a secure way to restrict access to
  33. documents through the
  34. <<field-and-document-access-control, document-level security>> feature.
  35. [discrete]
  36. [[field-document-limitations]]
  37. === Field and document level security limitations
  38. When a user's role enables document or <<field-level-security,field level security>> for a data stream or index:
  39. * The user cannot perform write operations:
  40. ** The update API isn't supported.
  41. ** Update requests included in bulk requests aren't supported.
  42. * The user cannot perform operations that effectively make contents accessible
  43. under another name, including actions from the following APIs:
  44. ** <<indices-clone-index,Clone index API>>
  45. ** <<indices-shrink-index,Shrink index API>>
  46. ** <<indices-split-index,Split index API>>
  47. ** <<indices-aliases,Aliases API>>
  48. * The request cache is disabled for search requests if either of the following are true:
  49. ** The role query that defines document level security is <<templating-role-query,templated>>
  50. using a <<script-stored-scripts,stored script>>.
  51. ** The target indices are a mix of local and remote indices.
  52. When a user's role enables <<document-level-security,document level security>> for a data stream or index:
  53. * Document level security doesn't affect global index statistics that relevancy
  54. scoring uses. This means that scores are computed without taking the role
  55. query into account. Documents that don't match the role query are
  56. never returned.
  57. * The `has_child` and `has_parent` queries aren't supported as query parameters
  58. in the role definition. The `has_child` and `has_parent` queries can be used in
  59. the search API with document level security enabled.
  60. * <<date-math,Date math>> expressions cannot contain `now` in <<ranges-on-dates,range queries with date fields>>
  61. * Any query that makes remote calls to fetch query data isn't supported,
  62. including the following queries:
  63. ** `terms` query with terms lookup
  64. ** `geo_shape` query with indexed shapes
  65. ** `percolate` query
  66. * If suggesters are specified and document level security is enabled, the specified suggesters are ignored.
  67. * A search request cannot be profiled if document level security is enabled.
  68. * The <<search-terms-enum,terms enum API>> does not return terms if document
  69. level security is enabled.
  70. * The <<query-dsl-multi-match-query, `multi_match`>> query does not support specifying fields using wildcards.
  71. NOTE: While document-level security prevents users from viewing restricted documents,
  72. it's still possible to write search requests that return aggregate information about the
  73. entire index. A user whose access is restricted to specific documents in an index could
  74. still learn about field names and terms that only exist in inaccessible
  75. documents, and count how many inaccessible documents contain a given term.
  76. [discrete]
  77. [[alias-limitations]]
  78. === Index and field names can be leaked when using aliases
  79. Calling certain {es} APIs on an alias can potentially leak information
  80. about indices that the user isn't authorized to access. For example, when you get
  81. the mappings for an alias with the `_mapping` API, the response includes the
  82. index name and mappings for each index that the alias applies to.
  83. Until this limitation is addressed, avoid index and field names that contain
  84. confidential or sensitive information.
  85. [discrete]
  86. === LDAP realm
  87. The <<ldap-realm, LDAP Realm>> does not currently support the discovery of nested
  88. LDAP Groups. For example, if a user is a member of `group_1` and `group_1` is a
  89. member of `group_2`, only `group_1` will be discovered. However, the
  90. <<active-directory-realm, Active Directory Realm>> *does* support transitive
  91. group membership.
  92. [discrete]
  93. [[can-access-resources-check]]
  94. === Resource sharing check for users and API keys
  95. The result of <<async-search,async search>> and <<scroll-api,scroll>> requests can be retrieved later
  96. by the same user or API key that submitted the initial request. The verification process involves comparing
  97. the username, authentication realm type, and (for realms other than file or native) realm name.
  98. If you used an API key to submit the request, only that key can retrieve the results.
  99. This logic also has a few limitations:
  100. * Two different realms can have the same name on different nodes. This is not a
  101. recommended way to configure realms, therefore the resource sharing check
  102. does not attempt to detect this inconsistency.
  103. * Realms can be renamed. This can cause inconsistency for the resource sharing check
  104. when you submit an async search or scroll then rename the realm and try to retrieve the results.
  105. Hence, changing realm names should be handled with care since it can cause complications for more than
  106. just the resource sharing check.
  107. * The username is dynamically computed for realms backed by certain external authentication
  108. providers. For example, the username can be derived from part of the DN in an LDAP realm.
  109. It is in theory possible that two distinct users from the external system get
  110. mapped to the same username. Our recommendation is to avoid this situation in the first place.
  111. Hence, the resource sharing check does not account for this potential discrepancy.