-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Expected Behavior
The KvV2List function should return secrets & folders at the root of the secret engine when path is empty.
Current Behavior
Throws a 404 error.
Failure Information
We're running Vault enterprises and are utilizing enterprise namespaces.
vault-client-go: v1.19.0
vault: v1.15.4
Vault Enterprises with namespaces enabled/being used
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- Setup Vault client & try and list secrets at the root
client, err := vault.New(
vault.WithAddress(config.VAULT_ADDR),
vault.WithRequestTimeout(30*time.Second))
if err != nil {
return nil, err
}
err = client.SetNamespace("<your_namespace>")
if err != nil {
return nil, err
}
resp, err := client.Auth.JwtLogin(
context.TODO(), schema.JwtLoginRequest{
Jwt: "<your_jwt_here>",
Role: "<your_role>",
}, vault.WithMountPath("<mount_path>"))
if err := client.SetToken(resp.Auth.ClientToken); err != nil {
return nil, err
}
resp, err := client.Secrets.KvV2List(ctx, "", vault.WithMountPath("<your_mount_path>")) // This throws an error
...
Additional Information
Error thrown:
{"level":"fatal","ts":1710409697.041736,"caller":"vault-secret-expiry-notifier/main.go:36","msg":"404 Not Found: no handler for route \"<vault_namespace>/<secret_engine_mount_path>/metadata/\". route entry not found.","stacktrace":"main.main\n\t/Users/R713887/Documents/vault-secret-expiry-notifier/main.go:36\nruntime.main\n\t/usr/local/jpmc/go-1.21.5/src/runtime/proc.go:267"}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels