# Tenant selection not maintained for user

**URL:** <https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113>\
**Category:** Search Guard\
**Created:** [March 1, 2021, 11:44am UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113 "2021-03-01T11:44:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumaravel29](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/kumaravel29/32/714_2.png) [@kumaravel29](https://forum.search-guard.com/u/kumaravel29)\
**Post date:** [March 1, 2021, 11:44am UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113/1 "2021-03-01T11:44:03Z")

</div>

**Elasticsearch version:** - 7.10.1

**Kibana version (if relevant):** - 7.10.1

**Searchguard Version** - search-guard-suite-plugin-7.10.1-48.0.0.zip

**Describe the issue:** - We have recently upgraded the Elasticsearch cluster from version 7.2.1 to 7.10.1.  
After the upgrade, we have noticed that the tenant selection is lost after new session and the Global tenant is selected for the user.

**Steps to reproduce:**

1. Login to Kibana, select the tenant “TEANT\_1” from the multitenancy section.
2. Logout or close the browser session, and try to access kibana.
3. The Global tenant is selected instead of the tenant “TENANT\_1”

**Expected behavior:** - The tenant selection for a user should be maintained even when user accesses kibana in a new session

---

<div class="post-metadata">

**Author:** ![srgbnd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/srgbnd/32/506_2.png) [@srgbnd](https://forum.search-guard.com/u/srgbnd)\
**Post date:** [March 1, 2021, 1:56pm UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113/2 "2021-03-01T13:56:36Z")

</div>

Hi. Please show your kibana.yml. Don’t forget to obfuscate the credentials.

---

<div class="post-metadata">

**Author:** ![kumaravel29](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/kumaravel29/32/714_2.png) [@kumaravel29](https://forum.search-guard.com/u/kumaravel29)\
**Post date:** [March 1, 2021, 2:40pm UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113/3 "2021-03-01T14:40:05Z")

</div>

Please find below the kibana.yml

```auto
# Default Kibana configuration for docker target
server.name: ${HOSTNAME}
server.host: "0"
server.basePath: "/kibana"
server.rewriteBasePath: true
xpack.monitoring.ui.container.elasticsearch.enabled: true
xpack.security.enabled: false
xpack.ml.enabled: true

# Use HTTPS instead of HTTP
elasticsearch.hosts:
      - https://<server1>:9200
      - https://<server2>:9200
      - https://<server3>:9200

# Configure the Kibana internal server user
elasticsearch.ssl.certificate: /tech/cert/kibanaserver.pem
elasticsearch.ssl.key: /tech/cert/kibanaserver.key
elasticsearch.ssl.certificateAuthorities: /tech/cert/root.ca

elasticsearch.ssl.verificationMode: full
elasticsearch.username: "kibanaserver"
searchguard.allow_client_certificates: true
elasticsearch.ssl.alwaysPresentCertificate: true

# To handle the timeouts in Kibana
elasticsearch.requestTimeout: 120000

# Whitelist the Search Guard Multi Tenancy Header
elasticsearch.requestHeadersWhitelist: ["Authorization", "sgtenant", "x-forwarded-for", "x-proxy-user", "x-proxy-roles"]
searchguard.multitenancy.enabled: true

searchguard.auth.type: "proxy"

```

We are using the remote cluster search functionality and the above configuration is from the kibana connected to the federation ES cluster

---

<div class="post-metadata">

**Author:** ![srgbnd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/srgbnd/32/506_2.png) [@srgbnd](https://forum.search-guard.com/u/srgbnd)\
**Post date:** [March 1, 2021, 3:35pm UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113/4 "2021-03-01T15:35:54Z")

</div>

It is a bug, here is the issue for it: [The tenant selection is not preserved between the sessions (#341) · Issues · search-guard / Search Guard Kibana Plugin · GitLab](https://git.floragunn.com/search-guard/search-guard-kibana-plugin/-/issues/341)  
I’ll ping you when it is fixed.

---

<div class="post-metadata">

**Author:** ![kumaravel29](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/kumaravel29/32/714_2.png) [@kumaravel29](https://forum.search-guard.com/u/kumaravel29)\
**Post date:** [March 1, 2021, 3:39pm UTC](https://forum.search-guard.com/t/tenant-selection-not-maintained-for-user/2113/5 "2021-03-01T15:39:04Z")

</div>

Thank you for checking. I will wait for an update on this.
