Deal with linked files
Hello Team,
From the macOS app I've created a secret that stores a password and private files. Files are linked with the item using the "Add a new file" button.
Now, I am trying to retrieve these files from the CLI.
I though I could be able to get them playing with documents, but actually these files are not document :
$ op list documents --vault myvault
[]
So I've looked at items that seems more relevant :
$ op get item 7es2m2yr5bh2hpbkjz7tjpxbli --vault myvault
{
"uuid": "7es2m2yr5bh2hpbkjz7tjpxbli",
"templateUuid": "001",
"trashed": "N",
"createdAt": "2021-10-16T09:38:18Z",
"updatedAt": "2021-10-16T09:54:43Z",
"changerUuid": "KSQCVM7WXNEL7NH63HICSNPJL4",
"itemVersion": 7,
"vaultUuid": "lomdseaojjc7vhc4757piqmkti",
"details": {
"fields": [
{
"designation": "username",
"name": "username",
"type": "T",
"value": ""
},
{
"designation": "password",
"name": "password",
"type": "P",
"value": "xxxxxxxxx"
}
],
"notesPlain": "",
"passwordHistory": [],
"sections": [
{
"fields": [
{
"k": "reference",
"n": "141DEE586EE449F89D55FE39080E43D7",
"t": ""
}
],
"name": "linked items",
"title": "Éléments liés"
},
{
"fields": [
{
"k": "file",
"n": "4A6C13A5D4C04DD4A57AEB82260F31EA",
"t": "",
"v": {
"documentId": "bmfvpzsn5rhvvfgtmdlmsq5tqq",
"encryptedSize": 613807,
"encryptionKey": {
"alg": "A256GCM",
"kid": "5spq7fnwdfbwtj7omk74uz45fy",
"k": "MeeEoZmNaT6qf0eepibqhrvTJDsXSUoAIxPuB5UucOo",
"key_ops": [
"encrypt",
"decrypt"
],
"ext": true,
"kty": "oct"
},
"fileName": "ids.pdf",
"integrityHash": "azbZ4EdpostqPncrFVXO48_QrtMs-2ycRrscYMtzUxQ",
"nonce": "53iJZMj0G17AY0Om",
"signingKey": {
"alg": "A256GCM",
"kid": "QVIXC4Q5FNDJPBBS6A7AQ5BZQM",
"k": "dgKkZBojQpmjLdtcsDgmdVsZIHwqamkn-vEVkQLaM7c",
"key_ops": [
"encrypt",
"decrypt"
],
"ext": true,
"kty": "oct"
},
"unencryptedSize": 613791,
"uti": "com.adobe.pdf"
}
}
],
"name": "add more",
"title": ""
}
]
},
"overview": {
"ainfo": "—",
"ps": 0,
"title": "test"
}
}
Here I can see the file, but I am not able to get it from the CLI.
Of course, using the GUI I am able to retrieve it. But not using the CLI.
So my need is to retrieve files from item using the CLI.
Is there a way to do this ?
Thanks a lot.
Regards,
JD
1Password Version: 1.12.2
Extension Version: Not Provided
OS Version: macOS Big Sur
