# Can't login with users created by FileRealm and secrets

**URL:** <https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [April 22, 2020, 4:58pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320 "2020-04-22T16:58:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![doctor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doctor/32/64648_2.png) [@doctor](https://discuss.elastic.co/u/doctor)\
**Post date:** [April 22, 2020, 4:58pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/1 "2020-04-22T16:58:35Z")

</div>

Hey,

I'm trying to create a new user on ECK using secrets and **FileRealm**.

1. I created the user like [explained in the documentation](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-users-and-roles.html):

```auto
# create a folder with the 2 files
mkdir filerealm
touch filerealm/users filerealm/users_roles

# create user 'myuser' with role 'monitoring_user'
docker run \
    -v ${PWD}/filerealm:/usr/share/elasticsearch/config \
    docker.elastic.co/elasticsearch/elasticsearch:{version} \
    bin/elasticsearch-users useradd myuser -p mypassword -r monitoring_user

# create a Kubernetes secret with the file realm content
kubectl create secret generic my-file-realm-secret --from-file filerealm

```

The user **"mysuser"** with password **"mypassword"** now exists inside a secret.

* * *

1. My elastic config looks like this:

```auto
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.6.1
  auth:
    fileRealm:
    - secretName: my-filerealm-secret
  nodeSets:
  - name: default
    count: 1
    config:
      node.master: true
      node.data: true
      node.ingest: true
      node.store.allow_mmap: false

```

**Unfortunatly, trying to loging with the credentials set above is not working.**  
I can't login within Kibana and curling elastic-http is also forbiden if using this particular user.

---

<div class="post-metadata">

**Author:** ![Anya\_Sabo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anya_sabo/32/49903_2.png) [@Anya\_Sabo](https://discuss.elastic.co/u/Anya_Sabo)\
**Post date:** [April 22, 2020, 5:34pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/2 "2020-04-22T17:34:59Z")

</div>

What version of ECK are you running? This is an unreleased feature at the moment, so you would need to be running a pre-release build for those docs to apply. You can click the link in the header at the top of the doc page you linked to make sure you are looking at the current documentation on the site.

---

<div class="post-metadata">

**Author:** ![doctor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doctor/32/64648_2.png) [@doctor](https://discuss.elastic.co/u/doctor)\
**Post date:** [April 23, 2020, 10:28am UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/3 "2020-04-23T10:28:29Z")

</div>

You're right ! This functionnality seems to be availble on version "1.1" and "master" only.

I have been using the eck version 1.0 which deploys elastic in version **7.6.1**.

As the "1.1" version deploys elastic **7.6.2** , I updated to 7.6.2 but its still isn't working.

FYI I still have 1.0.1 operator as the link used to download "all-in-one.yaml" for 1.1.0 returns 404.

So I'm still stuck... What should I be deploying if elastic 7.6.2 is not working either ?

Thanks in advance 😉

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [April 24, 2020, 8:38am UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/4 "2020-04-24T08:38:30Z")

</div>

As @Anya_Sabo said, this is an unreleased feature. You will have to wait until ECK 1.1 is released before you can use this feature.

You can find the latest release of ECK here: [https://www.elastic.co/downloads/elastic-cloud-kubernetes](https://www.elastic.co/downloads/elastic-cloud-kubernetes)

Because you mentioned it: the Elasticsearch version is not tied to the ECK version. We just update the examples in the repository to the latest Elastic stack version on each release. But they are just examples! So you can deploy Elasticsearch or other Elastic stack applications in version 7.6.2 with the already released versions of ECK. It will not give you access to unreleased features though.

---

<div class="post-metadata">

**Author:** ![doctor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doctor/32/64648_2.png) [@doctor](https://discuss.elastic.co/u/doctor)\
**Post date:** [April 27, 2020, 12:01pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/5 "2020-04-27T12:01:35Z")

</div>

Ok thanks, I get it.

I'll wait then... 😄

---

<div class="post-metadata">

**Author:** ![doctor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doctor/32/64648_2.png) [@doctor](https://discuss.elastic.co/u/doctor)\
**Post date:** [April 29, 2020, 5:18pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/6 "2020-04-29T17:18:25Z")

</div>

ECK 1.1 just got released. Creating users from secrets works great with elasticsearch !

Though I still have a question which you may help me ? 😅

The accounts I made don't work with Kibana... **How should I created default users for Kibana as I did for elastic ?**

Thx

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [April 30, 2020, 11:57am UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/7 "2020-04-30T11:57:05Z")

</div>

Kibana relies on the Elasticsearch authentication realms.  
Any user you create for Elasticsearch can also be used with Kibana, as long as it has the right role (`kibana_admin`).

---

<div class="post-metadata">

**Author:** ![doctor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/doctor/32/64648_2.png) [@doctor](https://discuss.elastic.co/u/doctor)\
**Post date:** [April 30, 2020, 2:31pm UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/8 "2020-04-30T14:31:41Z")

</div>

ah ! Its working. Thx a lot.

---

<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 4, 2022, 7:55am UTC](https://discuss.elastic.co/t/cant-login-with-users-created-by-filerealm-and-secrets/229320/9 "2022-11-04T07:55:06Z")

</div>


