Skip to content

Commit

Permalink
Add blackbox_decrypt_file (#270)
Browse files Browse the repository at this point in the history
Add a command for decrypting single files. It is currently just an alias
for blackbox_edit_start.
It is meant to be a more obvious command for decrypting a single file
without editing it.

Fixes #268
  • Loading branch information
Tobias Dubois authored and Tom Limoncelli committed Sep 27, 2018
1 parent dc9fa32 commit 9d30523
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Commands
| `blackbox_deregister_file <file>` | Remove a file from blackbox |
| `blackbox_list_files` | List the files maintained by blackbox |
| `blackbox_list_admins` | List admins currently authorized for blackbox |
| `blackbox_decrypt_file <file>` | Decrypt a file |
| `blackbox_decrypt_all_files` | Decrypt all managed files (INTERACTIVE) |
| `blackbox_postdeploy` | Decrypt all managed files (batch) |
| `blackbox_addadmin <gpg-key>` | Add someone to the list of people that can encrypt/decrypt secrets |
Expand Down
15 changes: 15 additions & 0 deletions bin/blackbox_decrypt_file
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

#
# blackbox_decrypt_file -- Decrypt one or more blackbox files.
#

set -e
source "${0%/*}/_blackbox_common.sh"

if [ $# -eq 0 ]; then
echo >&2 "Please provide at least one file to decrypt"
exit 1
fi

"${BLACKBOX_HOME}/blackbox_edit_start" "$@"

0 comments on commit 9d30523

Please sign in to comment.