Commit Graph

6166 Commits

Author SHA1 Message Date
Petr Viktorin
fb08402b71 Fix installutils.get_password without a TTY
If stdin is a TTY, ipaserver.install.installutils uses getpass and all
is well. Without a TTY, though, there were two problems:

* The prompt was not printed
* On end of file, an empty string was returned, which caused read_password
  to enter an infinite loop.

Fix both problems.

https://fedorahosted.org/freeipa/ticket/3824
2013-08-06 10:34:26 +02:00
Tomas Babej
f954f2d1b9 Limit pwpolicy maxlife to 20000 days
Since krbMaxPwdLife attribute is represented as number of seconds,
setting maxlife to high values such as 999 999 days (~2739 years)
would result to overflow when parsing this attribute in kdb plugin,
and hence default maxlife of 90 days would be applied.

Limit the maximum value of maxlife that can be set through the
framework to 20 000 days (~ 54 years).

https://fedorahosted.org/freeipa/ticket/3817
2013-08-05 17:50:31 +02:00
Petr Viktorin
5d141bd39c Update translations
Regenerate the POT file and pull new translations from Transifex.

Also, update the Transifex URL in the configuration file:
transifex.net has redirected to transifex.com for some time,
and now its certificate has expired.
2013-08-02 16:54:25 +02:00
Ana Krivokapic
69bcfa49d4 Expose ipaRangeType in Web UI
https://fedorahosted.org/freeipa/ticket/3759
2013-07-29 10:38:03 +02:00
Petr Viktorin
381f22af25 Add the new no_member option to CLI tests
This makes the tests pass.
2013-07-29 10:03:21 +02:00
Ana Krivokapic
2ca280c56d Honor 'enabled' option for widgets.
https://fedorahosted.org/freeipa/ticket/3793
2013-07-26 16:32:47 +02:00
Tomas Babej
2934160b9c Refactor the interactive prompt logic in idrange_add
Make the interactive prompts interpret the following logic:

- AD range (dom-sid/dom-name set):
      require RID base if not set

- local range(dom-sid/dom-name not set):
    a) server with adtrust support:
           require both RID base and secondary RID base
    b) server without adtrust support:
           if any of RID base, secondary RID base set,
           require both of them

https://fedorahosted.org/freeipa/ticket/3786
2013-07-26 13:57:35 +02:00
Martin Kosek
a789d70f39 Use valid LDAP search base in migration plugin
One find_entry_by_attr call did not set a search base leading to
LDAP search call with zero search base. This leads to false negative
results from LDAP.
2013-07-26 13:42:22 +02:00
Tomas Babej
22681013b2 Skip referrals when converting LDAP result to LDAPEntry
When converting the result obtained by python-ldap library,
we need to skip unresolved referral entries, since they cannot
be converted.

https://fedorahosted.org/freeipa/ticket/3814
2013-07-26 13:38:37 +02:00
Petr Vobornik
04839a2aea Web UI integration tests: Code quality fixes
* variables with python build-in names renamed
 * unused parameters used or removed

 https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Petr Vobornik
6ec5e5fec6 Web UI integration tests: PEP8 fixes
Tests modified to comply with PEP8 rules with exception of rule E501 (long lines).
Done by autopep8 tool and 2 manual modifications.

https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Petr Vobornik
8a3d8aeca3 Web UI integration tests: Compute range sizes to avoid overlaps
Heavily inspired by code from xmlrpc tests.

To obtain ranges, this patch also adds method to execute FreeIPA command through Web UI.
It uses Web UI instead of ipalib so it doesn't need to care about authentication on a test-runner machine.

https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Petr Vobornik
a3567cef98 Web UI integration tests: Verify data after add and mod
https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Petr Vobornik
bc06e30481 Web UI integration tests: Add ui_driver method descriptions
https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Petr Vobornik
ae31130098 Web UI integration tests: Add trust tests
https://fedorahosted.org/freeipa/ticket/3744
2013-07-26 13:35:12 +02:00
Martin Kosek
6a0aabede5 Free NSS objects in --external-ca scenario
In external CA installation, ipa-server-install leaked NSS objects
which caused an installation crash later when a subsequent call of
NSSConnection tried to free them.

Properly freeing the NSS objects avoid this crash.

https://fedorahosted.org/freeipa/ticket/3773
2013-07-26 12:51:10 +02:00
Tomas Babej
8a41b64a8c Change shebang to absolute path in ipa-client-automount
https://fedorahosted.org/freeipa/ticket/3811
2013-07-25 15:27:37 +02:00
Lukas Slebodnik
6782a24ff1 Remove unused variable
Variable was set, but it was not used.
2013-07-25 13:21:30 +02:00
Lukas Slebodnik
905f835647 Remove unused variable 2013-07-25 13:21:30 +02:00
Lukas Slebodnik
c098435040 Use right function prototype for thread function
warning: passing argument from incompatible pointer type
2013-07-25 13:21:30 +02:00
Petr Viktorin
2f80855e15 test_simple_replication: Wait for replication to finish before checking
Add ldap_connect() method to Host to allow executing querying LDAP from tests.

Use information in the mapping tree to poll until all replication is finished
(or failing) before checking that entries replicated successfully.
2013-07-25 12:41:26 +02:00
Petr Viktorin
15e83befaf Correct default value of LDAPClient.get_entries scope argument 2013-07-25 12:41:16 +02:00
Petr Viktorin
e38816bdaf Add tar and xz dependencies to the freeipa-tests package
The beakerLib plugin collects log files via compressed tarballs,
so these dependencies are needed
2013-07-25 12:32:36 +02:00
Petr Viktorin
00dfd9399b Add the ipa-test-task tool
This script makes common testing tasks such as IPA installation
and uninstallation available outside of Python.

https://fedorahosted.org/freeipa/ticket/3721
2013-07-25 12:32:35 +02:00
Petr Viktorin
13f4b7e9cf Add install_topo to test tasks
This allows a cluster of replicas and clients to be installed
in a named topology.
Several named topologies are available (star, line, complete, tree,
tree2) and new ones can be defined as a simple function.
2013-07-25 12:32:35 +02:00
Petr Viktorin
ac70c2cc5c Add more test tasks
- install_client
- connect_replica
- disconnect_replica
- prepare_host
- kinit_admin
2013-07-25 12:32:34 +02:00
Petr Viktorin
db8027407a test_integration: Set up CA on replicas by default
For complex topologies the CA needs to be available on most
replicas, since only servgers with a CA can prepare replica files.
2013-07-25 12:32:33 +02:00
Petr Viktorin
4b439356b7 test_integration: Add log collection to Host
This allows collecting logs when a test context is not available.
2013-07-25 12:32:33 +02:00
Petr Viktorin
65dfcb7cec Move BeakerLibProcess out of BeakerLibPlugin
This allows reusing the code elsewhere
2013-07-25 12:32:32 +02:00
Tomas Babej
d094481ea6 Move requirement for keyutils to freeipa-python package
There was already a dependency in server package, however,
the correct place for such dependency is in freeipa-python,
since the relevant code using keyutils resides there.

Both freeipa-server and freeipa-client require freeipa-python.

https://fedorahosted.org/freeipa/ticket/3808
2013-07-24 17:17:56 +02:00
Martin Kosek
5b54451e0e Become 3.3.0 Beta 1 2013-07-24 13:37:46 +02:00
Martin Kosek
9c851019ae Bump minimum SSSD version
Pick up latest SSSD 1.11 Beta development
2013-07-24 13:37:45 +02:00
Jan Cholasta
693710784b Print newline after receiving EOF in installutils.read_password. 2013-07-24 10:00:03 +02:00
Jan Cholasta
ab2debd1ea Ask for PKCS#12 password interactively in ipa-replica-prepare.
https://fedorahosted.org/freeipa/ticket/3717
2013-07-24 10:00:03 +02:00
Jan Cholasta
ea544bee4c Ask for PKCS#12 password interactively in ipa-server-install.
https://fedorahosted.org/freeipa/ticket/3717
2013-07-24 10:00:02 +02:00
Petr Vobornik
e08f4620cf Remove word 'field' from GECOS param label
No other param/field has 'field' in a label.
2013-07-23 15:32:13 +02:00
Petr Vobornik
1f89cb959c Break long words in notification area
Long words (ie. service principal) breaks out of notification area. It doesn't look good. Patch adds word-wrap to break them to multiple pieces.
2013-07-23 15:32:06 +02:00
Jakub Hrozek
4a5cbde4bb IPA KDB MS-PAC: remove unused variable 2013-07-23 16:25:26 +03:00
Jakub Hrozek
85b8c747bb IPA KDB MS-PAC: return ENOMEM if allocation fails 2013-07-23 16:25:20 +03:00
Alexander Bokovoy
7b5cc3ed83 ipaserver/dcerpc: attempt to resolve SIDs through SSSD first
Attempt to resolve SIDs through SSSD first to avoid using trust
account password. This makes possible to run HBAC test requests
without being in 'trusted admins' group.

https://fedorahosted.org/freeipa/ticket/3803
2013-07-23 16:24:38 +03:00
Tomas Babej
17c7d46c25 Use AD LDAP probing to create trusted domain ID range
When creating a trusted domain ID range, probe AD DC to get
information about ID space leveraged by POSIX users already
defined in AD, and create an ID range with according parameters.

For more details:
http://www.freeipa.org/page/V3/Use_posix_attributes_defined_in_AD
https://fedorahosted.org/freeipa/ticket/3649
2013-07-23 16:24:33 +03:00
Alexander Bokovoy
84b2269589 ipa-kdb: reinit mspac on HTTP TGT acquisition to aid trust-add case
When trust is established, we also create idrange for the trusted domain.
With FreeIPA 3.3 these ranges can have different types, and in order to
detect which one is to create, we need to do lookup at AD LDAP server.

