The UserTracker does expect the userpassword to be included in the response. This particular attribute should be ignored.
Also, it doesn't count with the set of attributes that are created when the password is set.
Should we introduce a way how to 'ignore' certain attributes in the base class or is this issue specific to user plugin only? If the former, I think new ticket should be opened for the enhancement.
>>> u = ipatests.test_xmlrpc.test_user_plugin.UserTracker(u'foobar', sn=u'baz', givenname=u'fobar', userpassword=u'Secret123') >>> u <ipatests.test_xmlrpc.test_user_plugin.UserTracker object at 0x7f6190973650> >>> u.ensure_exists() Ran command: ipalib.plugins.user.user_add()(u'foobar', userpassword=u'Secret123', givenname=u'fobar', sn=u'baz', version=u'2.155'): OK Traceback (most recent call last): File "<console>", line 1, in <module> File "/local/mkubik/freeipa/ipatests/test_xmlrpc/ldaptracker.py", line 170, in ensure_exists self.create(force=True) File "/local/mkubik/freeipa/ipatests/test_xmlrpc/ldaptracker.py", line 208, in create self.check_create(result) File "/local/mkubik/freeipa/ipatests/test_xmlrpc/test_user_plugin.py", line 1790, in check_create ), result) File "/local/mkubik/freeipa/ipatests/util.py", line 355, in assert_deepequal assert_deepequal(e_sub, g_sub, doc, stack + (key,)) File "/local/mkubik/freeipa/ipatests/util.py", line 349, in assert_deepequal doc, sorted(missing), sorted(extra), expected, got, stack AssertionError: assert_deepequal: dict keys mismatch. missing keys = ['userpassword'] extra keys = [u'krbextradata', u'krblastpwdchange', u'krbpasswordexpiration'] expected = {'dn': ipapython.dn.DN('uid=foobar,cn=users,cn=accounts,dc=ipa,dc=test'), 'has_keytab': False, 'displayname': [u'fobar baz'], 'cn': [u'fobar baz'], 'objectclass': [u'top', u'person', u'organizationalperson', u'inetorgperson', u'inetuser', u'posixaccount', u'krbprincipalaux', u'krbticketpolicyaux', u'ipaobject', u'ipasshuser', u'ipaSshGroupOfPubKeys', u'mepOriginEntry'], 'loginshell': [u'/bin/sh'], 'userpassword': [u'Secret123'], 'uidnumber': [Fuzzy('^\\d+$', (<type 'basestring'>,), None)], 'mepmanagedentry': [ipapython.dn.DN('cn=foobar,cn=groups,cn=accounts,dc=ipa,dc=test')], 'initials': [u'fb'], 'gidnumber': [Fuzzy('^\\d+$', (<type 'basestring'>,), None)], 'memberof_group': [u'ipausers'], 'has_password': False, 'ipauniqueid': [Fuzzy('^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', <type 'unicode'>, None)], 'homedirectory': [u'/home/foobar'], 'mail': [u'foobar@IPA.TEST'], 'gecos': [u'fobar baz'], 'krbprincipalname': [u'foobar@IPA.TEST'], 'givenname': [u'fobar'], 'sn': [u'baz'], 'uid': [u'foobar']} got = {u'memberof_group': (u'ipausers',), u'uid': (u'foobar',), u'has_keytab': True, u'has_password': True, u'homedirectory': (u'/home/foobar',), u'cn': (u'fobar baz',), u'loginshell': (u'/bin/sh',), u'uidnumber': (u'483200010',), u'krbextradata': ('\x00\x02\xfaF\x05Vroot/admin@IPA.TEST\x00',), u'mail': (u'foobar@ipa.test',), u'dn': u'uid=foobar,cn=users,cn=accounts,dc=ipa,dc=test', u'displayname': (u'fobar baz',), u'mepmanagedentry': (u'cn=foobar,cn=groups,cn=accounts,dc=ipa,dc=test',), u'ipauniqueid': (u'5336fe24-6386-11e5-af11-001a4a231379',), u'krbprincipalname': (u'foobar@IPA.TEST',), u'givenname': (u'fobar',), u'krbpasswordexpiration': (datetime.datetime(2015, 9, 25, 13, 7, 6),), u'objectclass': (u'ipaSshGroupOfPubKeys', u'ipaobject', u'mepOriginEntry', u'person', u'top', u'ipasshuser', u'inetorgperson', u'organizationalperson', u'krbticketpolicyaux', u'krbprincipalaux', u'inetuser', u'posixaccount'), u'gidnumber': (u'483200010',), u'gecos': (u'fobar baz',), u'sn': (u'baz',), u'krblastpwdchange': (datetime.datetime(2015, 9, 25, 13, 7, 6),), u'initials': (u'fb',)} path = ('result',)
Metadata Update from @mkubik: - Issue assigned to someone - Issue set to the milestone: FreeIPA 4.5 backlog