Closed aljora closed 4 months ago
@aljora this PR is in draft state, is that intentional?
@aljora this PR is in draft state, is that intentional?
Yes, I wanted to put this up there while I was confirming usage and writing documentation. I'll move it to the ready state.
Hey, thanks for your work on this :)
Tested it and works for me 👍 Will leave it open for @boc-the-git to merge :)
What type of PR is this?
What this PR does / why we need it:
This change would allow administrators to share their secrets with the mealie container without needing to enter them through the environment variables, which could possibly expose them to other processes.
It was chosen to hard-code the path to avoid needed to process environment variables before the pydantic object was created. By default Docker places all secrets in files according to their names into a single directory. This supports the default use case but would need further effort to support other paths.
Which issue(s) this PR fixes:
Fixes #3606
Special notes for your reviewer:
Automated testing was considered but I did not want to inconvenience all other developers on this project by making them declare secrets in their dev containers or machines. Is there a need to create a CI workflow that uses a custom container to run tests?
Testing
The change was verified by running the production container with and without the secrets directory present. With the secrets directory, the content of the secret was evident in the logs showing that the information reached the backend successfully. Note that this PR does not address whether or not secrets are compromised by appearing in the logs. With the directory absent, the logs include a warning per the pydantic docs.