Currently, I am working on a web app. The backend would frequently communicate with the Docker Engine API and I am using certificate signing (client/server key) to authenticate. However, where should I store the certificate PEM file? Should I store it in the database, or should I store it as a file then store the file path in the database?
Storing into a database would mean that I have to access the database every time there is a command being sent. Am I correct?
I feel storing the PEM files on disk would be less resource-intensive. As you have stated, if it is stored in the database, you will need to make a request any time you wish to access it.
If you do store the PEM file on disk, ensure it is not within a web-accessible directory e.g. nobody should be able to goto https://yourapp/your.pem file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With