From 4c1476932e090129b6db5ec4f7d98346362b3057 Mon Sep 17 00:00:00 2001 From: Richlv Date: Mon, 11 Mar 2019 22:52:04 +0200 Subject: [PATCH] add warnings for the stding usage examples (#51859) * Add a warning about vault leaving secrets in the shell history. * Add a warning about accidental newlines in vault encrypted strings. +label: docsite_pr --- docs/docsite/rst/user_guide/vault.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docsite/rst/user_guide/vault.rst b/docs/docsite/rst/user_guide/vault.rst index c88cd13dbe..cb9bb17718 100644 --- a/docs/docsite/rst/user_guide/vault.rst +++ b/docs/docsite/rst/user_guide/vault.rst @@ -180,6 +180,10 @@ To encrypt a string read from stdin and name it 'db_password': echo -n 'letmein' | ansible-vault encrypt_string --vault-id dev@a_password_file --stdin-name 'db_password' +.. warning:: + + This method leaves the string in your shell history. Do not use it outside of testing. + Result:: Reading plaintext input from stdin. (ctrl-d to end input) @@ -204,6 +208,10 @@ Output:: User enters 'hunter2' and hits ctrl-d. +.. warning:: + + Do not press Enter after supplying the string. That will add a newline to the encrypted value. + Result:: new_user_password: !vault |