#6047 Commands vault-* cause internal error (KeyError: 'ipavaultsalt')
Closed: Fixed None Opened 3 years ago by mbasti.

$ ipa vault-add testv
Password:
ipa: ERROR: non-public: KeyError: 'ipavaultsalt'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 137, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 475, in __do_call
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1199, in run
    return self.forward(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/vault.py", line 336, in forward
    self.api.Command.vault_archive(*args, **opts)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 475, in __do_call
    ret = self.run(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 1199, in run
    return self.forward(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/vault.py", line 684, in forward
    salt = vault['ipavaultsalt'][0]
KeyError: 'ipavaultsalt'
ipa: ERROR: an internal error has occurred

regression caused by 327d952

Variable vault_type is not initialized in vault_add, thus salt is not generated for symmetric vault. Default value for vault_type should be 'symmetric'

master:

  • a1a7ecd vault-add: set the default vault type on the client side if none was given

Metadata Update from @mbasti:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.4.1

2 years ago

Login to comment on this ticket.

Metadata