]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: docs: TPC: password management through hiera-eyaml
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 8 Mar 2024 14:22:45 +0000 (11:22 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 8 Mar 2024 14:22:45 +0000 (11:22 -0300)
docs/tpc.md

index de3203a2a9de9098e808c1e563aff5949b52874f..7e452c32496e6cdb1254b386bd2ba4c792301743 100644 (file)
@@ -66,6 +66,7 @@ If you already have the secret somewhere, you can use a construction like this
 which already adds the eyaml block into the hiera config file:
 
     keyringer $HYDA decrypt /path/to/some/secret | \
+      tr -d '\n' | \
       hydra $HYDRA eyaml $VOLNAME encrypt -q -o block --stdin -l some::password >> \
       $CONFIG_FOLDER/puppet/config/secrets/node/$VOLNAME.$DOMAIN.yaml
 
@@ -73,19 +74,22 @@ You can also ensure a fresh random passphrase is used, using your favourite
 generator like this:
 
     head -c ${1:-20} /dev/urandom | base64 | \
+      tr -d '\n' | \
       hydra $HYDRA eyaml $VOLNAME encrypt -q -o block --stdin -l some::random:password >> \
       $CONFIG_FOLDER/puppet/config/secrets/node/$VOLNAME.$DOMAIN.yaml
 
 For `passwd(5)` and `shadow(5)` hashed passphrases, use something like this:
 
     mkpasswd -m sha-512 | \
+      tr -d '\n' | \
       hydra $HYDRA eyaml $VOLNAME encrypt -q -o block --stdin -l some::random:password >> \
       $CONFIG_FOLDER/puppet/config/secrets/node/$VOLNAME.$DOMAIN.yaml
 
 Or this, for a random passphrase:
 
     head -c ${1:-20} /dev/urandom | base64 | \
-    mkpasswd -m sha-512 --stdin | \
+      mkpasswd -m sha-512 --stdin | \
+      tr -d '\n' | \
       hydra $HYDRA eyaml $VOLNAME encrypt -q -o block --stdin -l some::random:password >> \
       $CONFIG_FOLDER/puppet/config/secrets/node/$VOLNAME.$DOMAIN.yaml