Do not use this in production. Only demonstration purposes
docker-compose up -d
- try login to
http://localhost:8080
with admin and foobar export VAULT_SKIP_VERIFY=1
vault operator init
vault operator unseal
vault login
cd tf && terraform init
cd tf && terraform apply
rm ~/.vault-token
vault login -method=oidc port=8250
with admin and foobar
You are now logged in to vault via keycloak
- run
docker run --rm -ti --network=host mongo mongo mongodb://localhost:27017/admin
- run
db.foobar.insert({})
verify you don't have access - now run
vault read db/mongo/creds/admin
- verify you can use the provided credentials with
db.foobar.insert({})
on mongo like above
- run
vault read -field=public_key ssh/config/ca
and save to a file - put that file on ssh server
- set
TrustedUserCAKeys
to that file - login with
vault ssh -role servers -mode ca -public-key-path pubkeyfile user@host
assuming the agent has your private key loaded