#7373 "An internal error has occurred" show up when trying to add a user to the Member User table in Vault.
Closed: fixed 6 years ago Opened 6 years ago by fbarreto.

Issue

An "an internal error has occurred" show up when trying to add a user to the Member User table in Vault.

Steps to Reproduce

  1. ipa-server-install --setup-kra
    In WebUI:
  2. Network Services -> Vault
  3. Add a user to "User Vaults"
  4. Select the vault
  5. Try to add a user to the table User in section "Members"

Actual behavior

The dialog "IPA Error 903: InternalError" shows up.

Expected behavior

It should succeed.

Version/Release/Distribution

Git master (last commit: cd660d1)

Additional info:

From the httpd log:

ipa: ERROR: non-public: AttributeError: 'dict' object has no attribute 'itervalues'
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipaserver/rpcserver.py", line 370, in wsgi_execute
    result = command(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 450, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 478, in __do_call
    ret= self.run(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipalib/frontend.py", line 800, in run
    return self.execute(*args, **options)
  File "/usr/lib/python3.6/site-packages/ipaserver/plugins/baseldap.py", line 1720, in execute
    *keys, **options)
  File "/usr/lib/python3.6/site-packages/ipaserver/plugins/vault.py", line 241, in post_callback
    forfail in failed.itervalues():
AttributeError: 'dict' object has no attribute 'itervalues'

I got this error when running the test_webui/test_vault.py::test_vault::test_member_owner_vault test suite.

A solution like this fix the problem:

diff --git a/ipaserver/plugins/vault.py b/ipaserver/plugins/vault.py
index d05a240c3..0ab4d3ed8 100644
--- a/ipaserver/plugins/vault.py
+++ b/ipaserver/plugins/vault.py
@@ -238,7 +238,7 @@ class VaultModMember(LDAPModMember):
         return super(VaultModMember, self).get_member_dns(**options)

     def post_callback(self, ldap, completed, failed, dn, entry_attrs, *keys, **options):
-        for fail in failed.itervalues():
+        for _service_name, fail in failed.items():
             fail['services'] = fail.pop('service', [])
         self.obj.get_container_attribute(entry_attrs, options)
         return completed, dn

Hello,
In step 4 , does it actually mean 'select the vault' ?
I am unable to reproduce this issue with ipa-server-4.5.4-8.el7
I added a user successfully in member section of the user vault, no internal error showed up
My test env is vncviewer 10.19.41.35:1 passwd is 'redhat'

@xdong
Hi,

In step 4 , does it actually mean 'select the vault' ?

yes, I updated the description. thanks.

The issue happens only in 4.6.x either CLI or WebUI

Metadata Update from @fbarreto:
- Issue assigned to fbarreto

6 years ago

Metadata Update from @fbarreto:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/1494

6 years ago

master:

  • c8ba9eb Fixing vault-add-member to be compatible with py3

ipa-4-6:

  • cf6aeae Fixing vault-add-member to be compatible with py3

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.6.3

6 years ago

Login to comment on this ticket.

Metadata