Commit Graph

6556 Commits

Author SHA1 Message Date
Petr Vobornik
e3d56597cd Fix password expiration notification
- was broken by navigation and application controller refactoring

https://fedorahosted.org/freeipa/ticket/4003
2013-10-30 13:31:12 +01:00
Petr Viktorin
70c1e4a185 beakerlib plugin: Don't try to submit logs if they are missing 2013-10-30 11:55:15 +01:00
Petr Viktorin
e6c06b08d8 Tests: mkdir_recursive: Don't fail when top-level directory doesn't exist
When the directory directly under root (e.g. /etc) did not exist,
mkdir_recursive failed.
Fix the issue.
2013-10-30 11:55:10 +01:00
Petr Viktorin
dbf10b83bd Improve permission plugin test cleanup
The rename tests use names that were not being cleaned up when the
tests fail. Add cleanup steps for them.

Also, use --force so system permissions are removed as well.
2013-10-30 11:50:05 +01:00
Petr Viktorin
2c433cdd7e Use new ipaldap entry API in aci and permission plugin 2013-10-30 11:50:05 +01:00
Petr Viktorin
dadf7cddf0 Help plugin: don't fail if a topic's module is not found
Previously the help plugin failed when searching for the docstring
when a topic's module was not found. This can happen when some server
plugins are loaded (e.g. for tests).

Use empty documentation when the topic is not found.
2013-10-30 11:50:05 +01:00
Petr Viktorin
15618beab6 Fix invalid assumption NSS initialization check in SSLTransport
There code assumes that the `conn` in any Connection in the context is
a ServerProxy. This might not always be the case: ldap2 uses a
python-ldap connection here.
2013-10-30 11:50:05 +01:00
Petr Viktorin
62890ca69b Fix indentation in permission plugin tests 2013-10-30 11:50:05 +01:00
Petr Viktorin
7051f510b6 Update Permission and ACI plugins to decorator registration API 2013-10-30 11:50:04 +01:00
Martin Kosek
7d341937ff Add nsswitch.conf to FILES section of ipa-client-install man page
This file is always updated when client is installed or uninstalled.

https://fedorahosted.org/freeipa/ticket/3995
2013-10-29 17:57:00 +01:00
Jan Cholasta
e98abdca9b Track DS certificate with certmonger on replicas.
https://fedorahosted.org/freeipa/ticket/3975
2013-10-29 15:31:16 +01:00
Ana Krivokapic
5854c47685 Add test for external CA installation
https://fedorahosted.org/freeipa/ticket/3819
2013-10-29 08:27:25 +01:00
Petr Viktorin
88154b5709 Fix date in last changelog entry 2013-10-25 16:14:51 +02:00
Martin Kosek
4bed0de60d Remove mod_ssl conflict
Since mod_nss-1.0.8-24, mod_nss and mod_ssl can co-exist on one
machine (of course, when listening to different ports).

To make sure that mod_ssl is not configured to listen on 443
(default mod_ssl configuration), add a check to the installer checking
of either mod_nss or mod_ssl was configured to listen on that port.

https://fedorahosted.org/freeipa/ticket/3974
2013-10-25 15:35:39 +02:00
Martin Kosek
0880d030ae Make set_directive and get_directive more strict
When set_directive was used for directive "foo" and the word "foo"
was detected anywhere on the line (e.g. in a comment, or in an example),
it was overwritten which may potentially lead to wrong line being
overwritten.

Only match the directives on the beginning of the lines, it is safer.

https://fedorahosted.org/freeipa/ticket/3974
2013-10-25 15:35:39 +02:00
Martin Kosek
cdd2e9caff Do not add kadmin/changepw ACIs on new installs
These ACI were needed when FreeIPA had a custom ipa_kpasswd daemon,
now that a standard kadmin is used, ACIs are not needed anymore as
kadmin uses the same driver as the KDC.

The ACIs is not removed on upgrades to avoid breaking older
replicas which may still use FreeIPA version with the ipa_kpasswd
daemon.

https://fedorahosted.org/freeipa/ticket/3987
2013-10-25 15:26:51 +02:00
Ana Krivokapic
9a368b6358 Make sure nsds5ReplicaStripAttrs is set on agreements
Add nsds5ReplicaStripAttrs to the agreement LDAP entry before the agreement
is created.

https://fedorahosted.org/freeipa/ticket/3989
2013-10-25 14:58:39 +02:00
Ana Krivokapic
c518a80ab7 Do not roll back failed client installation on server
In case of a failed enrollment, IPA client rolls back any changes it has made
to the system. In order to have a more debuggable setup, do not roll back these
changes in the case of an IPA server install.

