tabcmd icon indicating copy to clipboard operation
tabcmd copied to clipboard

Provide `--token-file` option analogous to `--password-file`

Open septatrix opened this issue 3 years ago • 3 comments

This way they too do not have to be typed in the command prompt but can be put in files with proper access controls.

septatrix avatar Sep 07 '22 15:09 septatrix

Also maybe make the location configurable where tableau_auth.json is stored. Apart from the fact that it should be in ~/.cache or maybe ~/.local/state on linux according to the XDG Base Directory Specification it should definitely not be world readable as it apparently contains the raw token!

septatrix avatar Sep 07 '22 17:09 septatrix

Yes, good suggestions. The json file shouldn't contain any tokens any more: it should really just be a config file. Configurable location seems like a nice option too.

I have been using --password-file to pass in a token or password, but it causes pretty complex login logic when trying to guess which one the user thinks they are using, so I'll probably add --token-file in the next update (which will also include logic to use the OS username if no username is given).

jacalata avatar Oct 18 '22 20:10 jacalata

(this is not yet done for 2.0.7)

jacalata avatar Nov 11 '22 01:11 jacalata

example usage: python -m tabcmd login --server https://tableau.net/ --site tabcmd --token-name jac --token-file jac.txt

jacalata avatar May 13 '24 20:05 jacalata