Part of the work for: https://fedorahosted.org/freeipa/ticket/3487
Part of the work for: https://fedorahosted.org/freeipa/ticket/3446