# Dynamically expiring secret token on server and agents

**URL:** <https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670>\
**Category:** APM\
**Tags:** server\
**Created:** [September 30, 2019, 3:30pm UTC](https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670 "2019-09-30T15:30:36Z")\
**Posts on this page:** 4\
**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 30, 2019, 3:30pm UTC](https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670/1 "2019-09-30T15:30:37Z")

</div>

Are there any plans on making secret tokens dynamically expire and generate a new one? Or is it implemented? If so, can you provide links that I can read? Thank you.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [October 1, 2019, 7:18am UTC](https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670/2 "2019-10-01T07:18:37Z")

</div>

Hi @Nie,  
there is no support for auto-expiring and re-newing the secret token. This needs to be done manually.

There is a kind of related issue, that might be interesting for you. It discusses how to [integrate Elasticsearch API Keys](https://github.com/elastic/apm-server/issues/2338) into the communication between APM agents and server. When setting up ES API keys an optional _expiration_ date can be set.

---

<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:** [October 1, 2019, 3:49pm UTC](https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670/3 "2019-10-01T15:49:52Z")

</div>

Thank you!

---

<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 22, 2019, 11:49am UTC](https://discuss.elastic.co/t/dynamically-expiring-secret-token-on-server-and-agents/201670/4 "2019-10-22T11:49:52Z")

</div>

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