mdouchement / standardfile

Yet Another Standardfile (standardnotes server) Implementation written in Golang
MIT License
80 stars 9 forks source link

Support reading keys from systemd credentials #83

Closed squalus closed 1 year ago

squalus commented 1 year ago

Add support for reading the secret key and the session key from the following files:

This allows using the systemd LoadCredential directive to handle keys. For example:

LoadCredential=secret_key:/var/lib/standardfile/secret_key.txt
LoadCredential=session.secret:/var/lib/standardfile/session_secret.txt

Tested using both hardcoded secrets and LoadCredential files.

squalus commented 1 year ago

Committed both code changes, and added some notes to the example standardfile.yml config about using systemd to pass credentials.