-
Notifications
You must be signed in to change notification settings - Fork 26
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
Import path not used #20
Comments
I noticed the same just after first import try. I guess the import path should be inserted before path (there could be two slashes, so it needs to be handled somehow) in this part of code for each item. |
What would be more usable is that the path that is saved in JSON after export command will not contain the path specified in export command. What I mean is: vault-backend-migrator -ver 1 -export /my-directory/my-secrets/ -file secrets.json
cat secrets.json
{
"data":
[
{
"path":"secret1","pairs":[{"key":"value","value":"s1"}]
},
{
"path":"secret2","pairs":[{"key":"value","value":"s2"}]
},
{
"path":"nested-dir1/secret3","pairs":[{"key":"value","value":"s3"}]
},
{
"path":"nested-dir2/secret4","pairs":[{"key":"value","value":"s4"}]
},
]
} Then I can run import to some path and all paths will be unpacked in it. vault-backend-migrator -ver 1 -import /different-directory/my-secrets/ -file secrets.json
vault list /different-directory/my-secrets/
> secret1
> secret2
> nested-dir1/secret3
> nested-dir2/secret4 |
In the Readme it looks like one can define the import path of the secrets but looking at the code it's clear that the
path
variable is unused.It would be great if a different path could be used to import the secrets to.
The text was updated successfully, but these errors were encountered: