Open Abyss777 opened 1 year ago
Hi,
currently metadata is not being exported when using yaml or json output format. But this is something i have on my list.
I will see and let you knowhow big this change would be
Hi @FalcoSuessgott , any news on this? btw, amazing tool!
Any progress, @FalcoSuessgott ?
You really need this hm? Let me see what i can do im currently traveling but let me see how big that change is :)
For export, modifying and reimporting, losing the metadata is not good 😐 Tks for taking a look at it.
News? ;)
I started already. Its a rather big change as I wanna migrate to the KV* functions offered from the hashicorp vault api package, but Im on it and it will be the next PR :) stay tuned
+1 for this feature. Awesome tool
Hi @FalcoSuessgott , how's this going ?
In #265 Im working on it. Its the biggest vkv
rewrite yet and completely refactors the vault
and printer
package.
It will allow exporting all secret versions as well as its metadata.
Here are some examples:
> go run main.go export -p secret -f=detailed
secret/ [kv2] (key/value secret storage)
├── admin [key=value]
│ └── [Version 1 created 17 seconds ago]
│ └── sub=***
│
│
├── demo
│ └── [Version 1 created 17 seconds ago]
│ └── foo=***
│
│
└── sub
├── demo
│ └── [Version 1 created 17 seconds ago]
│ ├── demo=****
│ ├── password=********
│ └── user=****
│
│
└── sub2
└── demo [admin=false key=value]
├── [Version 2 created 17 seconds ago]
│ ├── password=********
│ ├── user=****
│ └── foo=***
│
└── [Version 1 created 17 seconds ago]
├── user=****
├── foo=***
└── password=********
{
"mount_path": "secret",
"type": "kv2",
"description": "key/value secret storage",
"secrets": {
"secret/admin": [
{
"data": {
"sub": "***"
},
"custom_metadata": {
"key": "value"
},
"version": 1,
"version_created_time": "2024-07-09T00:45:14.808418553Z",
"destroyed": false,
"deletion_time": "0001-01-01T00:00:00Z"
}
],
"secret/demo": [
{
"data": {
"foo": "***"
},
"custom_metadata": null,
"version": 1,
"version_created_time": "2024-07-09T00:45:14.743139124Z",
"destroyed": false,
"deletion_time": "0001-01-01T00:00:00Z"
}
],
"secret/sub/demo": [
{
"data": {
"demo": "****",
"password": "********",
"user": "****"
},
"custom_metadata": null,
"version": 1,
"version_created_time": "2024-07-09T00:45:14.868330798Z",
"destroyed": false,
"deletion_time": "0001-01-01T00:00:00Z"
}
],
"secret/sub/sub2/demo": [
{
"data": {
"foo": "***",
"password": "********",
"user": "****"
},
"custom_metadata": {
"admin": "false",
"key": "value"
},
"version": 1,
"version_created_time": "2024-07-09T00:45:14.927410345Z",
"destroyed": false,
"deletion_time": "0001-01-01T00:00:00Z"
},
{
"data": {
"foo": "***",
"password": "********",
"user": "****"
},
"custom_metadata": {
"admin": "false",
"key": "value"
},
"version": 2,
"version_created_time": "2024-07-09T00:45:14.986193205Z",
"destroyed": false,
"deletion_time": "0001-01-01T00:00:00Z"
}
]
}
}
Hello
Is there a way to export and then import the metadata ?
I see it in
base
andmarkdown
but don't see the metadata neither injson
nor inyaml
.Is it possible?