#7597 IPA: IDM drops all custom attributes when moving account from preserved to stage
Closed: fixed by abbra. Opened by frenaud.

Ticket was cloned from Red Hat Bugzilla: Bug 1583950

Please note that this Bug is private and may not be accessible as it contains confidential Red Hat customer information.

Description of problem:
When moving an IPA user from preserved to stage, all custom attributes attached
to that account are dropped.
Version-Release number of selected component (if applicable):
ipa-server-4.5.4-10.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1) Add a user to IDM stage by running the following command:
   $ ipa stageuser-add <loginID> --random --first=xxx --last=xxx --cn=xxx
--displayname=xxx --initials=xxx --homedir=xxx --gecos=xxx --shell=xxx
--email=xxx --title=xxx --employeenumber=xxx --manager=xxx --street=xxx
--city=xxx --state=xxx --postalcode=xxx --emmployeetype=xxx
*--addattr=dtsUniqueID=xxx
--addattr=mailAlternateAddress=xxx --addattr=mailAlternateAddress=xxx
--addattr=apple-generateduid=xxxxxxxx --addattr=nickName=xxxxx*
As per above some custom attributes are added to the IDM account.
2) Activate the user:
   $ ipa stageuser-activate <loginID>
3) Deactivate the account by:
   $ ipa user-del <loginID> --preserve
  * So far all attributes including custom attribute still show on the account.
    Same can be confirmed  with  ldapsearch.*
4) When we  activate the account again. Move the account to stage and check
   its attributes. The custom attributes will not be present.
   $ ipa user-stage <loginID>
   $ ipa stageuser-show <loginID> --all
Actual results:
IDM drops all custom attributes when moving account from preserved to stage
Expected results:
We expect to keep all custom attributes.
Additional info:

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1583950

Metadata Update from @frenaud:
- Issue assigned to frenaud

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/3448
- Issue set to the milestone: FreeIPA 4.6.6 (was: FreeIPA 4.6.5)

master:

  • 27baf3501389cc3c8a12e06686da13a874d3f9da user-stage: transfer all attributes from preserved to stage user
  • 8ebbb271a556ace5d1f68c404a786aef6d56ba97 xmlrpc test: add test for preserved > stage user

ipa-4-8:

  • 317787bcead88c8b8431763af2b31b16e9c5b5fc user-stage: transfer all attributes from preserved to stage user
  • 17b97ae1a6c78041f380cf451b0181dec416572e xmlrpc test: add test for preserved > stage user

ipa-4-7:

  • 3eeaf22f29a2a97637b993808d4a0663b4df7f8d user-stage: transfer all attributes from preserved to stage user
  • 04fff58f2df8882543ac6a975c7983f5f9fdb23b xmlrpc test: add test for preserved > stage user

ipa-4-6:

  • 6a9f1c802bb28fde8e1d9f38673e554ef23e5620 user-stage: transfer all attributes from preserved to stage user
  • 5ab31a9c3b16536b02416c6b996aec2c1f3ba962 xmlrpc test: add test for preserved > stage user

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

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.6.7 (was: FreeIPA 4.6.6)

Metadata Update from @frenaud:
- Custom field test_case adjusted to ipatests/test_xmlrpc/test_stageuser_plugin.py::TestCustomAttr

Metadata