Commit Graph

9340 Commits

Author SHA1 Message Date
Martin Babinsky
62bb478e11 specify type of exceeded limit when warning about truncated search results
API commands inheriting from LDAPSearch should mention which limit was
exceeded in the warning message sent with truncated results.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:52:22 +02:00
Martin Babinsky
1f0959735f differentiate between limit types when LDAP search exceeds configured limits
When LDAP search fails on exceeded limits, we should raise an specific
exception for the type of limit raised (size, time, administrative) so that
the consumer can distinguish between e.g. searches returning too many entries
and those timing out.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:52:22 +02:00
Martin Basti
b23ad42269 host-del --updatedns: print warnings instead of error
When DNS records do not exist, print warnings instead of hard error

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:47:53 +02:00
Martin Basti
54e3859595 host_del: update help for --updatedns option
Clarify that dns removes only A, AAAA, PTR, SSHFP records of the host(s) managed by IPA DNS.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Martin Basti
e8c8134eee host_del: remove only A, AAAA, SSHFP, PTR records
only A, AAAA, SSHPF and PTR records are managed by IPA. The other
records should be removed by user.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Martin Basti
1e70d6b914 host_del: split removing A/AAAA and PTR records to separate functions
This change is needed because A/AAAA and PTR record will be handled
separately.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Martin Basti
bea066c336 host_del: remove unneeded dnszone-show command call
This command has no effect in that block of code, dnsrecord_show is
enough for detection if records exists.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Martin Basti
9a0f92be0d host_del: replace dns-record find command with show
Due the configuration of dnsrecord_find, it works as dnsrecord-show,
thus it can be replaced.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Martin Basti
40e3a0bf63 host_del: fix removal of host records
Originally only the first A/AAAA record is removed, and one other record. This commit fixes it
and all records are removed.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-04-13 17:44:56 +02:00
Oleg Fayans
280f1ed85f Fixed a failure in legacy_client tests
https://fedorahosted.org/freeipa/ticket/5800

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-04-13 16:05:12 +02:00
Martin Basti
d9fe502e83 Add missing pre_common_callback to stageuser_add
This pre_callback contains method to preprocessing usercertificate that
was not called during stageuser-add. This commit adds missing
pre_common_callback call to stageuser_add.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-04-12 10:09:12 +02:00
Oleg Fayans
ab3b4a92a8 Added 5 more tests to Replica Promotion testsuite
The following testcases were automated:
1. Test one command replica installation
2. Test csreplica-manage-(del, connect, disconnect) are disabled in domain
level 1
3. Client enrollment and replica promotion by an unprivileged user are
prohibited
4. Replica uninstallation is prohibited if it disconnects a part of existing
topology (is possible only with --ignore-topology-disconnect option)
https://fedorahosted.org/freeipa/ticket/5723

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-04-06 16:02:55 +02:00
Oleg Fayans
f836ee7b9c Added a kdestroy call to clean ccache at master/client uninstallation
https://fedorahosted.org/freeipa/ticket/5741

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2016-04-06 15:59:22 +02:00
Filip Skola
49c015b2ed Refactor test_hostgroup_plugin
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-03-24 14:38:22 +01:00
Filip Skola
ab3f652dc1 Refactor test_nesting, create HostGroupTracker
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-03-24 14:36:55 +01:00
Martin Babinsky
7febe569ce otptoken-add: improve the robustness of QR code printing
The python-qrcode print_ascii() method does not work in terminals with
non-UTF-8 encoding. When this is the case do not render QR code but print a
warning instead. Also print a warning when the QR code size is greater that
terminal width if the output is a tty.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-24 14:35:19 +01:00
Oleg Fayans
2fa0952603 Fixed a bug with prepare_host failing upon existing ipatests folder
https://fedorahosted.org/freeipa/ticket/5748

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 17:19:21 +01:00
Oleg Fayans
7289ad16cb Reverted changes in mh fixture causing some tests to fail
Some integration tests expect the members of topology to have the testfolder.
The testfolder however was created during master and client installations. In
case the client is not intalled from the very beginning of the test execution,
the test would complain about missing testfolder.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 17:19:21 +01:00
David Kupka
03a697489a Look up HTTPD_USER's UID and GID during installation.
Those values differ among distributions and there is no guarantee that they're
reserved. It's better to look them up based on HTTPD_USER's name.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 17:15:25 +01:00
Martin Basti
ae5bf8291f Fix stageuser-activate - managers test
https://fedorahosted.org/freeipa/ticket/5481

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-23 16:38:26 +01:00
Milan Kubík
fddb74e22e spec file: rename the python-polib dependency name to python2-polib
Trying to install the package depending on python-polib breaks
when the system has newer (and renamed) version python2-polib.

