Vault secret not found by Drone but exists

Vault Setup:

  • Vault installed at the same host as Drone
  • Created token with policies same to root token
  • Created kv secret which can be accessed with new token
vault kv get drone/test
==== Data ====
Key      Value
 ---      -----
 hello    world

I can see vault listening on port

netstat -ntlp
tcp        0      0*               LISTEN      54696/vault 

Drone setup

docker run -d \
 --publish=3000:3000 \
 --env=DRONE_DEBUG=true \
 --env=DRONE_SECRET=8c9ad78dfacb082a161db431d8195102 \
 --env=VAULT_ADDR= \
 --env=VAULT_TOKEN=s.6T7LCYoEDY1vvmaN5KUESiTp \
 --restart=always \
 --name=drone-vault drone/vault

The Problem:

Secret couldn’t be found with CLI as well as during build

drone plugins secret get drone/test hello --repo schain/frontend --endpoint --secret 8c9ad78dfacb082a161db431d8195102

Logs in docker container

docker logs drone-vault
time="2020-11-01T01:57:16Z" level=debug msg="secrets: cannot find secret hello: secret not found"


Have you tried to update the runner configuration to include the extension endpoint and token?

Hello, running into the same issue for hours now, how did you resolve this @Ivan_Yaremchuk ?