Commit Graph

9144 Commits

Author SHA1 Message Date
Jan Cholasta
b248dfda39 ca install: use host credentials in domain level 1
https://fedorahosted.org/freeipa/ticket/5399

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 14:40:17 +01:00
Jan Cholasta
6ea868e172 aci: merge domain and CA suffix replication agreement ACIs
Merge the two identical sets of replication agreement permission ACIs for
the domain and CA suffixes into a single set suitable for replication
agreements for both suffixes. This makes the replication agreement
permissions behave correctly during CA replica install, so that any
non-admin user with the proper permissions (such as members of the
ipaservers host group) can set up replication for the CA suffix.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 14:40:17 +01:00
Fraser Tweedale
38861428e7 dogtaginstance: remove unused function 'check_inst'
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:32:36 +01:00
Jan Cholasta
d68613194b replica promotion: notify user about ignoring client enrollment options
When IPA client is already installed, notify the user that the enrollment
options are ignored in ipa-replica-install.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:23:37 +01:00
Martin Basti
e1cb802d15 Tests: test_ipagetkeytab: fix assert that is always true
Fixes:
/usr/lib/python2.7/site-packages/ipatests/test_cmdline/test_ipagetkeytab.py:116:
SyntaxWarning: assertion is always true, perhaps remove parentheses?
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 14:22:30 +01:00
David Kupka
8b1002a18c spec file: Add dbus-python to BuildRequires
Commit 8d7f67e introduced the need for dbus-python during build time.

https://fedorahosted.org/freeipa/ticket/5497
2015-12-14 13:38:52 +01:00
Petr Spacek
e650e5eda1 Makefile: disable parallel build
IPA build system cannot cope with parallel build anyway, so this patch
disables parallel build explicitly so it does not blow up when user
has -j specified in default MAKEOPTS.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-14 12:33:34 +01:00
David Kupka
8112ac69cc test: Temporarily increase timeout in vault test.
Remove this change when vault is fixed.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-14 11:52:20 +01:00
Martin Basti
bf9a34f4cf Install RA cert during replica promotion
This cert is needed with KRA to be able store and retrieve secrets.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-12-14 11:48:40 +01:00
Petr Viktorin
099cf98307 Refactor ipautil.run
The ipautil.run function now returns an object with returncode and
output are accessible as attributes.

The stdout and stderr of all commands are logged (unless skip_output is given).

The stdout/stderr contents must be explicitly requested with a keyword
argument, otherwise they are None.
This is because in Python 3, the output needs to be decoded, and that can
fail if it's not decodable (human-readable) text.

The raw (bytes) output is always available from the result object,
as is "leniently" decoded output suitable for logging.

All calls are changed to reflect this.

A use of Popen in cainstance is changed to ipautil.run.

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-14 10:54:23 +01:00
Martin Babinsky
4cc206b0f8 prevent crashes of server uninstall check caused by failed LDAP connections
https://fedorahosted.org/freeipa/ticket/5409

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 19:22:31 +01:00
Gabe
5c9b9089b7 Migrate wget references and usage to curl
https://fedorahosted.org/freeipa/ticket/5458

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 18:46:10 +01:00
Jan Cholasta
14a44ea47b replica promotion: use host credentials for connection check
https://fedorahosted.org/freeipa/ticket/5497

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Jan Cholasta
8d7f67e08c replica install: add remote connection check over API
Add server_conncheck command which calls ipa-replica-conncheck --replica
over oddjob.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Jan Cholasta
00f591d4e9 build: put oddjob scripts into separate directory
https://fedorahosted.org/freeipa/ticket/5497

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-11 18:44:13 +01:00
Gabe
12e7f71600 ipa-replica-install prints incorrect error message when replica is already installed
https://fedorahosted.org/freeipa/ticket/5022
https://fedorahosted.org/freeipa/ticket/5320

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-11 18:24:42 +01:00
Tomas Babej
90f7fa074a replicainstall: Make sure the enrollment state is preserved
During the promote_check phase, the subsequent checks after the machine
is enrolled may cause the installation to abort, hence leaving it
enrolled even though it might not have been prior to the execution of
the ipa-replica-install command.

Make sure that ipa-client-install --uninstall is called on the machine
that has not been enrolled before in case of failure during the
promote_check phase.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-11 18:07:20 +01:00
Tomas Babej
c3c8651ac1 replicainstall: Add check for domain if server is specified
Avoids failing in the later stages during the ipa-client-install
command.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 17:21:14 +01:00
Jan Cholasta
e9baafb08f spec file: put Python modules into standalone packages
Make the following changes in packaging:

* freeipa-server - split off python2-ipaserver and freeipa-server-common,
* freeipa-server-dns - build as noarch,
* freeipa-client - split off python2-ipaclient and freeipa-client-common,
* freeipa-admintools - build as noarch,
* freeipa-python - split into python2-ipalib and freeipa-common, provide
  freeipa-python-compat for upgrades,
* freeipa-tests - rename to python2-ipatests and build as noarch.

Bump version to 4.2.91.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 15:17:41 +01:00
Jan Cholasta
f50b4647ba spec file: remove config files from freeipa-python
/etc/ipa/dnssec is now owned by freeipa-server. The remaining files are now
owned by freeipa-client.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-11 15:17:41 +01:00
Martin Basti
1e0f1f5197 CI: fix ipa-kra-install on domain level 1
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-11 15:11:20 +01:00
Tomas Babej
a02f83ff9c tests: Add hostmask detection for sudo rules validating on hostmask
IPA sudo tests worked under the assumption that the clients
that are executing the sudo commands have their IPs assigned
within 255.255.255.0 hostmask.

Removes this (invalid) assumption and adds a
dynamic detection of the hostmask of the IPA client.

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

Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
2015-12-11 14:25:50 +01:00
Martin Babinsky
7c4ce9a098 fix error message assertion in negative forced client reenrollment tests
https://fedorahosted.org/freeipa/ticket/5511

Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
2015-12-11 13:11:54 +01:00
Lenka Doudova
a66a2c5160 Adding descriptive IDs to stageuser tests
Adding descriptive IDs to parametrized stageuser test for better identification of test cases.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 12:34:17 +01:00
Martin Babinsky
e130d35687 add ACIs for custodia container to its parent during IPA upgrade
This fixes the situation when LDAPUpdater tries to add ACIs for storing
secrets in cn=custodia,cn=ipa,cn=etc,$SUFFIX before the container is actually
created leading to creation of container without any ACI and subsequent
erroneous behavior.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-12-11 12:25:26 +01:00
Jan Cholasta
ccb2f52313 server uninstall: ignore --ignore-topology-disconnect in domain level 0
Topology disconnect is always ignored in domain level 0, so the option can
be safely ignored.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:18:44 +01:00
Jan Cholasta
b4a78db4e7 replica promotion: check domain level before ipaservers membership
Check domain level before checking ipaservers membership to prevent
"not found" error when attempting replica promotion in domain level 0.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:11:46 +01:00
Jan Cholasta
8f36a5bd68 replica install: add ipaservers if it does not exist
This prevents crash when adding the host entry to ipaservers when
installing replica of a 4.2 or older server.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-11 07:11:46 +01:00
David Kupka
b7953cda4f replica: Fix ipa-replica-install with replica file (domain level 0).
Attribute _ca_enabled is set in promote_check() and is not available in
install(). When installing replica in domain level 0 we can determine existence
of CA service based on existence of cacert.p12 file in provided replica-file.

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

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-10 07:49:53 +01:00
Tomas Babej
dcb5c2a520 topology: Fix: Make sure the old 'realm' topology suffix is not used
The old 'realm' topology suffix is no longer used, howver, it was being
created on masters with version 4.2.3 and later. Make sure it's properly
removed.

Note that this is not the case for the 'ipaca' suffix, whic was later
removed to 'ca'.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-09 18:57:52 +01:00
Jan Cholasta
faf6085564 replica promotion: allow OTP bulk client enrollment
https://fedorahosted.org/freeipa/ticket/5498

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-12-09 10:16:32 +01:00
Tomas Babej
a84b7d2117 topology: Make sure the old 'realm' topology suffix is not used
The old 'realm' topology suffix is no longer used, however, it was being
created on masters with version 4.2.3 and later. Make sure it's properly
removed.

Note that this is not the case for the 'ipaca' suffix, which was later
removed to 'ca'.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-09 09:42:18 +01:00
Martin Babinsky
35fae355cc CI tests: ignore disconnected domain level 1 topology on IPA master teardown
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-09 09:39:20 +01:00
Petr Spacek
848912ae31 add missing /ipaplatform/constants.py to .gitignore
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-08 13:28:18 +01:00
Martin Basti
e4259d5b49 CI: fix function that prepare the hosts file before CI run
Without this fix function removed 2 lines from hosts file.

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-08 10:25:50 +01:00
Martin Basti
a11cddd75b CI: installation tests
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-08 10:07:00 +01:00
David Kupka
2c5a662fd8 install: Run all validators at once.
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-12-08 08:12:22 +01:00
Martin Basti
cac756b87d Force creation of services during replica install
Missing A record should not prevent replica to be installed.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-12-07 19:12:24 +01:00
Martin Basti
bee222372a CI: test various topologies with multiple replicas
Test tests topologies listed bellow with and without CA on replicas:
star topology: 3 replicas
line topology: 3 replicas
complete topology: 3 replicas

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2015-12-07 16:44:36 +01:00
Tomas Babej
dcb6626e87 replicainstall: Admin password should not conflict with replica file
The --admin-password (-w) has its use both in domain level 0 and 1.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-07 14:34:11 +01:00
Yuri Chornoivan
2180d5db8a Fix minor typos
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-07 12:07:47 +01:00
Tomas Babej
5cb003f0b4 tests: Fix incorrect uninstall method invocation
https://fedorahosted.org/freeipa/ticket/5516

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-12-07 10:58:57 +01:00
Jan Cholasta
01ddf51df7 custodia: do not modify memberPrincipal on key update
https://fedorahosted.org/freeipa/ticket/5401

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:14:13 +01:00
Jan Cholasta
42544484dc replica promotion: automatically add the local host to ipaservers
If the user is authorized to modify members of the ipaservers host group,
add the local host to ipaservers automatically.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:14:13 +01:00
Jan Cholasta
c2af409517 replica promotion: use host credentials when setting up replication
Use the local host credentials rather than the user credentials when
setting up replication. The host must be a member of the ipaservers host
group. The user credentials are still required for connection check.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:14:13 +01:00
Jan Cholasta
662158b781 ipautil: use file in a temporary dir as ccache in private_ccache
python-gssapi chokes on empty ccache files, so instead of creating an empty
temporary ccache file in private_ccache, create a temporary directory and
use a non-existent file in that directory as the ccache.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:14:13 +01:00
Jan Cholasta
e137f305ed aci: allow members of ipaservers to set up replication
Add ACIs which allow the members of the ipaservers host group to set up
replication. This allows IPA hosts to perform replica promotion on
themselves.

A number of checks which need read access to certain LDAP entries is done
during replica promotion. Add ACIs to allow these checks to be done using
any valid IPA host credentials.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:14:13 +01:00
Jan Cholasta
7b9a97383c aci: replace per-server ACIs with ipaserver-based ACIs
https://fedorahosted.org/freeipa/ticket/3416

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:13:23 +01:00
Jan Cholasta
a8d7ce5cf1 aci: add IPA servers host group 'ipaservers'
https://fedorahosted.org/freeipa/ticket/3416

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-12-07 08:13:23 +01:00
Martin Babinsky
ee853a3d35 check whether replica exists before executing the domain level 1 deletion code
Move this check before the parts that check topology suffix connectivity, wait
for removed segments etc. If the hostname does not exist, it should really be
one of the first errors user encounters during ipa-replica-manage del.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-12-04 23:09:50 +01:00