# Secret tokens for frontend webapp and backend applications

**URL:** <https://discuss.elastic.co/t/secret-tokens-for-frontend-webapp-and-backend-applications/201504>\
**Category:** APM\
**Tags:** rum\
**Created:** [September 28, 2019, 6:58pm UTC](https://discuss.elastic.co/t/secret-tokens-for-frontend-webapp-and-backend-applications/201504 "2019-09-28T18:58:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nie/32/55307_2.png) [@Nie](https://discuss.elastic.co/u/Nie)\
**Post date:** [September 28, 2019, 6:58pm UTC](https://discuss.elastic.co/t/secret-tokens-for-frontend-webapp-and-backend-applications/201504/1 "2019-09-28T18:58:00Z")

</div>

I read the documentation about secret tokens in APM. It looks like we can only set a single token on the APM server. If the secret\_token in apm-server.yml has been enabled, it means that all agents will have to be configured with that same token. On javascript applications, it's a waste to set the token since users can open the javascript file and read the code. I didn't want to put the token in the frontend to prevent giving an idea about our APM server. How should we set it up in such a way that frontend applications don't have to set token while our backend application can use the token?

---

<div class="post-metadata">

**Author:** ![Nie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nie/32/55307_2.png) [@Nie](https://discuss.elastic.co/u/Nie)\
**Post date:** [September 28, 2019, 11:21pm UTC](https://discuss.elastic.co/t/secret-tokens-for-frontend-webapp-and-backend-applications/201504/2 "2019-09-28T23:21:03Z")

</div>

Found out secret\_token is not needed by RUM. There was no need to modify Nginx and override Authorization bearer.

---

<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, 2019, 7:21pm UTC](https://discuss.elastic.co/t/secret-tokens-for-frontend-webapp-and-backend-applications/201504/3 "2019-10-19T19:21:04Z")

</div>

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