donvito / melvinvivas.com

Blog posts from my website
https://www.melvinvivas.com
MIT License
0 stars 0 forks source link

secrets-management-using-docker-hashicorp-vault/ #7

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

How to run HashiCorp Vault (Secrets Management) in Docker

http://localhost:2368/secrets-management-using-docker-hashicorp-vault/

ettoregia commented 5 years ago

Hi Melvin,

many thanks for this post, very useful.

I question, I have started the docker with the -p 8200:8200 so I can reach the API via HTTP. Now, although I can see the port being listened to, I'm still unable to to reach the server, connection refused.

Any idea why is that happening, do I need to enable the http api in any way?

Many thanks in advance.

POST http://localhost:8200/v1/auth/approle/login with below body

{ "role_id": "9be0d9ff-180b-0e58-bd99-ab9a33eac79c", "secret_id": "e57ce4a2-f932-dfb6-0f8e-c5cb05874244" }

com.docke 2153 egiallaurito 22u IPv4 0x6b783bb0ce6f1111 0t0 TCP *:8200 (LISTEN)

guillermo-menjivar commented 5 years ago

looks like you local.json has an extra comma "default_lease_ttl": "10h",

guillermo-menjivar commented 5 years ago

we might want to update this vault init to vault operator init given that we pull the latest docker image of vault, which has deprecated vault init

guillermo-menjivar commented 5 years ago

Thanks again for this helpful post!

chuns-wuu commented 5 years ago

Hi, /bin/sh isn't working on the image for me, I am not able to get in the container. Any idea on why? Thanks.

chuns-wuu commented 5 years ago

Solved. For some reason once i stop the container and re-start it through docker exec -it CONTAINER_NAME /bin/sh it is fixed.

GPConnect commented 5 years ago

Hello thanks for this tuto ! one question ! i mounted the vault docker volume like this /opt/vault:/vault if i need to add a plugin directory to vault config should it be /opt/vault/plugins or just /vault/plugins ? also for the logs file should it be set with command vault audit enable file file_path=/opt/vault/logs or just /vault/logs thanks again i miss understand a little bit the docker volumes config !

passwordleak commented 5 years ago

outdated shit article. commands dont even work anymore.

Elfiadorn commented 5 years ago

vault init Usage: vault [args]