*This patch is an workaround* for the issue described in [1].
If a renamed package's provides is equal to an older package's
name, dnf tries to install the older package.
When the newer package is in the system, this leads to a conflict.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1096506

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 14:46:00 +01:00
Timo Aaltonen
b793c9049e Fix kdc.conf.template to use ipaplatform.paths.
https://fedorahosted.org/freeipa/ticket/5343

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-23 13:35:29 +01:00
Timo Aaltonen
f761051411 Use ODS_USER/ODS_GROUP in opendnssec_conf.template
https://fedorahosted.org/freeipa/ticket/5343

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-23 13:32:55 +01:00
Timo Aaltonen
2a2d63669d ipaplatform: Move remaining user/group constants to ipaplatform.constants.
Use ipaplatform.constants in every corner instead of importing other bits or calling
some platform specific things, and remove most of the remaining hardcoded uid's.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-23 13:32:55 +01:00
Oleg Fayans
d58cd04e8a rewrite a misprocessed teardown_method method as a custom decorator
teardown_method is a standard pytest method used to put any code to be executed
after each test method is executed. While treated correctly by our integration
tests, this method is misinterpreted by in-tree tests in the following way:
in-tree tests try to execute it even if all the test methods are skipped due to
test resources being not configured. This causes the tests, that otherwise would
have been skipped, to fail

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 12:46:23 +01:00
Timo Aaltonen
5b32ffcd1a ipa_restore: Import only FQDN from ipalib.constants
https://fedorahosted.org/freeipa/ticket/5619

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-23 10:08:02 +01:00
Pavel Vomacka
e45f7314e1 Resize topology graph canvas according to window size
The size of svg element is calculated when the topology graph facet is load
and then every time when the window is resized. The resize event listener
is removed after the topology graph facet emits hide event.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-03-22 19:02:01 +01:00
Martin Basti
d1e29fe60e Fix: catch Exception instead of more specific exception types
Regression caused by commit 491447cc5a,
ValueErrori and AttributeError are too much specific for these cases, multiple types of
exception can be raised.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-03-22 17:33:02 +01:00
Oleg Fayans
c204290038 Added copyright info to replica promotion tests
https://fedorahosted.org/freeipa/ticket/5723

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-22 13:48:45 +01:00
Martin Babinsky
e7e1b8c58e ipa-replica-manage: print traceback on unexpected error when in verbose mode
Print the traceback to stdout to maintain backwards compatibility.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-22 13:01:37 +01:00
Christian Heimes
49be6c8d3c Move user/group constants for PKI and DS into ipaplatform
https://fedorahosted.org/freeipa/ticket/5619

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2016-03-22 10:40:44 +01:00
Martin Basti
4f25b29605 SPEC: do not run upgrade when ipa server is not installed
Running upgrade when IPA is not installed produces false positive errors

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-03-22 10:28:16 +01:00
Martin Basti
4a396dd68b Pylint: enable invalid-name check
This check can be enabled, there is no errors in current code, and
it should stay in that way.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
da0318d4d7 Pylint: remove unnecessary-semicolon
Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
b66028af18 Pylint: import max one module per line
Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
195e50b93b Pylint: use list comprehension instead of iteration
Iteration over indexes without calling enumeration fuction is not pythonic and should not be used.
In this case iteration can be replaced by list comprehension.  Fixing this allows to enable
pylint consider-using-enumerate check.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
d46cd5d956 Pylint: enable reimported check
Fixes current reimports and enables pylint check for them

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
5add0f94cf Pylint: enable pointless-except check
This check can be enabled, there is no errors in current code, and it
should stay in that way.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
e93e89e1ae Pylint: fix definition of global variables
Global variables should be defined in the outer space, not just marked
as global inside functions.

Removes unused global variables

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Basti
491447cc5a pylint: remove bare except
Bare except should not be used.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2016-03-22 10:20:51 +01:00
Martin Babinsky
aa74995736 spec: require python-cryptography newer than 0.9
When generating keys for custodia service, the key material is stored in
python-cryptography's OpenSSL backend encoded as DER. This only works in
python-cryptography 0.9 and newer so we need to make sure this version pulled
in during RPM build and install.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-21 17:53:25 +01:00
Thierry Bordaz
e1bbd90360 DS deadlock when memberof scopes topology plugin updates
Topology plugin may merge (aka DEL) segments that would trigger
internal search for groups owning that segment. The problem
is that it is searching those groups into the full suffix and
so need the schema compat map lock.

If any other operation holding schema compat map lock need to
access the page involved in the DEL, there is a deadlock.

This fix is to prevent useless group searching if the target entry
is a segment or is in compat tree.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-18 13:25:08 +01:00
Jakub Hrozek
c6371abeb3 sudo: Fix a typo in the --help output of sudocmdgroup
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-18 12:38:42 +01:00
Martin Babinsky
3ab63fa6ba spec: add conflict with bind-chroot to freeipa-server-dns
https://fedorahosted.org/freeipa/ticket/5696

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-18 09:32:47 +01:00
Martin Basti
04d4519ed5 client: enable ChallengeResponseAuthentication in sshd_config
In order to enable SSSD smart prompting and allow it to ask for 1FA and
2FA separately, ChallengeResponseAuthentication should be set to yes.
This change will enable better processing of the 2FA value and it will
also enable other features, like allow SSSD to make the 2FA option in
some cases and have a way of informing user that 2FA is optional.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-18 09:21:58 +01:00
Martin Basti
d6f03da753 spec: Add missing dependencies to python*-ipalib package
Standalone instalation of python*-ipalib packages does not pull all
required packages and results into import errors.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-18 07:16:39 +01:00
Martin Basti
de8c6d81fd Fix broken trust warnings
Warning should be shown only for parent entries of trust domain. Subdomains do not contain ipaNTSecurityIdentifier attribute at all.

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

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-03-16 13:50:56 +01:00
Jan Cholasta
54a59475f3 certdb: never use the -r option of certutil
The -r option makes certutil output certificates in DER. If there are
multiple certificates sharing the same nickname, certutil will output
them concatenated into a single blob. The blob is not a valid DER
anymore and causes failures further in the code.

Use the -a option instead to output the certificates in PEM and convert
them to DER on demand.

https://fedorahosted.org/freeipa/ticket/5117
https://fedorahosted.org/freeipa/ticket/5720

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-16 09:35:44 +01:00
Martin Basti
fb3a5d5a9c Use platform path constant for SSSD log dir
The path to SSSD log directory is platform specific and should be in
ipaplatform module.

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-16 09:31:02 +01:00
Martin Basti
0cb870e565 Remove redundant parameters from CS.cfg in dogtaginstance
Bind DN is not used for client certificate authentication so they can be
safely removed.

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

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-16 09:28:21 +01:00