Git Product home page Git Product logo

tmux-1password's Issues

Support 1pass

One limitation of the 1Password CLI is that it is DAMN SLOW, as it requires an internet connection to fetch data from your vaults. Also, it uses tokens that expire after 30 minutes.

There is another project called 1pass, which is (according to the README) a caching wrapper for the 1Password CLI.

It would be nice to add support for this wrapper, as it would improve the experience of this plugin, while preserving the support for the official op CLI.

We could have an adapter for each CLI, and the user can configure which adapter to use.

Didn't work without customisation.

Hello, I've installed this awesome plugin and it didn't work straight away. Needed two tweaks.

At first it was loading only items from "Logins" category, which was not very useful because I keep server passwords used in CLI in "Servers" category. This was solved with
set -g @1password-enabled-url-filter 'off'
and
set -g @1password-items-jq-filter '.[] | [select(.overview.tags | map(select(. == "server")) | length == 1)?] | map([ .overview.title, .uuid ] | join(",")) | .[]'

Then it was fetching the items correctly, but it could not get any passwords, so I had to tweak the jq filter used to get the password value and change it to ".details.sections[].fields[]|select (.n == \"password\").v"

After those two changes it works.

Would you be ok with a fork for lastpass?

I may not get around to it, but I love the look and idea of this plugin, and it doesn't look too difficult to port to use lastpass instead of onepass. May even be possible to create a generic version that just needs commands plugged in!

Would you be happy with this being done?

Fails to fetch the items

Hey, I didn't manage to launch it with my 1password config, it seems that it crashes with session error, but I am pretty sure that I have op cli session running through CLI.

The question is how do I debug it to provide more info?
I have looked into the source and .op_tmux_token_tmp was empty, but situation didn't change after I filled it with a session from op cli manually.

I have a suspicion that JQ fails to parse the output.
kapture 2018-10-21 at 12 51 27

Can't get any password

I'm trying to get this plugin to work. I've installed it with tpm and have checked that I've already fzf and jq installed. Also, I have the op cli tool installed and configured (I use it on my shell)

But, everytime I type prefix + u I can't see any password (only an empty list). Also, every time I use the command I need to login again.

Can anyone help me?

Sign in failed due to "Deprecated API"

I'm using op version 0.4, while the latest version is currently 0.5.5. When trying to initiate the plugin and after entering the master password, I'm getting:

tmux-1password: 1Password CLI signin has failed

Running $ op signin my to troubleshoot the issue have resulted in the following error:

$ op signin my
Enter the password for user *********** at my.1password.com:
[LOG] 2019/03/13 14:14:54 (ERROR) 445: Deprecated API. Update to the latest version.

And updating op does solve the issue.

Possible solutions

  • Add a "Troubleshoot" section to the README explaining running op signin my and checking the output.
  • Detect that kind of output and notify the user about upgrading op.

Items not displaying when containing multiple/no websites

It seems that entries only display when they contain a single website. Any entries without a website or multiple websites doesn't show. I can temporarily working around it by splitting out entries but 1Password will gripe about reused passwords and I'd ideally like to converge entries that should share.

Empty password field

I have a 1password entry that breaks main.sh's get_op_item_password(). The JQ_FILTER is setup to check if the item's details.password field exists otherwise find a field with the password designation.

I'm not sure how I this entry got into this state, but it has a details.password field (empty string). The actual password is in one of the fields objects.

op get item "<item uuid>" | jq .details --raw-output:

{
  "fields": [
    {
      "designation": "username",
      "id": ";opid=__0",
      "name": "username",
      "type": "T",
      "value": "[email protected]"
    },
    {
      "designation": "password",
      "id": ";opid=__1",
      "name": "password",
      "type": "P",
      "value": "secretpassword"
    },
    [...]
  ],
  "password": "",
  "passwordHistory": [
    {
      "time": 999999,
      "value": "oldsecretpassword"
    }
  ],
  [...]
}

How should this behave?

(And is this related to the passwordHistory field? I spot checked a few random other entries that work and the others don't have a passwordHistory.)

Add debug mode

The idea is to have a configuration variable, for example: @1password-debug, that when set to 'on', the plugin will:

  • Add some extra logging on events.
  • Does not exit immediately when an error is thrown.

Fetching only logins, not passwords

Hi!

I use 1Password to store SSH and GPG keys passwords too. I'm loving the tool, but it is currently only fetching login on websites.

There is any config I should activate to fetch passwords (those items where you store only the password, without any website and login associated to it) too?

Plugin not using $FZF_DEFAULT_OPTS

๐Ÿ˜ฐ Describe the bug

I've noticed that the plugin only uses $FZF_DEFAULT_OPTS environment variables if it is a string.

๐Ÿง How to reproduce

For example, if I use the following:

export FZF_DEFAULT_OPTS="\
  --ansi \
  --cycle \
  --layout reverse \
  --height 20 \
  --preview '(highlight -O ansi -l {} 2> /dev/null || bat --style=numbers --color=always {} || cat {} || tree -C {}) 2> /dev/null | head -200' \
  --preview-window right:70%:noborder \
  --bind='?:toggle-preview' \
  --bind='tab:down'"

It shows my items in a reverse list with FZF. But, if I change to the following:

export FZF_DEFAULT_OPTS=(
  --ansi
  --cycle
  --layout='reverse'
  --height='20'
  --preview="'(highlight -O ansi -l {} 2> /dev/null || bat --style=numbers --color=always {} || cat {} || tree -C {}) 2> /dev/null | head -200'"
  --preview-window='right:70%:noborder'
  --bind='?:toggle-preview'
  --bind='tab:down'
)

It just stop working, showing a non-reverse list ignoring my other options.

๐ŸŽ‰ Expected behavior

Using () on $FZF_DEFAULT_OPTS should work accordingly as if it were a string.

New sign-in required on every single use

Information

Tmux version: 3.2
1Password CLI version: 2.12.0
Operating system: macOS Catalina 10.15.7 running with iTerm2 or Terminal

Description

Current behavior: On every use of the plugin (prefix + u), the modal dialog pops up 1password is trying to authorize CLI access. You must click to proceed.

Expected behavior: Requesting a password within 10 minutes of the last activity shouldn't force you to reauthorize the CLI.

For me, after opening another window or pane in tmux, reauthorization is immediately required the first time op is used in that tab, including with the plugin. In the same shell/window/pane or a subshell, it is not required for at least 10 minutes.

The developer's guide documents that opening a new terminal will always require reauthorization, but opening a subshell will not. It is not clear how this applies to tmux, or if there is some tmux configuration issue on my side. It's not really usable like this though, since the dialog box requires a click and does not refocus on the terminal afterward, so you have to command-tab to get back.

I suspect this is because it's using a different TTY, and therefore, this might not be working correctly for anybody?

Steps to reproduce

  1. Authorize the CLI once by requesting a password with the plugin, or just typing op item list
  2. Use the plugin again, or manually open a new window/pane in tmux and type op item list
  3. Receive another authorization prompt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.