1password-client icon indicating copy to clipboard operation
1password-client copied to clipboard

Cannot obtain secret fields with op 2.30.0 or later

Open csteinle opened this issue 1 year ago • 2 comments

Describe the bug Since 2.30.0 of the 1password CLI, the option --reveal is required to obtain passwords and other secret fields. See https://app-updates.agilebits.com/product_history/CLI2#v2300006

To Reproduce

from onepassword import OnePassword

op = OnePassword()

uuid = op.get_uuid("Item Name", vault="Vault Name")

token = op.get_item(uuid=uuid, fields="token")["token"]

print(token)
[use 'op item get <redacted> --reveal' to reveal]

Expected behavior Password or token retrieved

Screenshots N/A

Desktop (please complete the following information): op CLI version 2.30.0 or greater

Smartphone (please complete the following information): N/A

Additional context N/A

csteinle avatar Sep 06 '24 14:09 csteinle

We should update the README to mention that we try to support a fixed version of the cli, but yeah this looks like a backward incompatiblity. Any chance you can create a PR for this otherwise we will try to fix as soon as we can (might be some time) or just suggest people to downgrade op cli for now.

dtpryce avatar Sep 06 '24 14:09 dtpryce

I've submitted a PR (with some unit tests specifically for this change)

csteinle avatar Sep 06 '24 16:09 csteinle