Allow to set a passphrase file location per stash
nir0s opened this issue · 2 comments
When a stash is initialized, a passphrase.ghost
file is generated for it. A user can explicitly pass a passphrase in the API and the CLI or set an environment variable else the file is searched for in different locations.
If a user works with multiple stashes, they have to explicitly pass the passphrase as only the passphrase.ghost
file is looked up.
Providing an API for setting a location in the storage for where to find the passphrase file would allow users to use multiple passphrase files easily.
The API could be implemented somewhat like so:
stash.init()
stash.set_passphrase('/etc/ghost/my-stash.passphrase.ghost')
Every time a user uses a specific stash, the passphrase file will be looked up in the set position.
This might create too much ambiguity with regard to where the passphrase is taken. Currently, it can be passed using an env var, a cli flag, three file system locations and the API. Adding this might confuse the user as it provides a second explicit method.
Let's think about it again.
Seems like this would introduce too much complexity. Closing for now.