vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Vorta doesn't leverage environment variables (bash on macos)

Open paxperscientiam opened this issue 3 years ago • 5 comments

Well, I had a tidy issue report all ready to go, but then I accidentally closed the tab.

In summary ...

  • OS: macos Monterey
  • local borg version: 1.2.1
  • remote borg version: 1.2.1
  • remote server: rsync.net
  • borg works just fine (init, create, list, etc) when used directly

Issue: vorta does not appear to read the shell variables BORG_PASSCOMMAND and BORG_REMOTE_PATH.

I was able to determine that vorta creates it's on entry in Keychain, but gives no option to point to an existing entry. Once I added the passphrase to vorta's automatically created entry in Keychain, vorta was able to autofill the passphrase when trying to add an existing repo.

Still, the issue is that I'd prefer that vorta leverage the shell environment variables so that it doesn't need to store my passphrase.

Is vorta supposed to be able to read environment variables on macos? If so, where does it look? My variables are stored in ~/.bash_profile.

EDIT:

Vorta log indicates execution of "vorta.exe", which seems strange on macos. Is it actually calling vorta-darwin?

Thanks.

paxperscientiam avatar Aug 13 '22 22:08 paxperscientiam

You can set those options as arguments under Shell commands. E.g. --remote-path. We don't pass through env vars or ready any shell files.

vorta.exe is the binary produced by PyInstaller.

m3nu avatar Aug 14 '22 04:08 m3nu

Unfortunately, I forgot to mention my knowledge of the parameters passing options in my rewrite of this issue.

Now, I assume you're referring to the "Extra Borg Arguments" field in the repo config modal, right?

If so, I don't believe there's a corresponding borg parameter for BORG_PASSCOMMAND.

For the "pre-backup" field under the "schedule" tab, I tried adding this: export BORG_PASSCOMMAND="security find-generic-password -a $USER -s borg-passphrase -w" but this does not work.

With all that said, I cannot add an existing repo without adding a passphrase to the passphrase field.

So, in short, is there actually a way to get vorta to read environment variables or to otherwise use it without having to provide the application with a passphrase?

paxperscientiam avatar Aug 14 '22 22:08 paxperscientiam

So, in short, is there actually a way to get vorta to read environment variables or to otherwise use it without having to provide the application with a passphrase?

Currently not. Why do you need that?

real-yfprojects avatar Aug 15 '22 06:08 real-yfprojects

What is this code about if environment variables aren't read?

https://github.com/borgbase/vorta/blob/b6a24debb78b953117a3f637db18942f370a4b85/src/vorta/borg/borg_job.py#L89-L96

Currently not. Why do you need that?

To avoid sharing secrets with Vorta. Simple as that.

paxperscientiam avatar Aug 21 '22 20:08 paxperscientiam

What is this code about if environment variables aren't read?

https://github.com/borgbase/vorta/blob/b6a24debb78b953117a3f637db18942f370a4b85/src/vorta/borg/borg_job.py#L89-L96

It sets the environment variables for the borg process which runs in a separate environment.

Currently not. Why do you need that?

To avoid sharing secrets with Vorta. Simple as that.

This, on its own, doesn't sound very reasonable to me since vorta stores the passwords in the system password storage, which can be configured as you want. You can even use a custom password storage as your system password manager. (maybe not on MacOS, but on certainly on linux) In fact on MacOS vorta uses the security utility you want to use as a password provider.

real-yfprojects avatar Aug 22 '22 07:08 real-yfprojects

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 28 '22 23:10 stale[bot]