lava-tool auth-add fails without the keyring passwd

Bug #917570 reported by Deepti B. Kalakeri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Tool
Fix Released
High
Unassigned

Bug Description

lava-tool auth-add does not work on the ec2 instances when the keyring passwd is not specified.
The error is given below:

lava-tool auth-add --token-file token_file_for_ciadmin http://<email address hidden>/lava-server/RPC2/
Please input your password for the keyring
Password:
Wrong password for the keyring.
Traceback (most recent call last):
  File "/usr/bin/lava-tool", line 9, in <module>
    load_entry_point('lava-tool==0.2', 'console_scripts', 'lava-tool')()
  File "/usr/lib/pymodules/python2.6/lava_tool/dispatcher.py", line 85, in main
    run_with_dispatcher_class(LavaDispatcher)
  File "/usr/lib/pymodules/python2.6/lava_tool/dispatcher.py", line 81, in run_with_dispatcher_class
    raise SystemExit(cls().dispatch())
  File "/usr/lib/pymodules/python2.6/lava_tool/dispatcher.py", line 74, in dispatch
    return command.invoke()
  File "/usr/lib/pymodules/python2.6/lava_tool/commands/auth.py", line 125, in invoke
    self.auth_backend.add_token(username, userless_uri, token)
  File "/usr/lib/pymodules/python2.6/lava_tool/authtoken.py", line 41, in add_token
    "lava-tool-%s" % endpoint_url, username, token)
  File "/usr/lib/pymodules/python2.6/keyring/core.py", line 33, in set_password
    return _keyring_backend.set_password(service_name, username, password)
  File "/usr/lib/pymodules/python2.6/keyring/backend.py", line 196, in set_password
    password_encrypted = self.encrypt(password)
  File "/usr/lib/pymodules/python2.6/keyring/backend.py", line 344, in encrypt
    crypter = self._init_crypter()
  File "/usr/lib/pymodules/python2.6/keyring/backend.py", line 332, in _init_crypter
    raise ValueError("Wrong password")
ValueError: Wrong password

There is no passwd which is available that could be passed as keyring passwd.
I need lava-tool auth-add to work without asking for the keyring passwd.

Thanks!!!
Deepti.

Revision history for this message
Alexander Sack (asac) wrote :

14:30 < asac_> zyga: ok so guess keyringrc.cfg in cwd or ~ would do it with
14:31 < zyga> asac_, looking up the unencrypted backend name
14:30 < asac_> [backend]
14:31 < asac_> default-keyring=keyring.backend.UncryptedFileKeyring
...
14:32 < zyga> it will store the password in 'keyring_pass.cfg' as specified here https://bitbucket.org/kang/python-keyring-lib/src/a0e2e10bd1b4/keyring/backend.py#cl-331

Changed in lava-tool:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

I tried the work around mentioned above and the lava-tool add-auth works now.

Thanks!!!
Deepti

Changed in lava-tool:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.