anonymous-access.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. [role="xpack"]
  2. [[anonymous-access]]
  3. === Enabling anonymous access
  4. TIP: To embed {kib} dashboards or grant access to {kib} without requiring
  5. credentials, use {kib}'s
  6. {kibana-ref}/kibana-authentication.html#anonymous-authentication[anonymous
  7. authentication] feature instead.
  8. Incoming requests are considered to be _anonymous_ if no authentication token
  9. can be extracted from the incoming request. By default, anonymous requests are rejected and an authentication error is returned (status code `401`).
  10. To enable anonymous access, you assign one or more roles to anonymous
  11. users in the `elasticsearch.yml` configuration file. For example, the following
  12. configuration assigns anonymous users `role1` and `role2`:
  13. [source,yaml]
  14. ----------------------------------------
  15. xpack.security.authc:
  16. anonymous:
  17. username: anonymous_user <1>
  18. roles: role1, role2 <2>
  19. authz_exception: true <3>
  20. ----------------------------------------
  21. <1> The username/principal of the anonymous user. Defaults to
  22. `_es_anonymous_user` if not specified.
  23. <2> The roles to associate with the anonymous user. If no roles are specified, anonymous access is disabled--anonymous requests will be rejected and return an authentication error.
  24. <3> When `true`, a 403 HTTP status code is returned if the anonymous user
  25. does not have the permissions needed to perform the requested action and the
  26. user will NOT be prompted to provide credentials to access the requested
  27. resource. When `false`, a 401 HTTP status code is returned if the anonymous user
  28. does not have the necessary permissions and the user is prompted for
  29. credentials to access the requested resource. If you are using anonymous access
  30. in combination with HTTP, you might need to set `authz_exception` to `false`
  31. if your client does not support preemptive basic authentication. Defaults to
  32. `true`.