# Kibana authentication through script- saved object install and authenticate

**URL:** https://discuss.elastic.co/t/kibana-authentication-through-script-saved-object-install-and-authenticate/340620
**Category:** Kibana
**Created:** [August 11, 2023, 7:21am UTC](https://discuss.elastic.co/t/kibana-authentication-through-script-saved-object-install-and-authenticate/340620 "2023-08-11T07:21:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)
#### Post date: [August 11, 2023, 7:21am UTC](https://discuss.elastic.co/t/kibana-authentication-through-script-saved-object-install-and-authenticate/340620/1 "2023-08-11T07:21:53Z")

</div>

Hello All,

-- Question is in context of automatic (through script) installation of kibana software.  
-- We have enabled basic authentication for kibana and also enabled anonymous.  
-- and we need to import SavedObjects immediately after installation of kibana.  
-- To import savedObject, we need to pass apikey in the header (Authorization) for http request.  
-- Will the APIKey remains unchanged (from last installation), when we do fresh (from scratch) installation of kibana?

---

<div class="post-metadata">

### Author: ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)
#### Post date: [August 14, 2023, 10:02am UTC](https://discuss.elastic.co/t/kibana-authentication-through-script-saved-object-install-and-authenticate/340620/2 "2023-08-14T10:02:40Z")

</div>

> [@PRASHANT\_MEHTA](#):
>
> -- Will the APIKey remains unchanged (from last installation), when we do fresh (from scratch) installation of kibana?

[API keys](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html) are stored in Elasticsearch index. So, if you don't delete/re-use the Elasticsearch data then API key should stay valid.

---

<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: [September 11, 2023, 10:02am UTC](https://discuss.elastic.co/t/kibana-authentication-through-script-saved-object-install-and-authenticate/340620/3 "2023-09-11T10:02:53Z")

</div>

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