# Turn on Anonymous access

**URL:** <https://discuss.elastic.co/t/turn-on-anonymous-access/285955>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [October 5, 2021, 5:37pm UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955 "2021-10-05T17:37:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 5, 2021, 5:37pm UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955/1 "2021-10-05T17:37:14Z")

</div>

I have been trying to turn on this anonymous access  
gone through many thread and list on how to do it. none of them seems working

I have 7.14.1  
basic license and user login is enable with just some role/spaces.

I created admin user with full access just for testing.

added following in to kibana.yml

```auto
xpack.security.authc.providers:
  basic.basic1:
    order: 0
  anonymous.anonymous1:
    order: 1
    credentials:
      username: "anonymous_service_account"
      password: "anonymous_service_account_password"

```

added following in to Elasticsearch.yml

```auto
xpack.security.authc:
  anonymous:
    username: anonymous_user
    roles: admin
    authz_exception: true

```

but it does not work. I can't login as anonymous user period.

Login prompt appears like this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/a/ea8a0b105a8ebbf6d5c22974dfea15fa28816ec0.png)

Then errors when I click on Continue as guest

```auto
Error: [security_exception: [security_exception] Reason: unable to authenticate user [anonymous_service_account] for REST request [/_security/_authenticate]]: unable to authenticate user [anonymous_service_account] for REST request [/_security/_authenticate]
    at login_form_LoginForm.loginWithSelector (http://houelkdev01:5601/42747/bundles/plugin/security/8.0.0/security.chunk.5.js:8:22273)

```

On some other thread I saw following and added that in kibana as well but no luck

Created user anonymous/anonymous and assign role=admin(which I have created for test)  
used this  
[https://github.com/elastic/kibana/pull/79985](https://github.com/elastic/kibana/pull/79985)

```auto
xpack.security.authc.providers:
  basic.basic1:
    order: 0
    description: "Log in as an Employee"
  anonymous.anonymous1:
    order: 1
    description: "Continue as guest"
    icon: "globe"
    credentials:
      username: "anonymous"
      password: "anonymous"

```

What do I have to do in order to turn this on?  
I want anonymous user which will be used via iframe just to display one or more dashboard.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [October 6, 2021, 6:49am UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955/2 "2021-10-06T06:49:28Z")

</div>

> [@elasticforme](#):
>
> ```auto
> xpack.security.authc.providers:
> basic.basic1:
> order: 0
> anonymous.anonymous1:
> order: 1
> credentials:
> username: "anonymous_service_account"
> password: "anonymous_service_account_password"
> 
> ```

Did you create the `anonymous_service_account` user in Elasticsearch?  
If you configure Kibana's anonymous access in this way, it needs to use a real username and password that is valid in Elasticsearch.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 6, 2021, 1:01pm UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955/3 "2021-10-06T13:01:47Z")

</div>

> [@elasticforme](#):
>
> `anonymous_service_account_password`

yes created that user but got error

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/5/35e0ebfbd4fa3432e9648ea532153714c72993c5.png)

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [October 12, 2021, 10:11pm UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955/4 "2021-10-12T22:11:38Z")

</div>

Anyone has any more clue?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 9, 2021, 10:11pm UTC](https://discuss.elastic.co/t/turn-on-anonymous-access/285955/5 "2021-11-09T22:11:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
