You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not going to introduce the basic concept of vault. and only focused on how to initialized it more secure. this is a step by step to help you to build a simple testing.
If you didn't enable the UI option, you will see the error 404 page not found
you can change the listening port, also you have to change the setting to export port from docker to host
access the website https://127.0.0.1:8201, and you will see the initialization page. input the numbers of key share and key threshold
0x02 Prepared GPG Public Key
generate the pgp key with gpg --full-generate-key
you need make sure each Key Custodian has created their own PGP key, and share the public key to you. for example, if you setting 3 key shares in the first step. you have to got 3 PGP keys. also another one for root token.
0x03 Seal it
When a Vault server is started, it starts in a sealed state. In this state, Vault is configured to know where and how to access the physical storage, but doesn't know how to decrypt any of it.
Unsealing is the process of obtaining the plaintext master key necessary to read the decryption key to decrypt the data, allowing access to the Vault.
Note that the decryption operations on both sides are different. you need to use xxd -r -p | gpg -d to decrypt key shares and use base64 -d | gpg -d to decrypt root token.
seal again
0x005 Conclusion
this is a simple tutorial to help you to build a vault server with docker, and make sure it was shared to each person safety. There are many details when you deploy it into production.
For example:
use different backend
configure with certificate for TLS
and so on.
Also there was many features with enterprise version.
For example:
I'm not going to introduce the basic concept of vault. and only focused on how to initialized it more secure. this is a step by step to help you to build a simple testing.
Requirements:
Here is the steps:
0x01 Starting a Vault Server
notice:
UI
option, you will see the error404 page not found
https://127.0.0.1:8201
, and you will see the initialization page. input the numbers ofkey share
andkey threshold
0x02 Prepared GPG Public Key
gpg --full-generate-key
PGP
key, and share the public key to you. for example, if you setting 3 key shares in the first step. you have to got 3 PGP keys. also another one for root token.0x03 Seal it
Unsealing is the process of obtaining the plaintext master key necessary to read the decryption key to decrypt the data, allowing access to the Vault.
PGP
Public key and encode it withbase64
gpg --list-keys gpg --export 69D33CF252B5B177D67AC2728C8BF5945A111336 | base64
notice
gpg --export -a 'kso-01' > vault-admin.public
was notAs you can see, i create 3 pgp keys for testing.
Also you can click the button to show the cipher text. but you can't get the real key without PGP private key.
Due to you need share those keys to each Key Custodian , so the better way is to download it.
0x004 Unseal it.
and put those key into dashboard
0x004 Login into Vault
Notice
xxd -r -p | gpg -d
to decrypt key shares and usebase64 -d | gpg -d
to decrypt root token.0x005 Conclusion
this is a simple tutorial to help you to build a vault server with docker, and make sure it was shared to each person safety. There are many details when you deploy it into production.
For example:
and so on.
Also there was many features with enterprise version.
For example:
You can find more details here: https://www.hashicorp.com/products/vault/pricing
The text was updated successfully, but these errors were encountered: