opendcim / openDCIM

An open source (GPL v3) Data Center Inventory Management (DCIM) application.
http://opendcim.org
305 stars 204 forks source link

Draft: Proof of concept HashiCorp Vault for database password #1510

Closed timlegge closed 7 months ago

timlegge commented 7 months ago

This is just a PoC for the ability to access a stored password for the mysql database in Vault. A similar process could be used for other secrets such as the SNMP community strings.

It was more of an experiment for me. I may continue as I have time and learn more about vaults.

There are probably better ways to implement possibly putting it in its own file and simply calling the function from db.inc.php

samilliken commented 7 months ago

Going to reject this one - the typical way for secrets to be injected is through environment variables, as it is more portable across platforms. Given that information, you utilize Vault within your pipeline to set the environment variables, which are already referenced in the db.inc.php-dist file.

timlegge commented 7 months ago

No worries, an interesting diversion...