Skip to content

Vault secret keys prefixed with "data", meta data keys included #218

Closed
@cardboardpig

Description

Describe the bug
When loading data from vault; keys are prefixed with data, and unexpected keys such as metadataversion exist.

To Reproduce
Follow example in https://github.com/knadh/koanf/blob/master/examples/read-vault/main.go using a vault kv2 secret path

Expected behavior
keys should not be prefixed with data, nor should meta data related keys be included.

Please provide the following information):

  • OS: linux
  • Koanf Version 2.0.1
  • Vault provider version 0.1.1

Additional context
I believe that this is caused by

data := maps.Unflatten(secret.Data, r.cfg.Delim)
which should probably be data := maps.Unflatten(secret.Data["data"], r.cfg.Delim).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions