I’d like to thank you for you work on this vkv swiss knife tool. It works like a charm for kv secret engines.
However, while testing, I ran into a problem with the following error.
$> vkv export -p garr -f=json
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 1 [running]:
[github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).IsKVv1(0xafe1fd](http://github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).IsKVv1(0xafe1fd)?, {0x7ffd2ade928f?, 0xc0004d18c0?})
/home/runner/work/vkv/vkv/pkg/vault/kv.go:120 +0x179
[github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).ListKeys(0xc000050618](http://github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).ListKeys(0xc000050618), {0x7ffd2ade928f, 0x3}, {0x0, 0x0})
/home/runner/work/vkv/vkv/pkg/vault/kv.go:72 +0xec
[github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).ListRecursive(0x7ffd2ade928f](http://github.com/FalcoSuessgott/vkv/pkg/vault.(*Vault).ListRecursive(0x7ffd2ade928f)?, {0x7ffd2ade928f, 0x3}, {0x0, 0x0}, 0x0)
/home/runner/work/vkv/vkv/pkg/vault/kv.go:31 +0xbc
[github.com/FalcoSuessgott/vkv/cmd/export.(*exportOptions).buildMap(0xc00058ea10](http://github.com/FalcoSuessgott/vkv/cmd/export.(*exportOptions).buildMap(0xc00058ea10), 0x0?)
/home/runner/work/vkv/vkv/cmd/export/export.go:194 +0x96
[github.com/FalcoSuessgott/vkv/cmd/export.NewExportCmd.func1(0xc0005c4100](http://github.com/FalcoSuessgott/vkv/cmd/export.NewExportCmd.func1(0xc0005c4100)?, {0xaeeff5?, 0x4?, 0xaeef01?})
/home/runner/work/vkv/vkv/cmd/export/export.go:87 +0x405
[github.com/spf13/cobra.(*Command).execute(0xc00041cf00](http://github.com/spf13/cobra.(*Command).execute(0xc00041cf00), {0xc00050c8a0, 0x3, 0x3})
[/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:983](mailto:/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:983) +0xabc
[github.com/spf13/cobra.(*Command).ExecuteC(0xc0005ca000)](http://github.com/spf13/cobra.(*Command).ExecuteC(0xc0005ca000))
[/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115](mailto:/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115) +0x3ff
[github.com/spf13/cobra.(*Command).Execute(..](http://github.com/spf13/cobra.(*Command).Execute(..).) [/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039](mailto:/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039)
[github.com/FalcoSuessgott/vkv/cmd.Execute({0xc020ac](http://github.com/FalcoSuessgott/vkv/cmd.Execute(%7B0xc020ac)?, 0xc00004c730?})
/home/runner/work/vkv/vkv/cmd/root.go:82 +0x2b
main.main()
/home/runner/work/vkv/vkv/main.go:13 +0x25
I found out this was because “garr” secret engine is of type “generic” and that was causing the panic. We adopted Vault couple of years ago and the initial and heavily used secret engines were created of type “generic” which also is the same as KV1 type.
I would like to request if you can also help include “generic” secret engine type as well to vkv?
If you could also point out to the section of code to make changes, I’ll give it a try and build it locally.
Also, I noticed that if I choose json or yaml format, the secrets are not hashed but are displayed in plain text.
Thanks in advance for your help. Much appreciated.