| Age | Commit message (Collapse) | Author |
|
While at it, rename the script for testing encrypted value to allow
other tests without encryption later.
|
|
This is to prevent copying or executing command with value that are
not defined or typo which make the result empty and may result in
undefined behaviour.
For example if we have "app_dir = /data/app" and command in the script
that remove that directory recursively,
sudo rm -r {{.Val "::app_dir}}/bin
will result removing "/bin" entirely.
|
|
Using hidden file (with "." prefix in name) cluttering the workspace
directory.
Since we already have ".ssh" as indicator of workspace, we should use it,
the same principal that ~/.ssh/ store user's private key.
|
|
We change the directory name because the "encrpyt" is not specific to
encryption only but only for local.
|
|
|
|
When issuing "#put:" or "#put!" command in the script, if the input
file is not exist it will check for the encrypted file, the one with
".vault" extension.
If it exists, the encrypted file will be used as input for copy operation.
|
|
Upon executing "local" or "play" comman, awwan now read the encrypted
environment file .awwan.env.vault.
The encrypted environment file is generated using "awwan encrypt" command.
|
|
The Decrypt method decrypt the file using private key from file
"{{.BaseDir}}/.awwan.key".
The encrypted file must have extension ".vault", otherwise it will return
an error.
The decrypted file output will be written in the same directory without
the ".vault" extension in filePlain.
|
|
The Encrypt method encrypt the file using private key from file
"{{.BaseDir}}/.awwan.key".
The encrypted file output will be on the same file path with ".vault"
extension.
|