https://fedorahosted.org/freeipa/ticket/3990
2013-10-25 14:00:05 +02:00
Tomas Babej
df5f5c9fab trusts: Fix typo in error message for realm-domain mismatch 2013-10-25 13:51:59 +02:00
Tomas Babej
81b5ac772f ipatests: Add AD integration test case
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-25 13:51:59 +02:00
Tomas Babej
b758be1f51 ipatests: Add AD-integration related tasks
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Tomas Babej
35d843b273 ipatests: Add WinHost class
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Tomas Babej
e8941ef6cb ipatests: Create util module for ipatests
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Tomas Babej
407db5b8a9 ipatests: Extend IntegrationTest with multiple AD domain support
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Tomas Babej
5a9b46c9c5 ipatests: Extend domain object with 'ad' role support and WinHosts
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Tomas Babej
69a7c1e2ba ipatests: Add Active Directory support to configuration
Part of: https://fedorahosted.org/freeipa/ticket/3834
2013-10-24 14:08:40 +02:00
Jakub Hrozek
c088c940e6 trusts: combine filters with AND to make sure only the intended domain matches 2013-10-24 07:53:34 +03:00
Tomas Babej
ced2170b9d Get the created range type in case of re-establishing trust
This is a regression fix introduced by commit id:
285ed59889

Fixes internal error in case of re-establishing the trust.
2013-10-21 15:45:27 +02:00
Petr Viktorin
f34b8896f9 test_simple_replication: Fix waiting for replication
The integration tests must wait for replication to happen before checking
results. In some cases, the tests have failed because the checks that
detect completed replication were insufficient.

This fixes the code to:
- Wait for replication to be completed on both servers
- In the case of an error, continue waiting -- it might be the case that
  the DS is temporarily unreachable
2013-10-18 18:01:28 +02:00
Petr Viktorin
756b997a7d Use a user result template in tests
This makes the tests shorter, more descriptive, and easier to change
e.g. when new attributes are added.
2013-10-18 17:11:50 +02:00
Ana Krivokapic
92cd987e0a Add ipa-advise plugins for nss-pam-ldapd legacy clients
Add three new ipa-advise plugins, to facilitate configuration of
legacy clients using nss-pam-ldapd:

* config-redhat-nss-pam-ldapd
* config-generic-linux-nss-pam-ldapd
* config-freebsd-nss-pam-ldapd

https://fedorahosted.org/freeipa/ticket/3672
2013-10-18 16:15:12 +02:00
Petr Viktorin
c97f4e8a66 Use new CLI options in certinstall tests
The --pin and --dirman-password options simplified ipa-certinstall
usage. Use them in tests.

Also add tests for the old way of calling the command.

https://fedorahosted.org/freeipa/ticket/3869
http://www.freeipa.org/page/V3/ipa-server-certinstall_CLI_cleanup
2013-10-18 12:27:40 +02:00
Petr Viktorin
7be79dfe34 test_caless.TestCertInstall: Fix 'test_no_ds_password' test case
The test installed the HTTP cert instead of the DS one.
2013-10-18 12:27:40 +02:00
Martin Kosek
5d8c02cfb8 Administrative password change does not respect password policy
When Directory Manager or a PassSync agent is changing a password,
it is not being expired, but standard expiration time should apply.
However, default expiration time was always applied (90 days)
even though administrator may have a custom policy for the user.

https://fedorahosted.org/freeipa/ticket/3968
2013-10-17 14:04:03 +02:00
Martin Kosek
dd3295ac32 Installer should always wait until CA starts up
Patch for ticket 3964 changed the installer so that it does not
always wait for CA if the proxy is not configured. However,
it was found out that it may freeze an installation when
a step subsequent after CA restart call the CA and receives no
reply.

Change the wait so that it always waits for CA to start up. If
HTTP proxy is already configured, it should wait on port 443.
If not, it should wait on local PKI port 8443.

https://fedorahosted.org/freeipa/ticket/3973
2013-10-17 12:07:52 +02:00
Tomas Babej
096a49766d ipatests: Extend the order plugin to properly handle inheritance
When trying to create a new ordered test case by inheriting
from already defined test case, by overriding few of its methods,
the execution order of the tests is as follows:
    - first all non-overriden test methods from the parent test class
    - then all overriden tests methods

This patch makes sure that methods are executed in the logical order,
that is, the order defined in the parent class.
2013-10-17 10:48:03 +02:00
Petr Vobornik
b599d44816 Registries and Build Guide 2013-10-16 18:08:17 +02:00
Petr Vobornik
dc97b7b460 Navigation Guide 2013-10-16 18:08:17 +02:00
Petr Vobornik
1950ff2411 Plugin Infrastructure Guide 2013-10-16 18:08:17 +02:00
Petr Vobornik
d212d48015 Debugging Web UI guide 2013-10-16 18:08:17 +02:00
Petr Vobornik
3781d33dbe Phases Guide 2013-10-16 18:08:17 +02:00
Petr Vobornik
cd6a2c431e Configuration for JSDuck documentation generator
Installation: https://github.com/senchalabs/jsduck/wiki/Installation Basically it requires ruby and jsduck gem.

