# JWT Support in Beats

**URL:** <https://discuss.elastic.co/t/jwt-support-in-beats/254825>\
**Category:** Beats\
**Tags:** beats-development, filebeat, libbeat\
**Created:** [November 9, 2020, 9:59pm UTC](https://discuss.elastic.co/t/jwt-support-in-beats/254825 "2020-11-09T21:59:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cchandak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cchandak/32/78706_2.png) [@cchandak](https://discuss.elastic.co/u/cchandak)\
**Post date:** [November 9, 2020, 9:59pm UTC](https://discuss.elastic.co/t/jwt-support-in-beats/254825/1 "2020-11-09T21:59:09Z")

</div>

I would like to scrape logs using Beats (either Filebeat, Metricbeat, etc.) and send them to Logstash or Kafka depending on my use case. Currently, I am leveraging the SSL support, but I would like to use JSON Web Token instead; i.e., the beats should talk to an Authorization server, receive a JWT and then pass it as part of the Auth header bearer token schema when writing logs to an output sink which then validates the JWT.

Is this feature available/being worked on? If not, I would like to contribute, and was hoping if someone could give me pointers on where to start? I also think I would need to implement this in the `libbeat/common/transport` directory just like TLS/SSL?

NOTE: I am completely new to the Beats code base, even though I've used beats quite a bit.

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [November 10, 2020, 7:50am UTC](https://discuss.elastic.co/t/jwt-support-in-beats/254825/2 "2020-11-10T07:50:34Z")

</div>

I think you might be interested in API key: [https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#\_api\_key\_2](https://www.elastic.co/guide/en/beats/filebeat/current/elasticsearch-output.html#_api_key_2)

---

<div class="post-metadata">

**Author:** ![cchandak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cchandak/32/78706_2.png) [@cchandak](https://discuss.elastic.co/u/cchandak)\
**Post date:** [November 12, 2020, 9:38pm UTC](https://discuss.elastic.co/t/jwt-support-in-beats/254825/3 "2020-11-12T21:38:32Z")

</div>

@mtojek, thanks for responding! But I am specifically looking to integrate JWT in concert with OAuth for my use case (because of needing different ACLs/scopes for operations and data, and also the requirement for making the tokens ephemeral with some expiration policy). Any pointers on how I can start on that? OK to open a feature request on the GitHub repo?

---

<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:** [December 10, 2020, 11:38pm UTC](https://discuss.elastic.co/t/jwt-support-in-beats/254825/4 "2020-12-10T23:38:35Z")

</div>

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