1Password / onepassword-sdk-go

https://developer.1password.com/docs/sdks/
MIT License
52 stars 5 forks source link

`SecretsAPI.Resolve` fails on document items #108

Open pgavlin opened 3 months ago

pgavlin commented 3 months ago

Scenario & Reproduction Steps

Run this program with an appropriate service token and attempt to fetch a document item

$ OP_SERVICE_ACCOUNT_TOKEN=... go run main.go "op://Test Vault/yaml/c.yaml"

Actual Behavior

The program logs an error:

2024/07/17 13:42:33 error resolving secret reference: the specified field cannot be found within the item
exit status 1

Expected Behavior

The program fetches the item's contents and exists successfully.

SDK version

v0.1.0-beta.11

Additional information

No response

MOmarMiraj commented 3 months ago

Hi @pgavlin,

This behavior isn't a bug, its currently not supported in the SDKs but we have this feature to support document item types on our short-term roadmap.

pgavlin commented 3 months ago

Thanks for the context. Is the roadmap publicly available?

pgavlin commented 3 months ago

(also--I might suggest a clearer error message--it's not clear from the message currently returned by the API that document items are not yet supported)

Marton6 commented 3 months ago

Thanks for the context. Is the roadmap publicly available?

The roadmap is not public at the moment.

also--I might suggest a clearer error message--

Thanks for the suggestion! We will work on further improving the error messages