# Secure browser to kibana

**URL:** <https://discuss.elastic.co/t/secure-browser-to-kibana/243593>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [August 3, 2020, 2:47pm UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593 "2020-08-03T14:47:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 3, 2020, 2:47pm UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/1 "2020-08-03T14:47:23Z")

</div>

I'm following this [documentation page](https://www.elastic.co/guide/en/kibana/7.8/configuring-tls.html#configuring-tls-browser-kib) for securing communications between the browser and kibana. I'm a little confused as the documentation suggests createing a `csr` while later in the line ( and in kibana.yml) it expects a `crt`: [https://i.imgur.com/8Dbdwnx.png](https://i.imgur.com/8Dbdwnx.png)

What I did is I ran this command:

```
 bin/elasticsearch-certutil csr -name kibana-server -dns elk.companyname.net

```

And in `kibana.yml` I added:

```
server.ssl.enabled: true
server.ssl.certificate: /usr/share/elasticsearch/kibana-server/kibana-server.csr
server.ssl.key: /usr/share/elasticsearch/kibana-server/kibana-server.key

Then: systemctl restart kibana

```

But in the browser when I enter `https://elk.companyname.net` or `https://elk.companyname.net:5601` it doesn't work, even though I made sure dns points correcntly.

Does anyone know what's wrong? Is it because of the csr/crt missmatch? Thanks ahead!

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [August 3, 2020, 9:51pm UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/2 "2020-08-03T21:51:41Z")

</div>

Hi @headtea. We have a detailed blog post for setting up security with Elasticsearch and Kibana which you might find useful.

> **[Elasticsearch Security: Configure TLS/SSL & PKI Authentication](https://www.elastic.co/blog/elasticsearch-security-configure-tls-ssl-pki-authentication)**
>
> Learn how to enable Elasticsearch security, configure TLS/SSL, use PKI for authentication, authenticate Kibana to an Elasticsearch cluster using PKI, and set passwords for built-in users.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 4, 2020, 11:11am UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/3 "2020-08-04T11:11:27Z")

</div>

Thank you for the response,

I've read it and couldn't find the part where kibana is secured because in the docs it says to enable `server.ssl.certificate` in `kibana.yml`.

I'm a little confused as it the command in the docs suggest:

`bin/elasticsearch-certutil csr -name kibana-server -dns some-website.com,www.some-website.com`

creates a .csr file while it seems like [it expects an .crt?](https://i.imgur.com/8Dbdwnx.png)

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 4, 2020, 1:19pm UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/4 "2020-08-04T13:19:43Z")

</div>

I've discovered that I need to create an `.crt` and `.key` from the new `.csr` I have. Only thing is, even after looking at the `elasticsearch-certutil` documentation I'm just not sure what parameters to use. All the files and clusters are located on one machine.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [August 5, 2020, 10:07am UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/5 "2020-08-05T10:07:27Z")

</div>

# EDIT: SOLVED:

Literally just took our company's `.crt` and `.key` from another server. scp'd it locally to a directory that is open for everyone, gave it 777 permissions, `chown`'d it to `kibana:kibana` and in `kibana.yml`:

```
server.ssl.enabled: true
server.ssl.certificate: /etc/elk/2020_companyname.crt
server.ssl.key: /etc/elk/wildcardcompanyname.key
```

---

<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 2, 2020, 10:07am UTC](https://discuss.elastic.co/t/secure-browser-to-kibana/243593/6 "2020-09-02T10:07:31Z")

</div>

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