Such lookup requires authenticated bind. We cannot bind as user because
IPA framework operates under constrained delegation using the user's
credentials and allowing HTTP/ipa.server@REALM to impersonate the user
against trusted domain's services would require two major things:

  - first, as we don't really know exact AD LDAP server names (any AD DC
    can be used), constrained delegation would have to be defined against
    a wild-card

  - second, constrained delegation requires that target principal exists
    in IPA LDAP as DN.

These two together limit use of user's ticket for the purpose of IPA
framework looking up AD LDAP.

Additionally, immediately after trust is established, issuing TGT with
MS-PAC to HTTP/ipa.server@REALM may fail due to the fact that KDB driver
did not yet refreshed its list of trusted domains -- we have limited
refresh rate of 60 seconds by default.

This patch makes possible to force re-initialization of trusted domains'
view in KDB driver if we are asked for TGT for HTTP/ipa.server@REALM.

We will need to improve refresh of trusted domains' view in KDB driver
in future to notice changes in cn=etc,$SUFFIX tree automatically.

This improvement is tracked in https://fedorahosted.org/freeipa/ticket/1302 and
https://fedorahosted.org/freeipa/ticket/3626

Part of https://fedorahosted.org/freeipa/ticket/3649
2013-07-23 16:24:29 +03:00
Alexander Bokovoy
67bcbab897 ipa-kdb: cache KDC hostname on startup
We need KDC hostname for several purposes:
- short-circuit detection of principals on the same server as KDC
- generating NetBIOS name

Make sure we cache hostname information on startup and use it
instead of detecting the hostname in run-time. This will miss the
case that KDC hostname got changed but such cases are not supported
anyway without restarting KDC and making changes to principals.
2013-07-23 16:24:24 +03:00
Petr Vobornik
881290b010 Web UI search optimization
This patch optimizes options used in commands executed by search pages.

1) Removed --all from _find and _show commands used by search pages. All displayed attributes should be already included in default attributes.

2) Removed search_all_attributes - Not needed since introduction of paging.

3) Added --no-members options to search _show commmands. Members are not displayed on search pages and such change drastically improves performance. It reduces computations on server and amount of data transferred to Web UI.

https://fedorahosted.org/freeipa/ticket/3706
2013-07-23 13:14:02 +02:00
Jan Cholasta
b7f10d9fe6 Add new hidden command option to suppress processing of membership attributes.
https://fedorahosted.org/freeipa/ticket/3706
2013-07-23 13:13:54 +02:00
Ana Krivokapic
8a8a9045b9 Fix internal error in idrange-add
Fix internal error in idrange-add, caused by a missing 'name' argument of
ValidationError.

https://fedorahosted.org/freeipa/ticket/3781
2013-07-22 10:49:40 +02:00
Ana Krivokapic
8a22bce242 Use admin@REALM when testing if SSSD is ready
https://fedorahosted.org/freeipa/ticket/3771
2013-07-19 12:37:43 +02:00
Petr Viktorin
efb7a2d54d ipa-client: Use "ipa" as the package name for i18n
IPA uses "ipa" as the "package name" for all translations,
even in the ipa-client package.

https://fedorahosted.org/freeipa/ticket/3695
2013-07-19 12:26:28 +02:00
Nathaniel McCallum
6c0b7f3389 Use libunistring ulc_casecmp() on unicode strings
https://fedorahosted.org/freeipa/ticket/3772
2013-07-18 18:08:53 +02:00
Alexander Bokovoy
e95a7b1b8d ipa-adtrust-install: configure compatibility tree to serve trusted domain users
Enables  support  for  trusted  domains  users  for old clients through Schema
Compatibility plugin.  SSSD supports trusted domains natively starting with
version 1.9 platform. For platforms that lack SSSD or run older SSSD version
one needs  to  use  this  option.  When  enabled, slapi-nis  package  needs  to
be  installed  and schema-compat-plugin will be configured to provide lookup of
users and groups from trusted domains via SSSD on IPA server. These users and
groups will be available under  cn=users,cn=compat,$SUFFIX  and
cn=groups,cn=compat,$SUFFIX trees.  SSSD will normalize names of users and
groups to lower case.

In  addition  to  providing  these users and groups through the compat tree,
this option enables authentication over LDAP for trusted domain users with DN
under compat tree, i.e. using bind DN uid=administrator@ad.domain,cn=users,cn=compat,$SUFFIX.

This authentication  is related to  PAM  stack  using  'system-auth' PAM
service. If you have disabled HBAC rule 'allow_all', then make sure there is
special service called 'system-auth' created and HBAC rule to allow access to
anyone to this rule on IPA masters is added. Please note that system-auth PAM
service is  not used directly by any other application, therefore it is safe to
create one specifically to support trusted domain users via compatibility path.

https://fedorahosted.org/freeipa/ticket/3567
2013-07-18 17:56:30 +02:00