JetBrains / teamcity-hashicorp-vault-plugin

TeamCity plugin to support HashiCorp Vault
Apache License 2.0
28 stars 18 forks source link

Fix plugin documentation #9

Closed byumov closed 5 years ago

byumov commented 6 years ago

I had a problem with Vault plugin after read documentation from post: https://blog.jetbrains.com/teamcity/2017/09/vault/

Correct format: %vault:secret/some/path!/somekey% From documentation: %vault:secret/some/path!somekey%

Is the post an only one official documentation?

There is a issue, which helped me to solve the problem: https://github.com/JetBrains/teamcity-hashicorp-vault-plugin/issues/1

But, documentation is still incorrect. Fix it, please.

yoshikakbudto commented 5 years ago

with vault 1.1.3

For K/V version 2

For the cli request: vault kv get -field=foo kv/cicd/blue

the correct syntaxes (note /data/):

  1. %vault:kv/data/cicd/blue!/foo%
  2. %vault:/kv/data/cicd/blue!/foo%

For K/V version 1

For the cli request: ``vault kv get -field=user kv1/creds``` the correct syntaxes is:

  1. %vault:kv1/creds!/user%
  2. %vault:/kv1/creds!/user%

For the future path problems, to find the correct path

  1. enable Vault server audit logs. Forexample vault audit enable file file_path=/vault/logs/audit.log
  2. use vault CLI
  3. search for the path in audit.log
VladRassokhin commented 5 years ago

Finally fixed plugin description and blog post.