Closed eweitz closed 5 years ago
is it desirable for a bare "python manage_study.py" command to trigger the gcloud authentication process?
That historical handling seems convenient and secure, but perhaps it could be improved.
As noted in scp_api.py, it'd be nice if credentials could be read from a file. Perhaps the file could the value of the GOOGLE_APPLICATION_CREDENTIALS
environment variable or a new one like SCP_APPLICATION_CREDENTIALS
. That might be a better default, e.g. the first place we look when processing a manage_study.py
command that lacks the --token
argument.
Since none of the gcloud auth
methods write to GOOGLE_APPLICATION_CREDENTIALS
anymore, this seems unlikely. We'd have to do it ourselves as part of this codebase. gcloud
say to use gcloud auth print-access-token
for accessing tokens.
This generally improves UX for our public CLI,
manage_study.py
. These changes will:verbose
option to the CLI, for less default chattinessI've tested them locally. See #77 for related work.
This satisfies SCP-1894.