{"id":21660817,"url":"https://github.com/mohammadll/vault-consul-storage-backend","last_synced_at":"2026-05-21T14:07:03.648Z","repository":{"id":162508067,"uuid":"578289721","full_name":"mohammadll/vault-consul-storage-backend","owner":"mohammadll","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-06T10:56:10.000Z","size":5801,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T05:30:19.701Z","etag":null,"topics":["consul","vault"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohammadll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-14T17:47:20.000Z","updated_at":"2024-01-08T04:59:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e424f80b-e896-4a4d-8834-793b2313049f","html_url":"https://github.com/mohammadll/vault-consul-storage-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mohammadll/vault-consul-storage-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadll%2Fvault-consul-storage-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadll%2Fvault-consul-storage-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadll%2Fvault-consul-storage-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadll%2Fvault-consul-storage-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammadll","download_url":"https://codeload.github.com/mohammadll/vault-consul-storage-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammadll%2Fvault-consul-storage-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33303169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consul","vault"],"created_at":"2024-11-25T09:38:58.491Z","updated_at":"2026-05-21T14:07:03.631Z","avatar_url":"https://github.com/mohammadll.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Setting up the vault server with consul storage backend on the docker platform\n#### Note: \n#### Install the below tools first on your machine:\n- docker\n- docker-compose\n- vault\n- consul\n##### Replace the following config file for consul-server.json to the existing one (consul/consul-server.json) \n\t{\n\t  \"datacenter\": \"dc1\",\n\t  \"key_file\": \"/etc/consul.d/certs/dc1-server-consul-0-key.pem\",\n\t  \"cert_file\": \"/etc/consul.d/certs/dc1-server-consul-0.pem\",\n\t  \"ca_file\": \"/etc/consul.d/certs/consul-agent-ca.pem\",\n\t  \"verify_incoming\": true,\n\t  \"verify_outgoing\": true,\n\t  \"encrypt\": \"rMsUDvFefgUboQEmwLjN//baklrVmNu7uQnblFmL8/0=\",\n\t  \"data_dir\": \"/consul/data\",\n\t  \"log_level\": \"DEBUG\",\n\t  \"server\": true,\n\t  \"ui\": true,\n\t  \"client_addr\": \"0.0.0.0\",\n\t  \"bind_addr\": \"0.0.0.0\",\n\t  \"bootstrap_expect\": 1,\n\t  \"ports\": {\n\t    \"dns\": 53\n\t  }\n\t}\n##### Startup Consul-server with docker-compose\n    docker-compose up -d consul-server\n##### check The result to see if consule-service container is up or not\n\n##### Set the following env var \n    export CONSUL_HTTP_ADDR=REPLACE_ME_WITH_CONSUL_SERVER_IP:8500\n##### Type this to see if you have any output or not\n    consul members\n##### Replace the following config file for consul-server.json to the existing one (consul/consul-server.json)\n\t{\n\t  \"datacenter\": \"isc\",\n\t  \"datacenter\": \"dc1\",\n\t  \"key_file\": \"/etc/consul.d/certs/dc1-server-consul-0-key.pem\",\n\t  \"cert_file\": \"/etc/consul.d/certs/dc1-server-consul-0.pem\",\n\t  \"ca_file\": \"/etc/consul.d/certs/consul-agent-ca.pem\",\n\t  \"verify_incoming\": true,\n\t  \"verify_outgoing\": true,\n\t  \"encrypt\": \"rMsUDvFefgUboQEmwLjN//baklrVmNu7uQnblFmL8/0=\",\n\t  \"data_dir\": \"/consul/data\",\n\t  \"log_level\": \"DEBUG\",\n\t  \"server\": true,\n\t  \"ui\": true,\n\t  \"client_addr\": \"0.0.0.0\",\n\t  \"bind_addr\": \"0.0.0.0\",\n\t  \"bootstrap_expect\": 1,\n\t  \"acl\": {\n\t   \"enabled\": true,\n\t   \"default_policy\": \"deny\",\n\t   \"enable_token_persistence\": true,\n\t  },\n\t  \"ports\": {\n\t    \"dns\": 53\n\t  }\n\t}\n\n##### Restart Consul service with docker-compose\n    docker-compose restart consul-server\n##### check The result to see if consule-service container is up or not\n\n##### Enable The consul ACL\n    consul acl bootstrap\n##### Set the HTTP token variable with the `SecretID` from the generated output in the previous step\n    export CONSUL_HTTP_TOKEN=REPLACE_ME_WITH_SECRET_ID\n##### Check if the consule Node is up and running again\n    consul members\n##### Create a generic agent token policy\n    cd consul/ \u0026\u0026 consul acl policy create -name node-policy -description \"Generic Rules for Nodes\" -rules @generic-node-acl.hcl\n##### Create the generic Agent Token\n    consul acl token create -description \"Agent Token\" -policy-name node-policy\n##### Replace the following config file for consul-server.json to the existing one (consul/consul-server.json)\n\t{\n\t  \"datacenter\": \"isc\",\n\t  \"datacenter\": \"dc1\",\n\t  \"key_file\": \"/etc/consul.d/certs/dc1-server-consul-0-key.pem\",\n\t  \"cert_file\": \"/etc/consul.d/certs/dc1-server-consul-0.pem\",\n\t  \"ca_file\": \"/etc/consul.d/certs/consul-agent-ca.pem\",\n\t  \"verify_incoming\": true,\n\t  \"verify_outgoing\": true,\n\t  \"encrypt\": \"rMsUDvFefgUboQEmwLjN//baklrVmNu7uQnblFmL8/0=\",\n\t  \"data_dir\": \"/consul/data\",\n\t  \"log_level\": \"DEBUG\",\n\t  \"server\": true,\n\t  \"ui\": true,\n\t  \"client_addr\": \"0.0.0.0\",\n\t  \"bind_addr\": \"0.0.0.0\",\n\t  \"bootstrap_expect\": 1,\n\t  \"acl\": {\n\t   \"enabled\": true,\n\t   \"default_policy\": \"deny\",\n\t   \"enable_token_persistence\": true,\n\t   \"tokens\": {\n\t     \"agent\": \"REPLCAE_ME_WITH_AGENT_TOKEN\"\n\t    }\n\t  },\n\t  \"ports\": {\n\t    \"dns\": 53\n\t  }\n\t}\n\n##### Restart Consul service with docker-compose\n    docker-compose restart consul-server\n##### Check The result to see if consule-server container is up or not\n##### Access the consul web ui\n    http://REPLACE_ME_WITH_CONSUL_SERVER_IP:8500/ui/ \n### Token needed for login is the result of \"echo $CONSUL_HTTP_TOKEN\" \n\n##### Create the policy for vault\n    cd consul/ \u0026\u0026 consul acl policy create -name vault-policy -rules @vault-policy.hcl\n##### Create the token to allow vault cluster to use consul\n    consul acl token create -description \"Token for Vault Service\" -policy-name vault-policy\n    \n##### Replace the following config file for consul-server.json to the existing one (vault/vault-server.hcl)\n\n\tlistener \"tcp\" {\n\t    address = \"0.0.0.0:8200\"\n\t    cluster_address = \"0.0.0.0:8201\"\n\t    tls_disable = true\n\t}\n\tui = true\n\tstorage \"consul\" {\n\t    address = \"REPLACE_ME_WITH_CONSUL_SERVER_IP:8500\"\n\t    path = \"vault\"\n\t    token = \"REPLACE_ME_WITH_TOKEN_TO_ALLOW_VAULT_NODE_TO_USE_CONSUL\"\n\t}\n\tservice_registration \"consul\" {\n\t    address = \"REPLACE_ME_WITH_CONSUL_SERVER_IP:8500\"\n\t    token = \"REPLACE_ME_WITH_TOKEN_TO_ALLOW_VAULT_NODE_TO_USE_CONSUL\"\n\t    service = \"vault\"\n\t}\n\tapi_addr =  \"http://REPLACE_ME_WITH_VAULT_SERVER_IP:8200\"\n\tcluster_addr = \"http://REPLACE_ME_WITH_VAULT_SERVER_IP:8201\"\n\t\n##### Startup vault-server with docker-compose\n    docker-compose up -d consul-server\n##### Set the Env var for vault_address\n    export VAULT_ADDR=http://REPLACE_ME_WITH_VAULT_SERVER_IP:8200\n##### initialize vault node\n    vault operator init\n##### Set the Env var for vault_token with the information generated\n    export VAULT_TOKEN=REPLACE_ME_WITH_VAULT_ROOT_TOKEN\n##### Unseal Vault Node\n    vault operator unseal REPLACE_ME_WITH_FIRST_UNSEAL_KEY \n    vault operator unseal REPLACE_ME_WITH_SECOND_UNSEAL_KEY \n    vault operator unseal REPLACE_ME_WITH_THIRD_UNSEAL_KEY \n##### Access the vault web ui\n    http://REPLACE_ME_WITH_VAULT_SERVER_IP:8200 \n#### Token needed for login is the result of \"echo $VAULT_TOKEN\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadll%2Fvault-consul-storage-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadll%2Fvault-consul-storage-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadll%2Fvault-consul-storage-backend/lists"}