tsafe-agent.1 - safe - password protected secret keeper
 (HTM) git clone git://git.z3bra.org/safe.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tsafe-agent.1 (1784B)
       ---
            1 .Dd 2019-06-08
            2 .Dt SAFE-AGENT 1
            3 .Os POSIX.1-2017
            4 .Sh NAME
            5 .Nm safe-agent
            6 .Nd decryption key agent
            7 .Sh SYNOPSIS
            8 .Nm
            9 .Op Fl hdv
           10 .Op Fl t Ar timeout
           11 .Op Fl f Ar socket
           12 .Sh DESCRIPTION
           13 .Nm
           14 can retain a derivated key and its salt in memroy, and send it over a
           15 UNIX-domain socket to whichever process can read this socket.
           16 .Pp
           17 Pushing a key and its salt is done by writing them to the socket. The
           18 retained key can be instantly forgotten by sending signal
           19 .Ar SIGUSR1 or SIGALRM
           20 to the running agent.
           21 .El
           22 .Bl -tag -width Ds
           23 .It Fl h
           24 Print a quick usage text.
           25 .It Fl d
           26 Do not detach the process from the controlling terminal.
           27 .It Fl v
           28 Turn on verbose mode.
           29 .Nm
           30 will print debugging messages to stderr. This is useful to troubleshoot
           31 connection issues between the agent and the client.
           32 .It Fl t Ar timeout
           33 Retain the key for
           34 .Ar timeout
           35 seconds. This will setup an
           36 .Xr alarm 2
           37 timer, which make the agent forget the key after the timeout.
           38 .It Fl f Ar socket
           39 Bind agent to
           40 .Ar socket
           41 UNIX-domain socket.
           42 (default: /tmp/safe-XXXXXX/agent.ppid)
           43 .Pp
           44 The agent prints will print commands (
           45 .Xr sh 1 )
           46 to stdout, that can be evaluated by the calling shell for exportation
           47 to the environment.
           48 .Pp
           49 Later calls to
           50 .Xr safe 1
           51 will use these environment variables internally to retrieve the key and
           52 use it to encrypt/decrypt the stored secrets.
           53 .Sh EXAMPLES
           54 Retrieve a secret from your safe, using the agent
           55 .Bd -literal
           56   $ eval $(safe-agent)
           57   $ safe -r
           58   password:
           59   $ safe secret/file > kitten.gif
           60 .Ed
           61 .Sh ENVIRONMENT
           62 .Bl -tag -width "SAFE_SOCK"
           63 .It Ev SAFE_PID
           64 Stores the PID of the currently running agent.
           65 .It Ev SAFE_SOCK
           66 Stores the path to the UNIX-domain socket used to communicate with
           67 the agent.
           68 .El
           69 .Sh SEE ALSO
           70 .Xr safe 1
           71 .Xr safe-store 5
           72 .Sh AUTHORS
           73 .An Willy Goiffon Aq Mt dev@z3bra.org
           74