Please allow user to override location of session information rather than stick it in TMPDIR (CLI)

gmsharky
gmsharky
Community Member

Currently the op tool uses $TMPDIR to work out where to store its com.agilebits.op.0 session directories. The trouble is $TMPDIR on a Mac is very different from Linux - on a mac its usually /var/folders/ax/afnkjngskjdngsdg/..... and on Linux its usually /tmp/ -

This causes a problem when using docker on mac to run stuff which might need to use the login information stored in this directory. For example, we often use docker to run ansible, and to use ansible2.6 onepassword lookup plugin, which requires the user to already be logged in. Unfortunately because TMPDIRs are different between host and docker container, the container always believes it is not logged in, and mapping /var/folders/ax/afnk.... to /tmp/ is a bit of an unpleasant workaround to handle this.

What would be ideal is if the cli supports an environment var - say OP_SESSION_DIR or something, which lets the user define where they want to store their session details, rather than assuming to always use TMPDIR. Seems it would be an easy fix and get around a lot of mapping containerised cases like this one, where the user could log in once on the host, and do lots of docker work using their host credentials.

Thanks for the great CLI tool though


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

Comments

  • We'll have to think about that. Thanks for the feedback.

    Rick

  • jpgoldberg
    jpgoldberg
    1Password Alumni

    hi @gmsharky,

    Can you elaborate on why the current behavior is causing difficulties for you? In particular, why do you need the sessions to be in the "same place" across Linux and macOS? Is Docker inheriting a TMPDIR value from the host? Are you trying to copy/move session data from host to host?

    Thanks.

This discussion has been closed.