# Enabled JWT Authentication for Opensearch

**URL:** <https://forum.opensearch.org/t/enabled-jwt-authentication-for-opensearch/13345>\
**Category:** Security\
**Created:** [March 17, 2023, 3:40pm UTC](https://forum.opensearch.org/t/enabled-jwt-authentication-for-opensearch/13345 "2023-03-17T15:40:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Bindu](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@Bindu](https://forum.opensearch.org/u/Bindu)\
**Post date:** [March 21, 2023, 5:15am UTC](https://forum.opensearch.org/t/enabled-jwt-authentication-for-opensearch/13345/6 "2023-03-21T05:15:37Z")

</div>

Hi @pablo

The below Topics are inter-related with each other.

> [@Embed OpenSearch dashboards without login page](https://forum.opensearch.org/t/embed-opensearch-dashboards-without-login-page/13100/11):
>
> Hi @pablo I have configured the above parameters in Opensearch\_dashboard.yml, roles.yml and roles\_mapping.yml. I have restarted Opensearch and Opensearch Dashboards and seeing the below message: It is redirecting to the login page.

> [@Issue with OpenSearch dashboard TLS Configuration](https://forum.opensearch.org/t/issue-with-opensearch-dashboard-tls-configuration/13015/9):
>
> I assume this is a mistake and your config files are in the config folder for both OS and OSD, is that correct?

We want display embedded Opensearch Dashboards within an iframe in our website. The iframe tag should be ssl enabled, hence we tried creating certs and followed the official documentation to configure TLS. However, the iframe was redirecting to Login page, to bypass that we enabled **anonymous\_auth** , and enabled JWT Authentication to pass the token in the URL, which resolved the issue. But **anonymous\_auth** doesn’t have required privileges to create index, dashboard or anything. I tried mapping the backend role to **admin** as well, which is again giving errors.

Kindly help.

---

_[View the full topic](https://forum.opensearch.org/t/enabled-jwt-authentication-for-opensearch/13345)._
