Commit Graph

9273 Commits

Author SHA1 Message Date
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
Petr Viktorin
d1252cfb8e cli: Don't encode/decode for stdin/stdout on Python 3
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
5b6a1ce8a8 p11helper: Port to Python 3
- Use binascii.hexlify instead of encode('hex')
- Keep the library name as a text string instead of encoding to bytes

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
c3529355a6 test_util: str/bytes check fixes for Python 3
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
4b104c742b ipautil: Use mode 'w+' in write_tmp_file
Python defaults to 'w+b', but all callers in IPA write use text (as
opposed to bytes).

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
200614872e tests: Use absolute imports
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
d3851fd76f ipautil.run, kernel_keyring: Encoding fixes for Python 3
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
fe7bd36728 ipaldap, ldapupdate: Encoding fixes for Python 3
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Michael Simacek
831856ea55 Fix bytes/string handling in rpc
https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
Petr Viktorin
91e5435c8b test_parameters: Ignore specific error message
In Python 3, the error message from the decimal module is
less clear than before.
(It's apparently the price to pay for speed -- Python3 uses
libmpdec as its Decimal implementation by default.)

Don't check for the exact error message.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-17 10:41:29 +01:00
David Kupka
2541b5fcbf CI: Add test for 2-connected topology generator.
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-12 16:57:19 +01:00
David Kupka
c2bbd5dcd8 CI: Add simple replication test in 2-connected topology.
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-12 16:57:19 +01:00
David Kupka
8f6e9113e9 CI: Add '2-connected' topology generator.
If number of servers (master+replicas) is equal to 4 + SUM(1, n, 2^n*5) for
any n >= 0:
 * every server has replication agreement with 2 - 4 other servers.
 * at least two agreements must fail in order to disconnect the topology.
Otherwise there can be server(s) with single agreement on the edge of the
topology.

Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-02-12 16:57:19 +01:00
Martin Basti
0ea7433d09 Upgrade: log to ipaupgrade.log when IPA server is not installed
Message was printed only to stdout and leaves ipaupgrade.log without any
record that ipa-server-upgrade failed because ipa server is not
installed.
Now error is passed to logger which prints meassage to stderr and
ipaupgrade.log.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-11 18:44:14 +01:00
Jan Cholasta
b3411dc985 replica promotion: fix AVC denials in remote connection check
Also move com.redhat.idm.trust-fetch-domains to /usr/libexec/ipa/oddjob.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-11 18:40:39 +01:00
Milan Kubík
87ee451c7d ipatests: Add missing certificate profile fixture
https://fedorahosted.org/freeipa/ticket/5630

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-11 14:13:56 +01:00
Martin Basti
2ce8921fe6 make lint: use config file and plugin for pylint
Our custom implementation of pylint checker is often broken by
incompatible change on pylint side. Using supported solutions (config
file, pylint plugins) should avoid this issue.

The plugin adds missing (dynamic) member to classes in abstract syntax
tree generated for pylint, instead of just ignoring missing members and
all sub-members. This should improve pylint detection of typos and
missing members in api. env and test config.

make-lint python script has been removed, to run pylint execute 'make
lint'

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

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-02-11 11:06:39 +01:00
Christian Heimes
5ac3a3cee5 Modernize mod_nss's cipher suites
The list of supported TLS cipher suites in /etc/httpd/conf.d/nss.conf
has been modernized. Insecure or less secure algorithms such as RC4,
DES and 3DES are removed. Perfect forward secrecy suites with ephemeral
ECDH key exchange have been added. IE 8 on Windows XP is no longer
supported.

The list of enabled cipher suites has been generated with the script
contrib/nssciphersuite/nssciphersuite.py.

TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_256_CBC_SHA

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

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-11 10:44:29 +01:00
Oleg Fayans
42d3644276 Removed --ip-address option from replica installation
Explicitly specifying ip-address of the replica messes up with the current
bind-dyndb-ldap logic, causing reverse zone not to be created.

Enabled reverse-zone creation for the clients residing in different subnet from
master

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-02-04 15:53:30 +01:00
Pavel Vomacka
fb3b7f7d93 Add validation to Issue new certificate dialog
'Issue new certificate' dialog now validates whether user fills 'principal' and 'csr' field.
In case that one of these fields is empty then it does not allow to submit the dialog.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-02-02 18:45:38 +01:00
Lukas Slebodnik
017b343e13 IPA-SAM: Fix build with samba 4.4
samba_util.h is not shipped with samba-4.4
and it was indirectly included by "ndr.h"

Some functions have prototypes in different header file
"util/talloc_stack.h" and other does not have declarations
in other header file. But they are still part of libsamba-util.so

