Skip to content

vault read -field=<field_name> produces incorrect output #583

@marc-

Description

@marc-

Vault adds carriage return and new line characters to output if -field used.

$ du /tmp/key
0       /tmp/key
$ vault write -address=http://127.0.0.1:8200 secret/encrypted key=@/tmp/key
$ vault read -address=http://127.0.0.1:8200 -field=key secret/encrypted > /tmp/key1
$ du /tmp/key1
4       /tmp/key1
$ xxd -p /tmp/key1
0d0a

Please note that documentation claims:

-field=field            If included, the raw value of the specified field
                          will be output raw to stdout.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions