provide master password via stdin?

Is there any other way to provide the master password to the op command than via the prompt and typing?
I would like to experiment with two other uses:
1. storing my master password in ssh-agent
2. wrapping the op CLI in an emacs library to access protected data from within emacs. In order to do that, I need to prompt for, and provide the master password via non-TTY based mechanism.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • cohixcohix

    Team Member

    Hey @dcreemer! Those are some great ideas! I want to share some of our own and see what you think of them. The team is talking about a few different ways that we could store a session token to have instances of the CLI work without having to enter it every time. We were thinking of allowing the session token (NOT the Master Password) to be stored in an environment variable or file on the disk. That way, you could (for example) type op login agilebits --save on your command line once, and then other instances (such as the emacs client you thought up) would have access to that session token until it expires. How does that sound?

  • @cohix that sounds workable, if not ideal. Curious -- any reason not to add an option to read the master password from stdin?

  • rickfillionrickfillion Junior Member

    Team Member

    I don't think we're opposed to that idea, we'll just need to think about it some more.

    Rick

  • awesome -- thanks!

  • svondutchsvondutch

    Team Member
    edited July 2017

    @dcreemer Yes, you can pipe your master password from Stdin to op login.

    If you do not pipe it, then op login will read your master password from /dev/tty.

  • Thanks -- this solves all of my issues!

  • rickfillionrickfillion Junior Member

    Team Member

    :)

This discussion has been closed.