Skip to content

Cannot access KV secrets at deep paths #267

@nyarly

Description

@nyarly

Expected Behavior

We keep several kinds of secrets in our kv-v1 engine, grouped in "directories." e.g. oauth/<uuid>/creds. The Vault CLI supports this behavior, including the directories in lists of /kv (e.g. oauth/) and allowing gets and puts against the ultimate path.

I'd expect the Go client to do likewise.

Current Behavior

Both the KvV1 and KvV2 engines appear to put their path arguments through net/url's PathEscape, which spoils the / in the path.

Failure Information

Please include the version of Vault binary and the version of vault-client-go you're using.

Vault 1.18
vault-client-go v0.4.3

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

readResponse, err := vClient.Secrets.KvV1Read(ctx, "some-dir/mysecret", vault.WithMountPath("kv"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions