{"id":1475,"date":"2020-03-21T08:31:37","date_gmt":"2020-03-21T13:31:37","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=1475"},"modified":"2020-04-12T11:44:43","modified_gmt":"2020-04-12T16:44:43","slug":"hashicorp-vault-test","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/hashicorp-vault-test\/","title":{"rendered":"Hashicorp Vault Test"},"content":{"rendered":"

Recording a quick test of Vault.<\/h2>\n

hashicorp vault: https:\/\/www.vaultproject.io<\/a><\/h3>\n
\n

download vault executable and move to \/usr\/sbin so we have it in the path for this test. should rather be in \/usr\/local\/bin<\/p>\n<\/blockquote>\n

$ vault -autocomplete-install\n$ exec $SHELL\n\n$ vault server -dev\n==> Vault server configuration:\n\n             Api Address: http:\/\/127.0.0.1:8200\n                     Cgo: disabled\n         Cluster Address: https:\/\/127.0.0.1:8201\n              Listener 1: tcp (addr: \"127.0.0.1:8200\", cluster address: \"127.0.0.1:8201\", max_request_duration: \"1m30s\", max_request_size: \"33554432\", tls: \"disabled\")\n               Log Level: info\n                   Mlock: supported: true, enabled: false\n           Recovery Mode: false\n                 Storage: inmem\n                 Version: Vault v1.3.4\n\nWARNING! dev mode is enabled! In this mode, Vault runs entirely in-memory\nand starts unsealed with a single unseal key. The root token is already\nauthenticated to the CLI, so you can immediately begin using Vault.\n...<\/code><\/pre>\n

new terminal<\/h2>\n
$ export VAULT_ADDR='http:\/\/127.0.0.1:8200'\n$ export VAULT_DEV_ROOT_TOKEN_ID=\"<...>\"\n\n$ vault status\nKey             Value\n---             -----\nSeal Type       shamir\nInitialized     true\nSealed          false\nTotal Shares    1\nThreshold       1\nVersion         1.3.4\nCluster Name    vault-cluster-f802bf67\nCluster ID      aa5c7006-9c7c-c394-f1f4-1a9dafc17688\nHA Enabled      false\n\n$ vault kv put secret\/awscreds-iqonda {AWS_SECRET_ACCESS_KEY=<...>,AWS_ACCESS_KEY_ID=<...>}\nKey              Value\n---              -----\ncreated_time     2020-03-20T18:58:57.461120823Z\ndeletion_time    n\/a\ndestroyed        false\nversion          4\n\n$ vault kv get -format=json secret\/awscreds-iqonda | jq -r '.data[\"data\"]'\n{\n  \"AWS_ACCESS_KEY_ID\": \"<...>\",\n  \"AWS_SECRET_ACCESS_KEY\": \"<...>\"\n}\n\n$ vault kv get -format=json secret\/awscreds-iqonda | jq -r '.data[\"data\"] | .AWS_ACCESS_KEY_ID'\n<...>\n\n$ vault kv get -format=json secret\/awscreds-iqonda | jq -r '.data[\"data\"] | .AWS_SECRET_ACCESS_KEY'<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"

Recording a quick test of Vault. hashicorp vault: https:\/\/www.vaultproject.io download vault executable and move to \/usr\/sbin so we have it<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-1475","post","type-post","status-publish","format-standard","hentry","category-security"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=1475"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1475\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=1475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=1475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}