You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add key-value pairs to Vault where the key is a twitter handle (beginning with an @ character), using vault-0.7.3. I haven't got it to work yet...
From the documentation, values starting @ are described, but not keys:
Data is sent via additional arguments in "key=value" pairs. If value begins
with an "@", then it is loaded from a file. Write expects data in the file to
be in JSON format. If you want to start the value with a literal "@", then
prefix the "@" with a slash: "\@".
no @: working as expected:
$ vault write secret/test 'a=b'
Success! Data written to: secret/test
@ in value: working as expected:
$ vault write secret/test 'a=@/dev/null'
Success! Data written to: secret/test
$ vault write secret/test a=@nonexistantfile
Error loading data: Invalid key/value pair 'a=@nonexistantfile': error reading file: open nonexistantfile: no such file or directory
@ in key: not working as expected:
without escaping the at character with a backslash
$ vault write secret/test @a=b
Error loading data: Invalid key/value pair '@a=b': open a=b: no such file or directory
I would have expected a key of @a and a password of b to be written. I'm not expecting Vault to look for a file called a=b.
with escaping the at character with a backslash:
$ vault write secret/test '\@a=b'
Success! Data written to: secret/test
$ vault read secret/test
Key Value
--- -----
refresh_interval 768h0m0s
\@a b
The \ has erroneously made its way into the key name.
The text was updated successfully, but these errors were encountered:
I'm trying to add key-value pairs to Vault where the key is a twitter handle (beginning with an
@
character), using vault-0.7.3. I haven't got it to work yet...From the documentation, values starting
@
are described, but not keys:no
@
: working as expected:@
in value: working as expected:@
in key: not working as expected:without escaping the at character with a backslash
I would have expected a key of
@a
and a password ofb
to be written. I'm not expecting Vault to look for a file calleda=b
.with escaping the at character with a backslash:
The
\
has erroneously made its way into the key name.The text was updated successfully, but these errors were encountered: