1Password / shell-plugins

Seamless authentication for every tool in your terminal.
https://developer.1password.com/docs/cli/shell-plugins/
MIT License
519 stars 170 forks source link

Searching for existing 1p credentials is unclear and limited #385

Closed deinspanjer closed 11 months ago

deinspanjer commented 1 year ago

op CLI version

2.19.0-beta.01

Goal or desired behavior

I tried getting started with the AWS plugin, but discovered it doesn't currently support accounts that use SSO credentials, so I switched to playing with the PostgreSQL plugin.

I have several databases saved in 1Password as Database category items. I expected to be able to point at one of those and configure the plugin to use it.

When I tried to op plugin init psql I was frustrated that the option to Search 1Password was not showing any of them.

I can understand the need to allow plugins to define the specific fields they need, but it feels like a miss to have this built in Database type that I've been pushing users to rely on and then if we want to use the cli plugin, we have to create duplicate entries for all of them.

Current behavior

I went ahead and imported a new credential and went to look at it in the 1Password UI and discovered that the item was created with the category type API Credential. Further, the information stored used different field names from the names used in the built in Database type.

As I started digging in the code, at first I thought that it was a simple naming mistake since the plugin defined a credential type of Database Credential but the built in 1Password category was Database. Then I realized that the cli sdk doesn't seem to use any built in types other than API Credential and it is doing some behind the scenes stuff to make each one have the desired fields the plugin wants for its credentials.

Relevant log output

No response

deinspanjer commented 11 months ago

This has been improved in the later versions.