provide master password via stdin?

Options
dcreemer
dcreemer
Community Member

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

  • cohix
    cohix
    1Password Alumni
    Options

    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?

  • dcreemer
    dcreemer
    Community Member
    Options

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

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

    Rick

  • dcreemer
    dcreemer
    Community Member
    Options

    awesome -- thanks!

  • svondutch
    svondutch
    1Password Alumni
    edited July 2017
    Options

    @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.

  • dcreemer
    dcreemer
    Community Member
    Options

    Thanks -- this solves all of my issues!

  • :)

This discussion has been closed.