fix(user/secrets/hcv): include vssh script
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
6f29e49597
commit
a1235a25b4
3 changed files with 45 additions and 3 deletions
roles/user/shell/zsh/files
|
@ -78,7 +78,7 @@ alias bwvps='ln -sf $HOME/.config/Bitwarden\ CLI/{vault.mfocko.xyz,data}.json'
|
|||
function gen_pass() {
|
||||
LENGTH=12
|
||||
if [[ -n $1 ]]; then
|
||||
LENGTH=$1
|
||||
LENGTH=$1
|
||||
fi
|
||||
|
||||
bw generate -uln --length $LENGTH
|
||||
|
@ -87,19 +87,23 @@ function gen_pass() {
|
|||
function gen_passphrase() {
|
||||
LENGTH=2
|
||||
if [[ -n $1 ]]; then
|
||||
LENGTH=$1
|
||||
LENGTH=$1
|
||||
fi
|
||||
|
||||
bw generate -p --words $LENGTH
|
||||
}
|
||||
|
||||
# HashiCorp Vault
|
||||
### HashiCorp Vault ###
|
||||
export VAULT_ADDR="https://hvault.mfocko.xyz"
|
||||
function hcvu() {
|
||||
local PASS=$(yad --text "Password for HashiCorp Vault @ mfocko.xyz:" --center --button "yad-ok" --entry --hide-text)
|
||||
vault login -method=userpass -no-print username=$(whoami) password=$PASS
|
||||
}
|
||||
|
||||
# SSH variables for HashiCorp Vault
|
||||
export VSSH_ROLE=$(whoami)
|
||||
export VSSH_PRINCIPALS="$(whoami),me@mfocko.xyz"
|
||||
|
||||
### public_html ###
|
||||
function from_phrase() {
|
||||
bw list items --search $2 | jq --raw-output ".[] | select(.folderId == \"$1\") | .fields[] | select(.value == \"$3\") | .name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue