# Api\_key does not work behind reverse ssl proxy

**URL:** https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [October 28, 2021, 4:28pm UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945 "2021-10-28T16:28:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gkiesecker](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@gkiesecker](https://discuss.elastic.co/u/gkiesecker)
#### Post date: [October 28, 2021, 4:28pm UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945/1 "2021-10-28T16:28:15Z")

</div>

This is my first time using ELK stack, and I have found it very useful. I wanted to deploy it behind a reverse ssl proxy using nginx, and have most of the features working fine. However, I am unable to get the `xpack.security.authc.api_enabled: true` statement to work as I need to enable HTTPS on my ELK stack server (before the reverse proxy). Has anyone ever done this before, or is there a good work around? I am on ELK stack 7.15.  
Thank you!

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [October 28, 2021, 5:32pm UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945/2 "2021-10-28T17:32:40Z")

</div>

I do not think it is possible to use the API key without HTTPS enabled in Elasticsearch.

---

<div class="post-metadata">

### Author: ![gkiesecker](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@gkiesecker](https://discuss.elastic.co/u/gkiesecker)
#### Post date: [October 28, 2021, 6:37pm UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945/3 "2021-10-28T18:37:59Z")

</div>

Thank you for the reply. That makes sense overall for security, though I hope in the future they add a manual override so you can use it as a reverse proxy.

---

<div class="post-metadata">

### Author: ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)
#### Post date: [October 29, 2021, 12:08am UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945/4 "2021-10-29T00:08:08Z")

</div>

@gkiesecker This restriction is lifted in the incoming 7.16 release

> <https://github.com/elastic/elasticsearch/pull/78155>
>
> This commit removes the checks that prevented the use of API Keys and
> Service A…ccount (Service Tokens) on nodes without HTTPS
> (xpack.security.http.ssl.enabled)
> 
> The API Key service is only enabled by default if HTTPS is also enabled
> however it can be explicitly enabled (regardless of HTTPS) with
> 
> xpack.security.authc.api\_key.enabled: false
> 
> Backport of: #76801

---

<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 26, 2021, 12:08am UTC](https://discuss.elastic.co/t/api-key-does-not-work-behind-reverse-ssl-proxy/287945/5 "2021-11-26T00:08:16Z")

</div>

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