configure-operator-privileges.asciidoc 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [role="xpack"]
  2. [testenv="enterprise"]
  3. [[configure-operator-privileges]]
  4. === Configure operator privileges
  5. include::operator-privileges-designed-for-note.asciidoc[]
  6. Before you can use operator privileges, you must
  7. <<enable-operator-privileges, enable the feature>> on all nodes in the cluster
  8. and <<designate-operator-users,designate operator users>>.
  9. [[enable-operator-privileges]]
  10. ==== Enable operator privileges
  11. In order to use the operator privileges feature, it must be enabled explicitly
  12. on each node in the cluster. Add the following setting in each
  13. `elasticsearch.yml` file:
  14. [source,yaml]
  15. ----------------------------
  16. xpack.security.operator_privileges.enabled: true
  17. ----------------------------
  18. If the node is already running before you make this change, you must restart
  19. the node for the feature to take effect.
  20. WARNING: The feature needs to be either enabled or disabled consistently across
  21. all nodes in a cluster. Otherwise, you can get inconsistent behaviour depending
  22. on which node first receives a request and which node executes it.
  23. When operator privileges are enabled on a cluster,
  24. <<operator-only-functionality,specific functionalities>> are restricted and can
  25. be executed only by users who have been explicitly designated as operator users.
  26. If a regular user attempts to execute these functionalities (even if they have
  27. the `superuser` role), a security exception occurs.
  28. [[designate-operator-users]]
  29. ==== Designate operator users
  30. Operator users are just normal {es} users with special rights to perform
  31. operator-only functionalities. They are specified in an `operator_users.yml`
  32. file, which is located in the config directory (as defined by the `ES_PATH_CONF`
  33. environment variable). Similar to
  34. <<file-realm-configuration,other security config files>>, the
  35. `operator_users.yml` file is local to a node and does not apply globally to the
  36. cluster. This means, in most cases, the same file should be distributed or
  37. copied to all nodes in a cluster.
  38. The `operator_users.yml` file defines a set of criteria that an authenticating
  39. user must match to be considered as an operator user. The following snippet
  40. shows an example of such a file:
  41. [source,yaml]
  42. -----------------------------------
  43. operator: <1>
  44. - usernames: ["system_agent_1","system_agent_2"] <2>
  45. realm_type: "file" <3>
  46. auth_type: "realm" <4>
  47. -----------------------------------
  48. <1> A fixed value of `operator` signals the beginning of the definition.
  49. <2> A list of user names allowed for operator users. This field is mandatory.
  50. <3> The type of the authenticating realm allowed for operator users. The default
  51. and only acceptable value is <<file-realm,`file`>>.
  52. <4> The authentication type allowed for operator users. The default and only
  53. acceptable value is `realm`.
  54. You must specify at least the `usernames` field. If no other fields are
  55. specified, their default values are used. All fields must be matched for a user
  56. to be qualified as an operator user. You can also specify multiple groups of
  57. criteria. This is currently not very useful since this feature does not yet
  58. support other realms or authentication types.
  59. There are also two implicit rules that affect which users are operator users:
  60. 1. If the authenticating user <<run-as-privilege,runs as>> another user, neither
  61. of them are considered to be operator users.
  62. 2. All <<internal-users>> are implicitly operator users.
  63. IMPORTANT: After a user is designated as an operator user, they are still
  64. subject to regular <<authorization,RBAC user authorization>> checks. That is to
  65. say, in addition to specifying that a user is an operator user, you must also
  66. grant them the necessary {es} roles to perform their tasks. Consequently, it is
  67. entirely possible that an operator user can encounter an "access denied" error
  68. and fail to perform certain actions due to RBAC check failures. In short, an
  69. operator user is *not* automatically a `superuser`.