# What all credentials should be configured in metricbeat, and how, while working with secure elasticsearch having https and built in user roles?

**URL:** https://discuss.elastic.co/t/what-all-credentials-should-be-configured-in-metricbeat-and-how-while-working-with-secure-elasticsearch-having-https-and-built-in-user-roles/255947
**Category:** Beats
**Tags:** elastic-stack-security, metricbeat
**Created:** [November 19, 2020, 8:29am UTC](https://discuss.elastic.co/t/what-all-credentials-should-be-configured-in-metricbeat-and-how-while-working-with-secure-elasticsearch-having-https-and-built-in-user-roles/255947 "2020-11-19T08:29:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)
#### Post date: [November 19, 2020, 8:29am UTC](https://discuss.elastic.co/t/what-all-credentials-should-be-configured-in-metricbeat-and-how-while-working-with-secure-elasticsearch-having-https-and-built-in-user-roles/255947/1 "2020-11-19T08:29:41Z")

</div>

Hi,

I am using elastic stack 7.9. I have a 3 node elasticsearch cluster with https enabled using `http.p12` and I have configured kibana as well (but kibana still runs in http). I have set up credenatials for built-in users in elasticsearch (`elastic`, `apm_system`, `kibana_system`, `logstash_system`, `beats_system`, and `remote_monitoring_user`).

Now, inorder to set up metricbeat (including kibana dashboards), I set up the elasticsearch username and password using the below commands;

```
./metricbeat keystore create
./metricbeat keystore add output.elasticsearch.username
./metricbeat keystore add output.elasticsearch.password

```

I provided `beats_system` as the username, and then gave its password.  
**Question1:** Is this correct and right way?  
**Question2:** Since `beats_system` is a built-in user, should I explicitly mention as the username or will metricbeat automatically set is as default (so that I don't need to mention the username in keystore)

Then, I can see that there is another set of configurations;

```
setup.kibana.username
setup.kibana.password

```

**Question 3:** Should I add these entries to the keystore as well? If yes, is the username `beats_system`?

**Question 4:** Do i need to copy key files / any additional configuration is required?

Thank you.

---

<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: [December 17, 2020, 10:29am UTC](https://discuss.elastic.co/t/what-all-credentials-should-be-configured-in-metricbeat-and-how-while-working-with-secure-elasticsearch-having-https-and-built-in-user-roles/255947/2 "2020-12-17T10:29:53Z")

</div>

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