aboutsummaryrefslogtreecommitdiff
path: root/testdata
AgeCommit message (Collapse)Author
2023-09-27all: add tests for local with empty and invalid passphraseShulhan
While at it, rename the script for testing encrypted value to allow other tests without encryption later.
2023-09-27all: make .Vars, .Val, and .Vals panic if values is emptyShulhan
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.
2023-09-27all: change default path for private key to be located under .ssh directoryShulhan
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.
2023-09-26testdata: rename "encrypt" to "local"Shulhan
We change the directory name because the "encrpyt" is not specific to encryption only but only for local.
2023-09-26all: test local put without encrypted fileShulhan
2023-09-26all: make the magic word "#put" able to copy encrypted fileShulhan
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.
2023-09-22all: implement reading encrypted awwan environment ".awwan.env.vault"Shulhan
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.
2023-09-20all: implement method to decrypt file using private keyShulhan
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.
2023-09-20all: add method Encrypt to AwwanShulhan
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.