Vault: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 122: | Line 122: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable' | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| Auth » Kubernetes » shahed-ab » VSO | |||
|- | |||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
* [[Vault#Engine » KV|Skipped » Find More 👉 Vault » Engine » KV]] | * [[Vault#Engine » KV|Skipped » Find More 👉 Vault » Engine » KV]] | ||
---- | ---- | ||
* [[Helm/Vault Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config]] | * [[Helm/Vault Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config » VSO]] | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
|- | |- | ||
!scope='col | !scope='col'| VSO » Policy | ||
!scope='col | !scope='col'| VSO » Role | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
| Line 159: | Line 159: | ||
vault read auth/kubernetes/role/role-shahed-ab-vso | vault read auth/kubernetes/role/role-shahed-ab-vso | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |||
{|class='wikitable mw-collapsible' | |||
!scope='col' style='text-align:left' colspan='2'| Auth » Kubernetes » shahed-ab » ESO | |||
|- | |||
|valign='top' style='width:50%'| | |||
* [[Vault#Engine » KV|Skipped » Find More 👉 Vault » Engine » KV]] | |||
---- | |||
* [[Helm/External Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config » ESO]] | |||
|valign='top' style='width:50%'| | |||
|- | |- | ||
!scope='col'| ESO » Policy | !scope='col'| ESO » Policy | ||
!scope='col'| ESO » Role | !scope='col'| ESO » Role | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
| Line 418: | Line 426: | ||
* [[Vault#Auth|Skipped » Find More 👉 Vault » Auth]] | * [[Vault#Auth|Skipped » Find More 👉 Vault » Auth]] | ||
---- | ---- | ||
* [[Helm/Vault Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config]] | * [[Helm/Vault Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config » VSO]] | ||
---- | |||
* [[Helm/External Secrets Operator#Vault » Config|Skipped » Find More 👉 Vault » K8s » Config » ESO]] | |||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
|} | |} | ||
Revision as of 02:40, 24 January 2026
curl -fsSL https://apt.releases.hashicorp.com/gpg\
| sudo tee /etc/apt/keyrings/hashicorp.asc >/dev/null
DISTRIBUTION=$(. /etc/os-release && echo "${VERSION_CODENAME}")
cat << SRC | sudo tee /etc/apt/sources.list.d/hashicorp.list >/dev/null
deb [arch=$(dpkg --print-architecture)\
signed-by=/etc/apt/keyrings/hashicorp.asc]\
https://apt.releases.hashicorp.com ${DISTRIBUTION} main
SRC
|
cat <<'EXE' | sudo bash
apt-get update && apt-get install -y vault
systemctl disable --now vault.service
systemctl stop vault.service
systemctl mask vault.service
systemctl status vault.service
vault version
which vault
EXE
|
export VAULT_TOKEN='hvs.40aTe1S58DWIstRk4bHPgESg'
export VAULT_ADDR='https://vault.shahed.biz.ops'
vault status
|
export VAULT_SKIP_VERIFY=true
export VAULT_FORMAT=yaml
vault login
|
Auth
|
Auth | |||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
# Enabled userpass auth method
vault auth enable userpass
|
# Enabled kubernetes auth method
vault auth enable kubernetes
| ||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
vault auth disable userpass
vault auth list
|
vault auth disable k8s/shahed/ab
vault auth disable kubernetes
| ||||||||||||||||||||||||||||
Engine » KV
|
Engine » KV | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||
Engine » DB
|
Engine » DB | |||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
# Enabled the database secrets engine
vault secrets enable database
|
|||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
Token » Init
|
Token » Init | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Playground
|
Playground | |
|---|---|
echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 40)"
echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 20)"
echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 16)"
echo "$(cat /dev/urandom|tr -dc 'A-Za-z0-9'|head -c 8)"
|
vault auth list
vault audit list
vault policy list
vault secrets list
|
vault operator init -key-shares=5 -key-threshold=3
vault token lookup
vault status
|
vault operator unseal '/bvRmLPLF8MnfOQQWrhdqAmLBSKfNtSSkcyWY/uXZ0+F'
vault operator unseal 'Jh5mA+DwX/zlU+3jvxlgNarSzAOBRHvNcF3QOoGtzl/h'
vault operator unseal 'DqUWoe6MN6oDKi3bYoZuXSbT0ZpT0/Pbg0kpTkhkUfVP'
|
# self destructive or dangerous
vault token revoke -self
|
|
References
|
References | ||
|---|---|---|