# Fetch OpenID client\_secret from Vault Service

**URL:** <https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179>\
**Category:** Security\
**Tags:** configure\
**Created:** [July 8, 2024, 6:09am UTC](https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179 "2024-07-08T06:09:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanika](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@Kanika](https://forum.opensearch.org/u/Kanika)\
**Post date:** [July 8, 2024, 6:09am UTC](https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179/1 "2024-07-08T06:09:10Z")

</div>

Hi, we are in the process of integrating OpenID to connect our OpenSearch cluster with an identity provider. To facilitate this integration within the security dashboard, it is necessary to configure the `client_secret` in the `opensearch_dashboard.yaml` file. However, as this secret pertains to the client’s application, we are concerned about storing it in plain text within the YAML file.

To enhance security, we are considering retrieving the `client_secret` from a vault service instead of storing it directly in the configuration file. Could you please advise if integrating with the vault service is the recommended approach, or if there are alternative solutions that would better suit our requirements?

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [July 8, 2024, 11:04am UTC](https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179/2 "2024-07-08T11:04:33Z")

</div>

Hi @Kanika,

Have you considered using env variables?

Something like per:

> [@Using environmental variables in Open Distro security plugin configuration](https://forum.opensearch.org/t/using-environmental-variables-in-open-distro-security-plugin-configuration/1193/2):
>
> You have to execute securityadmin.sh with the parameter --resolve-env-vars and change config.yml to ... bind\_dn: ${env.LDAP\_BIND\_DN} password: ${env.LDAP\_BIND\_PASSWORD} ...

Best,  
mj

---

<div class="post-metadata">

**Author:** ![Kanika](https://avatars.discourse-cdn.com/v4/letter/k/4bbf92/32.png) [@Kanika](https://forum.opensearch.org/u/Kanika)\
**Post date:** [July 9, 2024, 6:10am UTC](https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179/3 "2024-07-09T06:10:49Z")

</div>

Hi @Mantas, thanks for the quick reply. Yes we considered using env variables but it again has security concerns because we will have to set client\_secret has an env variable in the plain text.  
Additionally, since this secret belongs to the customer, we wouldn’t be aware of when they rotate it.

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [July 10, 2024, 3:53pm UTC](https://forum.opensearch.org/t/fetch-openid-client-secret-from-vault-service/20179/4 "2024-07-10T15:53:05Z")

</div>

@Kanika, I am not aware of any solution that would meet your requirements, you might want to look into some “Vautl services” that can update Env variables, but keep in mind any OpenId credential update will require a reboot.

best,  
mj
