I have a linux server with a modified PostgreSQL
DB which encrypt files at rest, using this guide.
I have installed this modified PostgreSQL
on server which its DB files are encrypted at rest. and need the password to decrypt them when db process starts
.
Whenever the server starts/restart, specifically when DB process starts, The DB executes a file which needs to print out the password, lets say give_pass.sh
with password 1234
cat give_pass.sh
#!/bin/sh
echo 1234
But I don't want password to be present at server so something like:
#!/bin/sh
secured_function_that_gives_password
I want to protect the DB files from being exposed in case of a physical theft, so:
- Make sure if physical db server is stolen, the password won't be present at server, nor it would be reached from executing
give_pass.sh
file, obviously to prevent db files from being accessed. - Somehow automate the procedure, meaning if the
db
process fails, it would be restarted, executinggive_pass.sh
, and having the password delivered.
Any ideas how I should go about it?- thanks