New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KV version 2 no handler for route 'secret/data/kv' #473
Comments
have you verified you definitely have a kvv2? https://learn.hashicorp.com/vault/secrets-management/sm-versioned-kv#cli-command are you able to read the secret that exists there? typically that error is something you'd see if there is a path problem.
|
kv secret engine was mapped to path kv and I am able to get via CLI but fails via script.
|
your secret engine is named 'kv' not 'secret'. you can change the mount_point for any call hvac makes by setting:
*edit didnt mean to close. however, please confirm this solved your problem so we can close |
oh thanks. It works! |
Re-opening this issue to keep track of @drewmullen's point (since implementing it in one form or another would hopefully prevent other folks from hitting the same roadblock 😄). |
so should we change the default to
|
Hi, Can you explain why do you insert "/data/" in the path for kv2 secrets? It's located in the function read_secret_version(), create_or_update_secret() and delete_latest_version_of_secret() in file the file https://github.com/hvac/hvac/blob/master/hvac/api/secrets_engines/kv_v2.py Thanks for the explanation. [edit] typo in path |
info: the
solution: |
Hi thanks, the solution was to set mount_point=secret/test and path=approletest |
|
I am getting hvac.exceptions.InvalidPath: no handler for route 'secret/data/kv' error while trying to read KV 2 via hvac.
does anyone run into the same problem?
hvac==0.9.2
vault 1.1.2
CentOS 7.6
cat /etc/vault.d/vault_main.hcl
cluster_name = "dc1"
max_lease_ttl = "768h"
default_lease_ttl = "768h"
disable_clustering = "False"
cluster_addr = "http://127.0.0.1:8201"
api_addr = "http://127.0.0.1:8200"
plugin_directory = "/usr/local/lib/vault/plugins"
listener "tcp" {
address = "127.0.0.1:8200"
cluster_address = "127.0.0.1:8201"
tls_disable = "true"
}
storage "file" {
path = "/var/vault"
}ui = true
#!/usr/bin/python
import hvac
client = hvac.Client(url='http://127.0.0.1:8200', token='')
print client.is_authenticated()
secret_version_response = client.secrets.kv.v2.read_secret_version(
path='kv',
)
True
Traceback (most recent call last):
File "./p1.py", line 10, in
path='kv',
File "/usr/lib/python2.7/site-packages/hvac/api/secrets_engines/kv_v2.py", line 85, in read_secret_version
params=params,
File "/usr/lib/python2.7/site-packages/hvac/adapters.py", line 90, in get
return self.request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/hvac/adapters.py", line 272, in request
utils.raise_for_error(response.status_code, text, errors=errors)
File "/usr/lib/python2.7/site-packages/hvac/utils.py", line 36, in raise_for_error
raise exceptions.InvalidPath(message, errors=errors)
hvac.exceptions.InvalidPath: no handler for route 'secret/data/kv'
The text was updated successfully, but these errors were encountered: