Commit Graph

9158 Commits

Author SHA1 Message Date
Petr Viktorin
cec7df5c54 ipadiscovery: Decode to unicode in ipacheckldap(), get_ipa_basedn()
ipacheckldap uses a schema-less connection with decode_attrs=False,
so bytes need to be decoded manually.
This was not a problem in Python2 where bytes and unicode could
be mixed freely.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-03 10:31:55 +01:00
Petr Viktorin
8df86d5bff Move get_ipa_basedn from ipautil to ipadiscovery
The function wasn't used anywhere else.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-03-03 10:31:55 +01:00
Jan Cholasta
3c57c305ad ipalib: add convenient Command method for adding messages
Call the add_message() method of Command from anywhere in the implementation
of a command to add a message to the result of the command.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-03 10:06:18 +01:00
Jan Cholasta
e5520dc347 ipalib: provide per-call command context
Add context which is valid for the duration of command call. The context
is accessible using the `context` attribute of Command and Object plugins.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-03 10:06:18 +01:00
Thierry Bordaz
6851e560dd configure DNA plugin shared config entries to allow connection with GSSAPI
https://fedorahosted.org/freeipa/ticket/4026

When a replica needs to extend its DNA range, it selects the remote replica with the
larger available range. If there is no replica agreement to that remote replica,
the shared config entry needs to contain the connection method/protocol.
This fix requires 389-ds
 * https://fedorahosted.org/389/ticket/47779
 * https://fedorahosted.org/389/ticket/48362

That are both fixed in 1.3.4.6

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-03-02 16:43:17 +01:00
Oleg Fayans
cfbb7769a7 Removed messing around with resolv.conf
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-03-02 16:41:28 +01:00
Martin Basti
72d5499c5a pylint: supress false positive no-member errors
pylint 1.5 prints many false positive no-member errors which are
supressed by this commit.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-03-02 14:57:36 +01:00
Petr Vobornik
c68e9510d0 fix incorrect name of ipa-winsync-migrate command in help
Help and status text used incorrect name "ipa-migrate-winsync"

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-02 12:52:14 +01:00
Martin Basti
fcc540bbdc Fix connections to DS during installation
Regression caused by commit 9818e463f5,
admin_conn should be connected in method if there is no connection.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-03-02 10:39:43 +01:00
Petr Spacek
e9922c36b1 Fix URL for reporting bugs in strings
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-01 15:26:52 +01:00
Petr Vobornik
25c53ba3fe cookie parser: do not fail on cookie with empty value
https://fedorahosted.org/freeipa/ticket/5709

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-03-01 14:16:08 +01:00
Filip Skola
dd38602fa5 Refactor test_sudocmdgroup_plugin
Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
2016-03-01 13:50:32 +01:00
Filip Skola
007c360f85 Refactor test_sudocmd_plugin
Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
2016-03-01 13:50:32 +01:00
Martin Babinsky
276d16775a use LDAPS during standalone CA/KRA subsystem deployment
The deployment descriptor used during CA/KRA install was modified to use LDAPS
to communicate with DS backend. This will enable standalone CA/KRA
installation on top of hardened directory server configuration.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-01 13:44:09 +01:00
Petr Vobornik
02d3ea1062 advise: configure TLS in redhat_nss_pam_ldapd and redhat_nss_ldap plugins
authconfig in config_redhat_nss_ldap and config_redhat_nss_pam_ldapd got
new option --enableldaptls

It should have effect primarily on el5 systems.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-01 13:05:20 +01:00
Tomas Babej
271086ebdd spec: Bump required sssd version to 1.13.3-5
https://fedorahosted.org/freeipa/ticket/4403
https://fedorahosted.org/freeipa/ticket/4436

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-01 12:40:25 +01:00
Alexander Bokovoy
1353847e49 slapi-nis: update configuration to allow external members of IPA groups
Currently in an environment with trust to AD the compat tree does not
show AD users as members of IPA groups. The reason is that IPA groups
are read directly from the IPA DS tree and external groups are not
handled.

slapi-nis project has added support for it in 0.55, make sure we update
configuration for the group map if it exists and depend on 0.55 version.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-03-01 12:40:25 +01:00
Tomas Babej
b41fbceeaf ipa-adtrust-install: Allow dash in the NETBIOS name
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-29 15:46:06 +01:00
Martin Basti
8f01b47ed9 Make PTR records check optional for IPA installation
PTR records are not mandratory for IPA, result fo checks should be only
warning not hard error.

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

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2016-02-29 13:19:28 +01:00
Petr Viktorin
ec95ffaa52 Package python3-ipaclient
Part of the work for https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-29 08:28:50 +01:00
Timo Aaltonen
872d5903d0 Move freeipa certmonger helpers to libexecdir.
The scripts in this directory are simple python scripts, nothing arch-specific
in them. Having them under libexec would simplify the code a bit too, since
there would be no need to worry about lib vs lib64 (which also cause trouble
on Debian).

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-02-26 08:29:44 +01:00
David Kupka
4337c4f9c4 httpinstance: add start_tracking_certificates method
Configure certmonger to start tracking certificate for httpd.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-26 08:27:44 +01:00
David Kupka
431a1a0383 dsinstance: add start_tracking_certificates method
Configure certmonger to start tracing certificate for DS.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-26 08:27:44 +01:00
David Kupka
6b4678170e upgrade: Match whole pre/post command not just basename.
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-26 08:27:44 +01:00
Milan Kubík
b32c9d639e ipatests: extend permission plugin test with new expected output
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-25 16:31:15 +01:00
Martin Basti
bba2355631 fix permission: Read Replication Agreements
This permission cannot be MANAGED permission because it is located in
nonreplicating part of the LDAP tree.

As side effect, the particular ACI has not been created on all replicas.

This commit makes Read Replication Agreements non managed permission and
also fix missing ACI on replicas.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-25 14:30:01 +01:00
Martin Basti
5c33edcd11 Pylint: add missing attributes of errors to definitions
Attributes are added to IPA error objects dynamicaly and pylint is not
able to handle it itself. Add missing attributes to definitions in
pylint plugin.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-02-25 13:54:20 +01:00
Martin Basti
0d39abddc2 Remove duplicated except
Both exceptions have been catched before, so it is bacically dead code

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-02-25 13:48:44 +01:00
Martin Babinsky
94a836dd46 CI tests: use old schema when testing hostmask-based sudo rules
Newer versions of sssd use native IPA schema to process sudo rules.
However, this schema currently has no support for hostmask-based rules
and causes some sudo CI tests to fail. We have to temporarily set
sssd.conf to use ou=sudoers,$SUFFIX as a sudo rule search base when
executing them.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2016-02-25 13:37:16 +01:00
Martin Basti
a14d687493 Revert "test: Temporarily increase timeout in vault test."
This reverts commit 8112ac69cc.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-24 17:27:14 +01:00
Jan Cholasta
11592dde1b client: stop using /etc/pki/nssdb
Don't put any IPA certificates to /etc/pki/nssdb - IPA itself uses
/etc/ipa/nssdb and IPA CA certificates are provided to the system using
p11-kit. Remove leftovers on upgrade.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-02-24 10:53:28 +01:00
David Kupka
775ee77bcc CI: Make double circle topology python3 compatible
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-24 10:37:04 +01:00
Jan Cholasta
ef91346407 cacert install: fix trust chain validation
https://fedorahosted.org/freeipa/ticket/5612

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-24 09:22:59 +01:00
Stanislav Laznicka
d7efd8a33a Fixes minor issues
Fixes issues discovered by Coverity

plugins/baseldap.py:      possible undefined value in return
certmonger.py:            possible dereference of None value
i18n.py:                  fixed always True bug (+ cosmetic change)

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-24 09:21:30 +01:00
Stanislav Laznicka
9757384c7c Cosmetic changes to the code
Fixes some Coverity issues

ipadiscovery.py:          added assert should universe break
plugins/dns.py:           removed dead code
dnssec/ldapkeydb.py:      attribute assert in the proper object
test_automount_plugin.py: fixed possible close() on None
xmlrpc_test.py:           Coverity does not like accessing None.__class__

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-24 09:21:30 +01:00
Martin Basti
0accf8ccb6 fix upgrade: wait for proper DS socket after DS restart
DS restart executed by upgrade plugin causes that upgrade framework
is waiting for the improper socket. It leads to TimeoutError because
DS is not listening on 389 port during upgrade. This commit fixes the issue.

Required for: https://fedorahosted.org/freeipa/ticket/5665

Reviewed-By: Tomas Babej <tbabej@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-23 17:35:20 +01:00
Martin Basti
c96822f3e5 Warn user if trust is broken
Detect missing ipaNTSecurityIdentifier and print message for a user,
that the trust is broken as result of trust-show and trust-find commands.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-23 17:35:20 +01:00
Martin Basti
70bd7c8802 trusts: use ipaNTTrustPartner attribute to detect trust entries
Trust entries were found by presence of ipaNTSecurityIdentifier
attribute. Unfortunately this attribute might not be there due the bug.
As replacement for this, attribute ipaNTTrustPartner can be used.

Note: other non trust entries located in cn=trusts subtree can be
cross-realm principals.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-23 17:35:20 +01:00
Martin Basti
9818e463f5 upgrade: fix config of sidgen and extdom plugins
During upgrade to IPA 4.2, literally "$SUFFIX" value was added to
configuration of sidgen and extdom plugins. This cause that SID are not properly configured.

Upgrade must fix "$SUFFIX" to reals suffix DN, and run sidgen task
against IPA domain (if exists).

All trusts added when plugins configuration was broken must be re-added.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-23 17:35:20 +01:00
David Kupka
a1e582b33c CI: Add test for double-circle topology generator.
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-23 17:32:36 +01:00
David Kupka
a1d2ce00a6 CI: Add replication test utilizing double-circle topology.
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-23 17:32:36 +01:00
David Kupka
cbd9c3943a CI: Add double circle topology.
Every site consist of at least two replicas and is connected to two other
sites.

Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-23 17:32:36 +01:00
David Kupka
acdabba6ec CI: add empty topology test for 2-connected topology generator
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-23 17:30:16 +01:00
David Kupka
616c78b720 CI: Fix pep8 errors in 2-connected topology generator
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-23 17:30:16 +01:00
Martin Basti
697072cac9 Py3: do not use dict.iteritems()
Py3 does not support iter* methods, this commit replaces 2 occurencies
of iteritems() to items(). The dictionaries there are not big, this is
sufficient we do not need to use six.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-23 17:14:33 +01:00
Martin Basti
ddda062d58 Disable new pylint checks
New checks have been introduced in pylint 1.5 and many of them are not
compatible with IPA code or produce false positives.

Disable them all.

Note: due older versions of pylint, new checks cannot be disabled
locally, must be disabled globally.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-02-23 16:53:18 +01:00
Martin Babinsky
2c3b0b1bcd upgrade: unconditional import of certificate profiles into LDAP
During IPA server upgrade, the migration of Dogtag profiles into LDAP
backend was bound to the update of CS.cfg which enabled the LDAP profile
subsystem. If the subsequent profile migration failed, the subsequent
upgrades were not executing the migration code leaving CA subsystem in
broken state. Therefore the migration code path should be executed
regardless of the status of the main Dogtag config file.

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

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-23 16:40:55 +01:00
Petr Vobornik
b9c27b6722 webui: fixed showing of success message after password change on login
similar issue and cause as in https://fedorahosted.org/freeipa/ticket/5567

root cause is that binding triggers validation which clears messages in
validation summary. Maybe it could be refactored in a future to not use
 the same validation summary field for API calls and fields.

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
2016-02-23 10:18:35 +01:00
Petr Vobornik
31f42bc2e1 webui: use API call ca_is_enabled instead of enable_ra env variable.
To be consistent with backend code.

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

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
2016-02-23 10:13:26 +01:00
Lenka Doudova
a3f8e8e71f WebUI tests: fix failing of tests due to unclicable label
Checkbox label is no longer clickable, most tests fail with error like this:

AssertionError: Can't click on checkbox label: table.table
Message: Element is not clickable at point (37, 340.3999938964844). Other element would receive the click:
<input class="standalone" id="cn18" value="itest-group" name="cn" type="checkbox">

The checkbox is clickable directly without the label, this patch provides according fix.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-02-23 10:11:22 +01:00