sh$ objdump -T /usr/lib64/libsamba-util.so.0.0.1 | grep -E "trim_s|xstrdup"
0000000000022200 g    DF .text  000000000000001f  SAMBA_UTIL_0.0.1 smb_xstrdup
00000000000223b0 g    DF .text  000000000000019d  SAMBA_UTIL_0.0.1 trim_string

ipa_sam.c: In function 'ldapsam_uid_to_sid':
ipa_sam.c:836:24: warning: implicit declaration of function 'talloc_stackframe'
                  [-Wimplicit-function-declaration]
  TALLOC_CTX *tmp_ctx = talloc_stackframe();
                        ^
ipa_sam.c: In function 'pdb_init_ipasam':
ipa_sam.c:4493:2: warning: implicit declaration of function 'trim_string'
                  [-Wimplicit-function-declaration]
  trim_string( uri, "\"", "\"" );
  ^
ipa_sam.c:4580:26: warning: implicit declaration of function 'smb_xstrdup'
                   [-Wimplicit-function-declaration]
  ldap_state->domain_dn = smb_xstrdup(dn);
                          ^

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-02 18:32:47 +01:00
Petr Spacek
72e4a360fc Fix ipa-adtrust-install to always generate SRV records with FQDNs
Previous code failed in following setup:
* IPA domain = ipa.example.com
* IPA master = vm1.example.com
* IPA replica = vm2.example.com

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

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-02 18:21:31 +01:00
Sumit Bose
348c400484 ipa-kdb: map_groups() consider all results
Resolves https://fedorahosted.org/freeipa/ticket/5573

Reviewed-By: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-02 18:15:19 +01:00
Thorsten Scherf
d85d709473 Fixed typo in service-add
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-02 15:34:16 +01:00
Martin Babinsky
612f4aa900 always start certmonger during IPA server configuration upgrade
This patch fixes a regression introduced by commit
bef0f4c5c3. Instead of checking whether
there is CA installed in the topology, we should always start certmonger
service during upgrade regardless when CA was configured.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-02 12:28:42 +01:00
Stanislav Laznicka
c8eabaff9e Automatically detect and remove dangling RUVs
https://fedorahosted.org/freeipa/ticket/5411

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-02 12:22:37 +01:00
Stanislav Laznicka
bb7887140d Listing and cleaning RUV extended for CA suffix
https://fedorahosted.org/freeipa/ticket/5411

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-02 12:22:37 +01:00
Oleg Fayans
aa30199e0b Updated connect/disconnect replica to work with both domainlevels
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-02-01 16:05:38 +01:00
Martin Babinsky
23f5edb4be reset ldap.conf to point to newly installer replica after promotion
When promoting a client to replica reset openldap client config so that it no
longer uses remote master as default LDAP hosts but uses local connection to
replica. Also make sure that the behavior regarding editing of user-customized
config is consistent with the client installer.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2016-02-01 15:14:13 +01:00
Jan Cholasta
465ce82a4d replica install: validate DS and HTTP server certificates
Validate the DS and HTTP certificates from the replica info file early in
ipa-replica-install to prevent crashes later.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-02-01 14:41:02 +01:00
Simo Sorce
f9ed0b6ff8 Convert ipa-sam to use the new getkeytab control
Signed-off-by: Simo Sorce <simo@redhat.com>

Ticket: https://fedorahosted.org/freeipa/ticket/5495
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-01 13:28:39 +01:00
Simo Sorce
e011b376a5 Improve keytab code to select the right principal.
Whe requesting a keytab the salt used is the NORMAL type (for backwards and AD
compatibility), however since we added alias support we need to search for the
krbCanonicalName in preference, hen nothing is specified, and for the requested
principal name when a getkeytab operation is performed. This is so that the
correct salt can be applied. (Windows AD uses some peculiar aliases for some
special accounts to generate the salt).

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-02-01 13:28:39 +01:00
Lukas Slebodnik
4bef7577b7 extdom: Remove unused macro
Last usage of the macre SSSD_SYSDB_SID_STR was removed
in the commit 0ee8fe11ae

Reviewed-By: Sumit Bose <sbose@redhat.com>
2016-01-29 16:04:59 +01:00
Oleg Fayans
b23fea7660 Enabled recreation of test directory in apply_common_fixes function
Without it any test comprized of more than one cycle of installing-uninstalling
of ipa would fail due to the fact that test folder on the remote machine gets
deleted during ipa uninstallation.

Also removed duplicate call of apply_common fixes and added unapply_fixes to
uninstall_replica

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-01-29 14:15:29 +01:00
Martin Basti
c5076452d6 DNSSEC CI: fix zone delegations
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-01-29 11:52:09 +01:00
Martin Babinsky
72e72615df fix standalone installation of externally signed CA on IPA master
https://fedorahosted.org/freeipa/ticket/5636

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-01-28 16:33:15 +01:00