# Custom realm authentication with request/query params and not custom headers

**URL:** <https://discuss.elastic.co/t/custom-realm-authentication-with-request-query-params-and-not-custom-headers/99264>\
**Category:** Elasticsearch\
**Created:** [September 4, 2017, 9:28am UTC](https://discuss.elastic.co/t/custom-realm-authentication-with-request-query-params-and-not-custom-headers/99264 "2017-09-04T09:28:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumit\_monga](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@sumit\_monga](https://discuss.elastic.co/u/sumit_monga)\
**Post date:** [September 4, 2017, 9:28am UTC](https://discuss.elastic.co/t/custom-realm-authentication-with-request-query-params-and-not-custom-headers/99264/1 "2017-09-04T09:28:14Z")

</div>

Hi All,  
I have a webapp in Java which supports OAuth authentication and authorization. I want to use the same authentication mechanism in Elasticsearch. To achieve this, I used some custom headers such as **Tenant** and **AccessToken** and tested it and ES + Kibana worked well. The testing was done via modheader plugin in Chrome wherein I was passing the headers and tested the same. However now I want to integrate with my java webapp so that I can redirect from the webapp to Kibana passing the headers. Howevers this is not possible as suggested here [Redirection with custom headers](https://stackoverflow.com/questions/41523670/spring-mvc-redirect-with-custom-http-headers) . To do the same, is it possible to use request or query params for authentication in the custom realm instead of request headers ?

Thanks.

---

<div class="post-metadata">

**Author:** ![sumit\_monga](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@sumit\_monga](https://discuss.elastic.co/u/sumit_monga)\
**Post date:** [September 21, 2017, 2:37pm UTC](https://discuss.elastic.co/t/custom-realm-authentication-with-request-query-params-and-not-custom-headers/99264/2 "2017-09-21T14:37:34Z")

</div>

The full description of the issue and solution that I tried via nginx reverse proxy is asked here [Kibana redirection to login](https://stackoverflow.com/questions/46315924/redirection-to-login-page-though-necessary-authentication-details-present-in-req) . Any help is appreciated ..

---

<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:** [October 19, 2017, 2:38pm UTC](https://discuss.elastic.co/t/custom-realm-authentication-with-request-query-params-and-not-custom-headers/99264/3 "2017-10-19T14:38:18Z")

</div>

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