Story #3897

[SDKs] Clients can specify which auth config file to load.

Added by Tim Pierce over 6 years ago. Updated almost 5 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


The usual methods by which a client authenticates to Arvados are
  • $HOME/.config/arvados/settings.conf

Both methods stop being convenient when a given UNIX shell account is used to authenticate to more than a single Arvados account at a single Arvados instance with a single API token. Both methods are just plain useless when a single process uses multiple Arvados accounts/instances/tokens (e.g., arv-copy).

The Python SDK has a concept of a connection profile (API version, host, token, insecure flag). This concept should be extended to configuration files: the choice of which credentials/endpoint to use can be indicated by a path to a configuration file.

For example, these could be equivalent:

arv --auth-file ~/.config/arvados/foo.conf user current
arv --auth foo user current
  • Avoid the obvious command line parameter name --config for choosing a connection profile, despite the tempting ~/.config path convention. This causes confusion between configuration and authentication. (When the arv tool gets real configuration options, like default output format, visual editor, and auth profile, we'll want those configs to be orthogonal to authentication profiles.)
  • Avoid assuming there is only one auth profile per Arvados instance. In documentation, avoid directing users to make qr1hi.conf. Something like tom@qr1hi.conf makes it more clear what's happening.
  • Leave room for supporting a file format like yaml, and multiple auth profiles per config file. But for now, ~/.config/arvados/{string}.conf provides a decent amount of flexibility.

Related issues

Has duplicate Arvados - Feature #9070: arv-put to another clusterDuplicate04/27/2016

Has duplicate Arvados - Feature #3805: [SDKs] CLI supports ARVADOS_CONFIG variableDuplicate09/03/2014


#1 Updated by Tim Pierce over 6 years ago

  • Description updated (diff)

#2 Updated by Tom Clegg over 6 years ago

  • Subject changed from Clients can authenticate to multiple Arvados instances consistently to [SDKs] Clients can specify which auth config file to load.
  • Story points set to 0.5

#3 Updated by Tom Clegg over 6 years ago

  • Description updated (diff)

#4 Updated by Brett Smith almost 5 years ago

#3805 suggests an implementation based on an ARVADOS_CONFIG environment variable.

Also available in: Atom PDF