# Quarkus keycloak db-password and keystore-password encryption in keycloak.conf

**URL:** <https://forum.keycloak.org/t/quarkus-keycloak-db-password-and-keystore-password-encryption-in-keycloak-conf/18561>\
**Category:** Configuring the server\
**Tags:** database\
**Created:** [November 23, 2022, 10:54am UTC](https://forum.keycloak.org/t/quarkus-keycloak-db-password-and-keystore-password-encryption-in-keycloak-conf/18561 "2022-11-23T10:54:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaiswal595](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/ajaiswal595/32/6789_2.png) [@ajaiswal595](https://forum.keycloak.org/u/ajaiswal595)\
**Post date:** [November 23, 2022, 10:54am UTC](https://forum.keycloak.org/t/quarkus-keycloak-db-password-and-keystore-password-encryption-in-keycloak-conf/18561/1 "2022-11-23T10:54:18Z")

</div>

I am implementing the quarkus keycloak as an Identity Access Manager.

One requirement is to encrypt db-password and Keystore password in the keycloak.conf.

Keeping the DB-password and Keystore password as plaintext is a security risk.

Is there any way to achieve that?

---

<div class="post-metadata">

**Author:** ![yvesgab](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/yvesgab/32/7272_2.png) [@yvesgab](https://forum.keycloak.org/u/yvesgab)\
**Post date:** [December 19, 2022, 9:36am UTC](https://forum.keycloak.org/t/quarkus-keycloak-db-password-and-keystore-password-encryption-in-keycloak-conf/18561/2 "2022-12-19T09:36:31Z")

</div>

Hi,

I’m trying to solve the same problem. Have you found a solution to encrypt the database password?

---

<div class="post-metadata">

**Author:** ![ajaiswal595](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/ajaiswal595/32/6789_2.png) [@ajaiswal595](https://forum.keycloak.org/u/ajaiswal595)\
**Post date:** [December 19, 2022, 10:07am UTC](https://forum.keycloak.org/t/quarkus-keycloak-db-password-and-keystore-password-encryption-in-keycloak-conf/18561/3 "2022-12-19T10:07:32Z")

</div>

No,

In some of the post they suggest to use quarkus.properties and filebased vault  
I could not achieve from quarkus.properties.

Refer the analysis

[https://github.com/keycloak/keycloak/issues/15548](https://github.com/keycloak/keycloak/issues/15548)  
[https://github.com/keycloak/keycloak/issues/15740#issuecomment-1353019694](https://github.com/keycloak/keycloak/issues/15740#issuecomment-1353019694)
