ipalib.config: Only convert basedn to DN

The current code would convert values to DN if the key was
a substring of 'basedn', e.g. 'base' or 'sed'.

Only convert if we're actually dealing with 'basedn'.

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
ipalib.config: Don't autoconvert values to float

When api.env is loaded, strings that "look like" floats got
auto-converted to floats.
This is wrong, as the conversion to float can lose precision.
Case in point: the api_version (e.g. '2.88') should never be
interpreted as float.

Do not automatically convert to float.

We have two numeric options: startup_timeout and wait_for_dns.
wait_for_dns is already converted to int when used in the code.
Convert startup_timeout to float explicitly when used, so
configuration that specified it with a decimal point continues
to work.

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
webui: move RPC result extraction logic to Adapter

It enables declarative extraction of values from partial
results of a batch commands and also further extensibility
in custom adapters.

The default adapter has detection logic for this extraction so
it can use bare record or extract data from normal or batch RPC
command.

Minor change of user plugin fixed:
https://fedorahosted.org/freeipa/ticket/4355

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
webui: expose krbprincipalexpiration

https://fedorahosted.org/freeipa/ticket/3306

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
sudorule: PEP8 fixes in sudorule.py
sudorule: Allow using hostmasks for setting allowed hosts
sudorule: Allow using external groups as groups of runAsUsers
sudorule: Make sure sudoRunAsGroup is dereferencing the correct attribute
sudorule: Include externalhost and ipasudorunasextgroup in the list of default attributes
sudorule: Allow adding deny commands when command category set to ALL
sudorule: Make sure all the relevant attributes are checked when setting category to ALL
sudorule: Fix the order of the parameters to have less chaotic output
sudorule: Enforce category ALL checks on dirsrv level
ipatests: test_sudo: Add tests for allowing hosts via hostmasks
ipatests: test_sudo: Add coverage for external entries

Covers functionality of external entries for:
* users
* runAsUsers
* groups of RunAsUsers
* runAsGroups
ipatests: test_sudo: Add coverage for category ALL validation

Makes sure sudorules behave correctly both when adding new entries
with corresponding category set to ALL, and when setting the
category to all when corresponding entries exist.

The only exception of deny commands with cmdcategory ALL is
covered as well.
ipatests: test_sudo: Fix assertions not assuming runasgroupcat set to ALL
ipatests: test_sudo: Do not expect enumeration of runasuser groups
ipatests: test_sudo: Expect root listed out if no RunAsUser available
sudorule: Refactor add and remove external_post_callback