# How to share dashboard for others without login after enable xpack.security

**URL:** <https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124>\
**Category:** Kibana\
**Created:** [July 18, 2019, 4:26am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124 "2019-07-18T04:26:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [July 18, 2019, 4:26am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/1 "2019-07-18T04:26:37Z")

</div>

After enbale expack.secuiry, all of users should be login if they are want to discover, dashboard..etc.

If i want to share a dashboard and embed the dashboard to other web site, how i can do it ?

Another question, is there any way to let user without login to access discover and dashboard ?

Thanks  
Wayne

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [July 18, 2019, 5:02pm UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/2 "2019-07-18T17:02:50Z")

</div>

You can allow this by using the anonymous access feature: [https://www.elastic.co/guide/en/elastic-stack-overview/current/anonymous-access.html](https://www.elastic.co/guide/en/elastic-stack-overview/current/anonymous-access.html)

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [July 23, 2019, 9:56am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/3 "2019-07-23T09:56:02Z")

</div>

@Marius_Dragomir Thanks for your response, anonymouse-access seem only for elasticsearch, is it possible to used in kibana ? I enable the xpack.security, but i don't want to all of users must login kibana every time, for example, if one user only search one data from discover, I think it's no need to login, if one use want to embed a dashboard in other web page, no need to login too.

Thanks  
Wayne

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [July 23, 2019, 9:57am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/4 "2019-07-23T09:57:02Z")

</div>

I use the latest version 7.2, this version included the permission control for menus

---

<div class="post-metadata">

**Author:** ![Saurabh\_Sharma\_IIT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saurabh_sharma_iit/32/48921_2.png) [@Saurabh\_Sharma\_IIT](https://discuss.elastic.co/u/Saurabh_Sharma_IIT)\
**Post date:** [July 25, 2019, 11:16am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/5 "2019-07-25T11:16:58Z")

</div>

Hi Wayne,

I also faced the same issue and I search possible solution to it. As a result of my research I found that currently you cann't do that i.e. with security is enabled in kibana then you will always prompt with a login page.  
this is an open issue currently. I found a possible workaround to it and in my case which is very similar to yours, it is working perfectly fine.

That time, thinking that it can be helpful to others I documented the approach, you can follow it to have access to discover without login, i.e. anonymous access to kibana.

> **[Anonymous access to kibana dashboard using nginx: a possible workaround](https://medium.com/@saurabhiiti123/anonymous-access-to-kibana-dashboard-using-nginx-a-workaround-a1896b44c4c8)**
>
> Hi, I am Saurabh, undergraduate student at IIT Indore, India. In this tutorial I will share how to enable anonymous access to kibana…

Hope this helps  
Saurabh 🙂

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [July 30, 2019, 8:13am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/6 "2019-07-30T08:13:37Z")

</div>

> [@Saurabh\_Sharma\_IIT](#):
>
> e this helps  
> Saurabh 🙂

Thanks so much @Saurabh_Sharma_IIT

I will follow up your provide the document to try it

thanks  
Wayne

---

<div class="post-metadata">

**Author:** ![Saurabh\_Sharma\_IIT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saurabh_sharma_iit/32/48921_2.png) [@Saurabh\_Sharma\_IIT](https://discuss.elastic.co/u/Saurabh_Sharma_IIT)\
**Post date:** [July 31, 2019, 12:00pm UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/7 "2019-07-31T12:00:07Z")

</div>

@wenchaodu Hi, I read your message on medium. Can you please provide what error you are getting when you try to access localhost:80.

I will be able to help better once you can provide the error log. For now I would say that, I found that you have: set proxy\_pass [https:// **{my severs ip address}** :5601/](https://10.255.58.134:5601/?source=post_page---------------------------);

https and not http that means that you have encryption between your web browser and kibana server. If you have not set any encryption between them, then  
SIMPLY change https to http i.e. remove s and I think it should work.

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [August 6, 2019, 11:08am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/8 "2019-08-06T11:08:54Z")

</div>

@Saurabh_Sharma_IIT

After I change https to http, it's return 502 bad getway , is there anything else need change ?

Beside, I use basic Authorization success with postman, maybe that mean that all of right on elasticsearch/kibana.

```
2019/08/06 06:05:27 [warn] 20846#20846: *13 upstream server temporarily disabled while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "localhost:8080"
2019/08/06 06:05:27 [crit] 20846#20846: *13 connect() to 127.0.0.1:5601 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "localhost:8080"
2019/08/06 06:05:27 [warn] 20846#20846: *13 upstream server temporarily disabled while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5601/", host: "localhost:8080"

```

Below is the full config

```
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log /var/log/nginx/access.log main;

    sendfile on;
    #tcp_nopush on;

    keepalive_timeout 65;
	
	server {
		listen 8080;
		server_name localhost;
	
	
		location / {
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
			proxy_pass http://localhost:5601/;
			proxy_set_header Authorization "Basic ZWxhc3RpYzplbGFzdGlj"; 
			proxy_pass_header Authorization;

		}
		
	}
	include /etc/nginx/conf.d/*.conf;
}
```

---

<div class="post-metadata">

**Author:** ![wenchaodu](https://avatars.discourse-cdn.com/v4/letter/w/73ab20/32.png) [@wenchaodu](https://discuss.elastic.co/u/wenchaodu)\
**Post date:** [August 7, 2019, 1:47am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/9 "2019-08-07T01:47:50Z")

</div>

This issue resolved, the nginx configuration is correct, that linux system related issue.

resolved by below command  
setsebool -P httpd\_can\_network\_connect 1

Thanks @Saurabh_Sharma_IIT a lots.

---

<div class="post-metadata">

**Author:** ![Saurabh\_Sharma\_IIT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saurabh_sharma_iit/32/48921_2.png) [@Saurabh\_Sharma\_IIT](https://discuss.elastic.co/u/Saurabh_Sharma_IIT)\
**Post date:** [August 7, 2019, 5:54am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/10 "2019-08-07T05:54:30Z")

</div>

Hi @wenchaodu, Happy to know that it helps you.

Please mark solution also, so that if someone else has same issue, they know that this solution works for you.

please clap on medium post also if you find the post helpful. 😅😅😅 😄😇

---

<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:** [September 4, 2019, 5:54am UTC](https://discuss.elastic.co/t/how-to-share-dashboard-for-others-without-login-after-enable-xpack-security/191124/11 "2019-09-04T05:54:39Z")

</div>

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