# JWT Authentication

**URL:** <https://discuss.elastic.co/t/jwt-authentication/366409>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 11, 2024, 12:29pm UTC](https://discuss.elastic.co/t/jwt-authentication/366409 "2024-09-11T12:29:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lehu](https://avatars.discourse-cdn.com/v4/letter/l/ac8455/32.png) [@lehu](https://discuss.elastic.co/u/lehu)\
**Post date:** [September 11, 2024, 12:29pm UTC](https://discuss.elastic.co/t/jwt-authentication/366409/1 "2024-09-11T12:29:52Z")

</div>

I really want to setup JWT authentication for my Elastic Cloud instance so that one of my applications, which gets a jwt token assigned, can use that token to log data to Elastic.

And I used the example from the documentation:

xpack.security.authc.realms.jwt.jwt1:  
order: 3  
token\_type: id\_token  
client\_authentication.type: shared\_secret  
allowed\_issuer: "[https://issuer.example.com/jwt/](https://issuer.example.com/jwt/)"  
allowed\_audiences: ["8fb85eba-979c-496c-8ae2-a57fde3f12d0"]  
allowed\_signature\_algorithms: [RS256,HS256]  
pkc\_jwkset\_path: jwt/jwkset.json  
claims.principal: sub

But when I try to redeploy I always get the following error: Some instances were unable to start properly

And I really dont know why. If anyone could provide some help I would be very thankful.
