Skip to content
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

Add in logic for handling a field of 'data' to kv get #4895

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Conversation

jefferai
Copy link
Member

We do this for normal commands in PrintRawField but it needs some help
for KV v2.

We do this for normal commands in PrintRawField but it needs some help
for KV v2.
@jefferai jefferai added this to the 0.10.4 milestone Jul 10, 2018
@jefferai
Copy link
Member Author

Output; before it would error when attempting to get the data field:

$ vault kv put secret/foo zip=zap
Key              Value
---              -----
created_time     2018-07-10T16:48:26.942263352Z
deletion_time    n/a
destroyed        false
version          2

$ vault kv get -field=data secret/foo
map[zip:zap]

$ echo -n '{"data": {"data": { "foo": "bar" }}}' | vault write secret/data/bar -
Key              Value
---              -----
created_time     2018-07-10T16:48:45.459061705Z
deletion_time    n/a
destroyed        false
version          2

$ vault kv get -field=data secret/bar
map[foo:bar]

@jefferai jefferai merged commit 229dee1 into master Jul 11, 2018
@jefferai jefferai deleted the kv-get-data branch July 11, 2018 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants