Commit Graph

5294 Commits

Author SHA1 Message Date
Rob Crittenden
c9c55a2845 Run the CLEANALLRUV task when deleting a replication agreement.
This adds two new commands to ipa-replica-manage: list-ruv & clean-ruv

list-ruv can be use to list the update vectors the master has
configugured

clean-ruv can be used to fire off the CLEANRUV task to remove a
replication vector. It should be used with caution.

https://fedorahosted.org/freeipa/ticket/2303
2012-09-17 17:48:25 +02:00
Martin Kosek
c0630950a1 Expand Referential Integrity checks
Many attributes in IPA (e.g. manager, memberuser, managedby, ...)
are used to store DNs of linked objects in IPA (users, hosts, sudo
commands, etc.). However, when the linked objects is deleted or
renamed, the attribute pointing to it stays with the objects and
thus may create a dangling link causing issues in client software
reading the data.

Directory Server has a plugin to enforce referential integrity (RI)
by checking DEL and MODRDN operations and updating affected links.
It was already used for manager and secretary attributes and
should be expanded for the missing attributes to avoid dangling
links.

As a prerequisite, all attributes checked for RI must have pres
and eq indexes to avoid performance issues. Thus, the following
indexes are added:
  * manager (pres index only)
  * secretary (pres index only)
  * memberHost
  * memberUser
  * sourcehost
  * memberservice
  * managedby
  * memberallowcmd
  * memberdenycmd
  * ipasudorunas
  * ipasudorunasgroup

Referential Integrity plugin is updated to enforce RI for all these
attributes. Unit tests covering RI checks for all these attributes
were added as well.

Note: this update will only fix RI on one master as RI plugin does
not check replicated operations.

https://fedorahosted.org/freeipa/ticket/2866
2012-09-16 17:59:27 -04:00
Martin Kosek
2ecfe571fa Run index task in ldap updater only when needed
When LDAP updater detected an update instruction in indexing tree, it run
an indexing task and waited until it ends. However, the task was run
regardless of the update instruction result. This lead to unnecessary
index tasks being defined and waited for which makes the whole LDAP
last longer.

Execute indexing task only when an index add/update instruction is
successful.

https://fedorahosted.org/freeipa/ticket/2866
2012-09-16 17:59:19 -04:00
Martin Kosek
d8ba7d9145 Amend memberAllowCmd and memberDenyCmd attribute types
Attribute types of attributes designed to hold DN values are not
supposed to hold own ORDERING or SUBSTR matching rules (which were
even not correct in this case).

Update these attributes to only define an EQUALITY rule just like
other DN attribute types in IPA.

https://fedorahosted.org/freeipa/ticket/2866
2012-09-16 17:59:12 -04:00
Martin Kosek
edf8138568 Add attributeTypes to safe schema updater
AttributeType updates are sensitive to case, whitespace or X-ORIGIN mismatch
just like ObjectClass attribute which is already being normalized before
an update value is compared with update instructions.

Expand safe schema updater routine to cover both ObjectClasses and
AttributeTypes updates.

https://fedorahosted.org/freeipa/ticket/2440
2012-09-16 17:59:06 -04:00
Martin Kosek
cd7a85c12c Fix addattr internal error
When ADD command is being executed and a single-value object attribute
is being set with both option and addattr IPA ends up in an internal
error.

Make better value sanitizing job in this case and let IPA throw
a user-friendly error. Unit test exercising this situation is added.

https://fedorahosted.org/freeipa/ticket/2429
2012-09-16 17:52:56 -04:00
Sumit Bose
d491ba0289 ipasam: Fixes build with samba4 rc1 2012-09-14 16:50:52 +02:00
Petr Viktorin
094dba5466 Update the pot file (translation source)
Generated by running `make update-pot` in install/po
2012-09-12 22:04:16 -04:00
Petr Vobornik
1aea8bd18e JSON serialization of long type
Numbers of long type were incorrectly serialized to JSON as empty strings when using json_serialize function. It caused problem in serialization of metadata for Web UI. This patch is fixing it.

Discovered after "Cast DNS SOA serial maximum boundary to long"
2012-09-13 16:47:00 +02:00
Jan Cholasta
f6fed3c547 Add --no-ssh option to ipa-client-install to disable OpenSSH client configuration.
If both --no-ssh and --no-sshd are specified, do not configure the SSH service
in SSSD.

ticket 3070
2012-09-13 13:13:48 +02:00
Jan Cholasta
8728d3145f Add the SSH service to SSSD config file before trying to activate it.
ticket 3069
2012-09-13 13:13:16 +02:00
Petr Viktorin
2225730e99 Use temporary key cache for host key in server installation
This fixes an oversight in the earlier patch
2012-09-13 12:38:43 +02:00
Rob Crittenden
79b90d1465 Set SELinux default context to unconfined_u:s0-s0:c0.c1023
Don't require ipaselinuxdefaultuser to be set. If this is unset then
SSSD will use the system default.

https://fedorahosted.org/freeipa/ticket/3045
2012-09-13 12:35:43 +02:00
Tomas Babej
46f09fb8cc Make sure selinuxusemap behaves consistently to HBAC rule
Both selinuxusermap-add and selinuxusermap-mod commands now behave
consistently in not allowing user/host category or user/host members
and HBAC rule being set at the same time. Also adds a bunch of unit
tests that check this behaviour.

https://fedorahosted.org/freeipa/ticket/2983
2012-09-12 16:13:17 +02:00
Petr Viktorin
c87ac6bc67 Fix server installation
The fix to ticket #2982 removed a kinit call when the client was installed
as part of a master. Re-add the kinit call in this case.
2012-09-11 15:41:45 -04:00
Petr Vobornik
b4d35718a5 Prevent opening of multiple dirty dialogs on navigation
Facets which performs AJAX call after update refresh (clear dirty state) after calling callback of dirty dialog. It might lead to multiple openings of dirty dialog.

Assuming that calling dirty dialog's callback can be evaluated as "dirty state is gone", we can call reset in the callback to prevent the issue. There will be an incorrect state in the facet for a moment. It will be fixed soon on execute of callback of the refresh AJAX call. It is not an issue because it will happen in background. User will be looking on different facet.

https://fedorahosted.org/freeipa/ticket/2667
2012-09-12 09:37:53 +02:00
Petr Viktorin
1f831393a2 ipa-client-install: Obtain host TGT from one specific KDC
When clients install, they use kinit to obtain a TGT, which uses DNS to find
the KDC to connect to. It might happen that the newly created principal
has not replicated to selected KDC yet, making kinit fail and aborting the
install.

The client sets a temporary krb5 config file while installing via $KRB5_CONFIG.
Modify this file so that the kerberos library only uses the specific server
we're installing under, and call kinit while it's still in place.

Clean up the configure_krb5_conf function to remove unused arguments. For
clarity, use keyword arguments when calling it.

https://fedorahosted.org/freeipa/ticket/2982
2012-09-10 23:20:15 -04:00
Petr Vobornik
a4ab88445c Reflect API change of SSH store in Web UI
Format of ipasshpubkey in users and hosts changed from BYTES to STR. Web UI no longer gets the value as base64 encoded string in a object.

Label was changed to reflect that the key don't have to be plain base64 encoded blob.

https://fedorahosted.org/freeipa/ticket/2989
2012-09-06 19:18:22 -04:00
Jan Cholasta
46ad724301 Use OpenSSH-style public keys as the preferred format of SSH public keys.
Public keys in the old format (raw RFC 4253 blob) are automatically
converted to OpenSSH-style public keys. OpenSSH-style public keys are now
stored in LDAP.

Changed sshpubkeyfp to be an output parameter, as that is what it actually
is.

Allow parameter normalizers to be used on values of any type, not just
unicode, so that public key blobs (which are str) can be normalized to
OpenSSH-style public keys.

ticket 2932, 2935
2012-09-06 19:11:57 -04:00
Rob Crittenden
0f81268ec4 Fix some restart script issues found with certificate renewal.
The restart_dirsrv script wasn't initializing the api so the
startup_timeout wasn't available.

The subsystemCert cert-pki-ca definition was missing so we didn't
know which certificate to update in CS.cfg.

Add some documentation and a pause between restarts for the
renew_ca_cert script so that when the CA subsystem certs are renewed
they don't all try to restart the CA at the same time.

https://fedorahosted.org/freeipa/ticket/3006
2012-09-06 19:09:18 -04:00
Sumit Bose
f33adf22f8 Trust CLI: mark trust-mod for future use
Fixes: https://fedorahosted.org/freeipa/ticket/2968
2012-09-07 16:50:35 +02:00
Sumit Bose
d4ba746003 Trust CLI: return more details of added trust
Fixes: https://fedorahosted.org/freeipa/ticket/2971
2012-09-07 16:50:35 +02:00
Sumit Bose
94ce8ecb9c Trust CLI: Return more details when searching trusts
Fixes https://fedorahosted.org/freeipa/ticket/2970
2012-09-07 16:50:35 +02:00
Sumit Bose
e23acda5b8 Do not create trust if murmur hash is not available and base-id not given
Fixes https://fedorahosted.org/freeipa/ticket/3018
2012-09-07 16:50:35 +02:00
Sumit Bose
fe083fd5bf IDRange CLI: Add documentation
Fixes https://fedorahosted.org/freeipa/ticket/2969
2012-09-07 16:50:35 +02:00
Sumit Bose
67b47a65f2 IDRange CLI: allow to work without arguments
Fixes https://fedorahosted.org/freeipa/ticket/2999
2012-09-07 16:50:35 +02:00
Sumit Bose
377e1267b7 Rename range CLI to idrange 2012-09-07 16:50:35 +02:00
Martin Kosek
1915c2d4dd Cast DNS SOA serial maximum boundary to long
This will fix i386 builds where the SOA serial value written
in API.txt was already of a long type while on x86_64 it was still
of an int type.
2012-09-07 15:40:00 +02:00
Martin Kosek
7c054377e3 Update DNS zone allow-query validation test
localhost and localnets ACIs are now allowed. Update the respective
unit test.
2012-09-07 13:50:54 +02:00
Rob Crittenden
e4e5bd0595 Set the e-mail attribute using the default domain name by default
https://fedorahosted.org/freeipa/ticket/2810
2012-09-07 13:36:37 +02:00
Rob Crittenden
26dfbe61dd Add version to replica prepare file, prevent installing to older version 2012-09-07 12:58:55 +02:00
Martin Kosek
ac6cc479ed Add range safety check for range_mod and range_del
range_mod and range_del command could easily create objects with
ID which is suddenly out of specified range. This could cause issues
in trust scenarios where range objects are used for computation of
remote IDs.

Add validator for both commands to check if there is any object with
ID in the range which would become out-of-range as a pre_callback.
Also add unit tests testing this new validator.

https://fedorahosted.org/freeipa/ticket/2919
2012-09-06 20:32:07 +02:00
Petr Vobornik
835c7859c5 Update of confirmation of actions
This patch is changing confirmation of actions according to ticket #3035, see the ticket description.

It does following changes:
 * Confirmation of update action was removed.
 * Action lists resets to first action (which is usually a NOP: '-- select action --') on change of displayed entry.
 * New confirmation dialog was implemented. It is used for action confirmation. It is used in IPA.action to replace the call of window.confirm(message). The old call is a modal window which blocks all JS functionality and has different style than other dialogs in Web UI. The new one has same design and doesn't block background operations.

 https://fedorahosted.org/freeipa/ticket/3035
2012-09-06 17:36:29 +02:00
Rob Crittenden
a01fbb91e8 Set minimum of 389-ds-base to 1.2.11.8 to pick up cache warning.
If the DB is bigger than nsslapd-cachememsize then a warning will be
logged by 389-ds-base.

https://fedorahosted.org/freeipa/ticket/2739
2012-09-05 15:52:51 -04:00
Martin Kosek
6abe476459 Fix DNS SOA serial parameters boundaries
Set correct boundaries for DNS SOA serial parameters (see RFC 1035,
2181).

https://fedorahosted.org/freeipa/ticket/2568
2012-09-06 14:57:48 +02:00
Martin Kosek
cfbea2a99e Transfer long numbers over XMLRPC
Numeric parameters in ipalib were limited by XMLRPC boundaries for
integer (2^31-1) which is too low for some LDAP attributes like DNS
SOA serial field.

Transfer numbers which are not in XMLRPC boundary as a string and not
as a number to workaround this limitation. Int parameter had to be
updated to also accept Python's long type as valid int type.

https://fedorahosted.org/freeipa/ticket/2568
2012-09-06 14:57:07 +02:00
Rob Crittenden
71f9008906 Support the new Winsync POSIX API.
This will sync down the POSIX attributes from AD so we need to be careful
to not mess with them when they are already set. This includes
uidNumber, gidNumber, homeDirectory, loginShell and gecos.

http://port389.org/wiki/WinSync_Posix
http://port389.org/wiki/Windows_Sync_Plugin_API#Version_3_API_functions

https://fedorahosted.org/freeipa/ticket/3007
2012-09-06 14:29:14 +02:00
Petr Vobornik
da0be8b6b1 Allow localhost in zone ACIs - Web UI
Loopback address, "localhost" and "localnets" ACIs are no longer
an issue for bind-dyndb-ldap. Allow them in our Web UI validators as well.
2012-09-06 13:59:33 +02:00
Martin Kosek
47ff46d042 Allow localhost in zone ACIs
Loopback address, "localhost" and "localnets" ACIs are no longer
an issue for bind-dyndb-ldap. Allow them in our validators.
2012-09-06 13:58:36 +02:00
Petr Vobornik
22b7d7e7d9 Fixed problem while deleting entry with unsaved changes
While deleting an entry it now resets a facet if there are unsaved changes. It prevents pop up of various error dialogs when UI tries to redirect to search page after successful delete.

https://fedorahosted.org/freeipa/ticket/3047
2012-09-06 10:27:36 +02:00
Petr Vobornik
da10cc96a6 Generated metadata for testing updated
Testing metadata needs to be updated because of fix in json serialization.

https://fedorahosted.org/freeipa/ticket/3052
2012-09-06 10:27:26 +02:00
Petr Vobornik
77ad84f47e Added decimal checks to metadata validator
Medatadata validator didn't have check for decimal values. It was added.

https://fedorahosted.org/freeipa/ticket/3052
2012-09-06 10:27:16 +02:00
Petr Vobornik
07cae43484 Fixed metadata serialization of Numbers and DNs
There were following problems:
1. DNs and Decimals weren't properly serialized. Serialization output was object with empty __base64__ attribute. It was fixed by converting them to string.
2. numberical values equal to 0 were excluded from metadata. It broke many of minvalue checks in Web UI. Now excluding only None and False values as initally intended.

https://fedorahosted.org/freeipa/ticket/3052
2012-09-06 10:27:10 +02:00
Petr Vobornik
6a8d6d3fde Notify success on add, delete and update
Notification of success was added to:
 * details facet: update
 * association facet and association widget: add, delete items
 * attribute facet: delete items (notification of add should be handled in entity adder dialog)
 * sudo rule: add, remove option
 * dnsrecord: add, update, delete

https://fedorahosted.org/freeipa/ticket/2977
2012-09-06 09:44:15 +02:00
Petr Vobornik
6ae286a8f5 Permissions: select only applicable options on type change
Problem:
 When a permission is edited, and Type switched, the attributes selected for
 previous Type are still selected, and update fails, if they are invalid for the
 new Type. But it should get deselected or not even listed if Type changes.

Fix:
 When Type is changed, attribute list is refreshed and still applicable attributes
 are chosen. If Type is reverted back, previously chosen  attributes are back as chosen.

 If attributes are extended outside Web UI by not listed attr, this attr is listed at
 the list end.

Note:
 If user makes change in attribute list before type change, this change is forgotten.

https://fedorahosted.org/freeipa/ticket/2617
2012-09-06 09:41:44 +02:00
Petr Vobornik
a8a80d983e Fixed search in HBAC test
Search in HBAC test wasn't working because expired flag wasn't set.

https://fedorahosted.org/freeipa/ticket/2931
2012-09-06 09:41:22 +02:00
Sumit Bose
bd7f3e4b17 ipasam: replace trim_char() with trim_string() 2012-09-06 09:24:59 +02:00
Sumit Bose
931e890680 ipasam: remove fetch_ldap_pw() 2012-09-06 09:24:59 +02:00
Sumit Bose
260940ceb4 ipasam: replace get_global_sam_sid() 2012-09-06 09:24:59 +02:00
Sumit Bose
621b28a4a0 ipasam: add libsss_idmap context and replace string_to_sid() 2012-09-06 09:24:59 +02:00