configuring-native-realm.asciidoc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. The native realm is available by default when no other realms are
  2. configured. If other realm settings have been configured in `elasticsearch.yml`,
  3. you must add the native realm to the realm chain.
  4. You can configure a `native` realm in the `xpack.security.authc.realms.native`
  5. namespace in `elasticsearch.yml`.
  6. Explicitly configuring a native realm enables you to set the order in which it
  7. appears in the realm chain, temporarily disable the realm, and control its
  8. cache options.
  9. . Add a realm configuration to `elasticsearch.yml` under the
  10. `xpack.security.authc.realms.native` namespace. It is recommended that you
  11. explicitly set the `order` attribute for the realm.
  12. +
  13. --
  14. See <<ref-native-settings>> for all of the options you can set for the `native` realm.
  15. For example, the following snippet shows a `native` realm configuration that
  16. sets the `order` to zero so the realm is checked first:
  17. [source, yaml]
  18. ------------------------------------------------------------
  19. xpack:
  20. security:
  21. authc:
  22. realms:
  23. native:
  24. native1:
  25. order: 0
  26. ------------------------------------------------------------
  27. NOTE: To limit exposure to credential theft and mitigate credential compromise,
  28. the native realm stores passwords and caches user credentials according to
  29. security best practices. By default, a hashed version of user credentials
  30. is stored in memory, using a salted `sha-256` hash algorithm and a hashed
  31. version of passwords is stored on disk salted and hashed with the `bcrypt`
  32. hash algorithm. To use different hash algorithms, see <<hashing-settings>>.
  33. --
  34. . Restart {es}.