# How to store service account file into embedded ES keystore?

**URL:** <https://discuss.elastic.co/t/how-to-store-service-account-file-into-embedded-es-keystore/258956>\
**Category:** Elasticsearch\
**Created:** [December 17, 2020, 7:59am UTC](https://discuss.elastic.co/t/how-to-store-service-account-file-into-embedded-es-keystore/258956 "2020-12-17T07:59:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![balakrishnan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balakrishnan/32/81022_2.png) [@balakrishnan](https://discuss.elastic.co/u/balakrishnan)\
**Post date:** [December 17, 2020, 7:59am UTC](https://discuss.elastic.co/t/how-to-store-service-account-file-into-embedded-es-keystore/258956/1 "2020-12-17T07:59:54Z")

</div>

We are using embedded ES (version 5.6) and am exploring the _snapshot & restore_ options with **GCS** as snapshot repository. The repository-gcs plugin expects that the service account JSON file must be added into the _elasticsearch keystore_ .

ES doc explains the way to add service account JSON file through the CLI tool ( _bin/elasticsearch-keystore_ ), but I couldn't find this CLI tool since we are using embedded ES (added the ES jar into our lib).

Is it possible to add the service account programmatically to ES keystore?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 21, 2020, 3:13am UTC](https://discuss.elastic.co/t/how-to-store-service-account-file-into-embedded-es-keystore/258956/2 "2020-12-21T03:13:14Z")

</div>

We don't support 5.6 anymore sorry, nor do we support embedded instances.

I would suggest it is unlikely you will get a solution to this because of those points.

---

<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:** [January 18, 2021, 3:13am UTC](https://discuss.elastic.co/t/how-to-store-service-account-file-into-embedded-es-keystore/258956/3 "2021-01-18T03:13:21Z")

</div>

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