Usage:
$ cd install/ui/doc
$ make

Documentation will be generated into: install/ui/build/code_doc directory
2013-10-16 18:08:17 +02:00
Petr Vobornik
efafd7fe87 Web UI source code annotation
Part of ongoing Web UI documentation effort. Source code is annotated in a way that it can be processed by documentation generator.
2013-10-16 18:08:17 +02:00
Petr Vobornik
3fa304d95e Removal of unused code 2013-10-16 18:08:16 +02:00
Petr Vobornik
b4fc6f4ba8 Load updated Web UI files after server upgrade
Issue:
* There was no caching policy specified.
* -> Browsers use their own default policy.
* -> After upgrade, some Web UI files might have been actualized some not.
* -> With schema change may result into weird bugs in Web UI

Solution considerations:

1. Detect server version change and hard-reload at runtime
Detection is easy. Problem is the reload. Obvious candidate 'window.location.reload(true)' works in Firefox but not in Chrome because expected behavior when parameter is used is not in standard and therefore Chromium/WebKit authors did not implement it.

2. Application Cache
HTML 5 technology which lets web apps to run offline. Besides weird issues with event handlers which I encountered, this would be an ideal candidate. Simple change of manifest file would lead to reload of all files (requires reload of page to used the new files).

Showstopper was usage with untrusted certificate. If user did not add exception for the cert or its CA and would visit the page for a second time, all AJAX calls would fail.

3. Set Expires to now() for everything
Web UI rarely changes so this is an overkill. Setting it to different value is not a solution either. We can't predict when the upgrade will happen and when new Web UI will be needed.

Solution:
* Implemented a mini loader which loads basic resources. Dojo loader takes action after Dojo is loaded.
* The loader adds a version parameter (?v=__NUM_VERSION__) to all requests.
* Version is defined in the loader. It's set to current in `make version-update`.
* All static pages use this loader to fetch their resources.
* Version is also passed to dojo loader as cache-bust for the same effect.
* Expire header was set to 'access time plus 1 year' for /ui folder. Exceptions are HTML files and loader (set to immediate expiration).

Possible issues:
* Images are cached but not requested with version param.
  * Images with version and without are considered different
  * -> We would have to attach version to all URIs - in CSS and in JS. But we should avoid changing jQuery UI CSS.
  * Proposed solution is to change image name when changing image. Image change is done rarely.
* Version is set by build and therefore updated just on server update. It might cause trouble with different update schedule of plugins.
  * No action taken to address this issue yet.
  * We might leave it on plugin devs (own .conf in /etc/httpd/conf.d/)
  * or set expires to now for all plugins
* running `make version-update` is required in order to use static version of UI for testing

https://fedorahosted.org/freeipa/ticket/3798
2013-10-16 18:06:30 +02:00
Martin Basti
c49cf9572a Added warning if cert '/etc/ipa/ca.crt' exists
https://fedorahosted.org/freeipa/ticket/3944
2013-10-16 10:55:23 +02:00
Tomas Babej
ed3d184a7d adtrustinstance: Move attribute definitions from setup to init method
Majority of the attributes set in the setup method can be set in the
__init__ method where they are actually defined (and set to None).

This is true for attributes that hold constant values and for
attributes that have their values derived from api.env dictionary.

Creates a new __setup_default_attributes method, that is called
from within __init__ and setup (in case the passed values for
hostname or domain do not correspond to that what is set in api.env,
doing otherwise could cause unexpected behaviour).

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Tomas Babej
d769b124b0 adtrustinstance: Properly handle uninstall of AD trust instance
The uninstall method of the AD trust instance was not called upon
at all in the ipa-server-install --uninstall phase.

This patch makes sure that AD trust instance is unconfigured when
the server is uninstalled.

The following steps are undertaken:
  * Remove /var/run/samba/krb5cc_samba
  * Remove our keys from /etc/samba/samba.keytab using ipa-rmkeytab
  * Remove /var/lib/samba/*.tdb files

Additionally, we make sure winbind service is stopped from within the
stop() method.

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Tomas Babej
45e310ecc4 ipa-adtrust-install: Add warning that we will break existing samba configuration
In case /etc/samba/smb.conf exists and it was not created by ipa-adtrust-install,
print a warning that we will break existing samba configuration and ask for
a confirmation in the interactive mode.

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Tomas Babej
4a95a50596 ipa-upgradeconfig: Remove backed up smb.conf
Since we are not able to properly restore the Samba server to the
working state after running ipa-adtrust-install, we should not keep
the smb.conf in the fstore.

This patch makes sure that any backed up smb.conf is removed from
the backup and that this file is not backed up anymore.

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00