Commit Graph

2555 Commits

Author SHA1 Message Date
Thierry Bordaz
2744326147 User life cycle: user-find support finding delete users
change user plugin commands : user-find
user-find support of --preserved option to show preserved (aka deleted) users

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Thierry Bordaz
4ef32967f7 User life cycle: user-del supports --permanently, --preserve options and ability to delete deleted user
change user plugin commands : user-del
	- --permanently: deletes permanently an Active user (DEL)
	- --preserve: move an Active user to Delete user (MODRDN)
	- allows to delete Active user and Delete user

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Thierry Bordaz
699dd77102 User life cycle: new stageuser commands activate (provisioning)
Add plugin commands to stageuser plugin:
stageuser_activate: activate entries created by provisioning

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Thierry Bordaz
0ebcc5b922 User life cycle: new stageuser commands activate
Add plugin commands to stageuser plugin:
stageuser_activate: activate entries created by IPA CLIs

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Thierry Bordaz
f2e986e01f User life cycle: new stageuser commands del/mod/find/show
Add plugin commands to stageuser plugin:
	stageuser_del
	stageuser_mod
	stageuser_find
	stageuser_show

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Jan Cholasta
dc668b1b6a baseldap: Fix possible crash in LDAPObject.handle_duplicate_entry 2015-05-15 14:28:52 +00:00
Petr Vobornik
91b39acd6b cli: differentiate Flag a Bool when autofill is set
With previous behavior there was no difference between Flag and Bool if
- autofill == True
- default = some value

It prevented to have a boolean which is set by default to true, but could
be set to False if users wants to without prompting in interactive shell.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
3b0e81ce06 migrate-ds: log migrated group members only on debug level
It pollutes error_log.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
c3d99a28a0 migrate-ds: optimize gid checks by utilizing dictionary nature of set
Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
a6ca9800fa migrate-ds: remove unused def_group_gid context property
it's no longer used anywhere

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
fda9698844 migrate-ds: skip default group option
New option --use-default-group=False could be used to disable adding of
migrated users into default group.

By default, the default group is no longer POSIX therefore it doesn't
fulfill the original idea of providing GID and therefore it could be
skipped during migration.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
2c1bca3b0f migrate-ds: optimize adding users to default group
Migrate-ds searches for user without a group and adds them to default group.
There is no point in checking if the user's selected by previous queary are
not member of default group because they are not member of any group.

The operation is also speeded up by not fetching the default group. Users
are added right away.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-12 12:41:34 +02:00
Petr Vobornik
375eb75833 use Connectible.disconnect() instead of .destroy_connection()
Destroy connection is an internal function of Connectible and therefore
it should not be used directly.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-07 18:16:16 +02:00
Gabe
d1a0474d18 Unsaved changes dialog internally inconsistent
https://fedorahosted.org/freeipa/ticket/4926

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-05-07 10:38:26 +02:00
David Kupka
9b706e74d5 Make lint work on Fedora 22.
pylint added 'confidence' parameter to 'add_message' method of PyLinter.
To be compatible with both, pre- and post- 1.4  IPALinter must accept
the parameter but not pass it over.
Also python3 checker was added and enabled by default. FreeIPA is still
not ready for python3.
Additionally few false-positives was marked.

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-04-27 11:02:57 +02:00
Petr Vobornik
4364ac08c5 speed up indirect member processing
the old implementation tried to get all entries which are member of group.
That means also user. User can't have any members therefore this costly
processing was unnecessary.

New implementation reduces the search only to entries which have members.

Also page size was removed to avoid paging by small pages(default size: 100)
which is very slow for many members.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-04-27 05:55:04 +00:00
Petr Vobornik
e4930b3235 speed up convert_attribute_members
A workaround to avoid usage of slow LDAPEntry._sync_attr #4946

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-04-20 07:52:51 +00:00
Jan Cholasta
db88498c95 ldap: Move schema handling from IPASimpleLDAPObject to LDAPClient
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2015-04-16 06:58:31 +00:00
Thierry Bordaz
c20009123f User life cycle: allows MODRDN from ldap2
enhance update_entry_rdn so that is allows
to move an entry a new superior

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-04-16 06:50:16 +00:00
Martin Basti
f24f614396 Server Upgrade: specify order of plugins in update files
* add 'plugin' directive
* specify plugins order in update files
* remove 'run plugins' options
* use ldapupdater API instance in plugins
* add update files representing former PreUpdate and PostUpdate order of plugins

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-04-14 19:25:47 +02:00
Thierry bordaz (tbordaz)
d1691eee88 User life cycle: stageuser-add verb
Add a accounts plugin (accounts class) that defines
variables and methods common to 'users' and 'stageuser'.
accounts is a superclass of users/stageuser

Add the stageuser plugin, with support of stageuser-add verb.

Reviewed By: David Kupka, Martin Basti, Jan Cholasta

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: David Kupka <dkupka@redhat.com>
2015-04-08 08:19:09 +02:00
Martin Basti
b92136cba2 Fix ldap2 shared connection
Since API is not singleton anymore, ldap2 connections should not be
shared by default.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-04-02 12:26:04 +00:00
David Kupka
5a03462bfc Use mod_auth_gssapi instead of mod_auth_kerb.
https://fedorahosted.org/freeipa/ticket/4190

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Simo Sorce <ssorce@redhat.com>
2015-03-30 13:06:12 +00:00
Martin Babinsky
5a5e1a2494 migrate-ds: print out failed attempts when no users/groups are migrated
This patch should fix both https://fedorahosted.org/freeipa/ticket/4846 and
https://fedorahosted.org/freeipa/ticket/4952.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-03-23 13:08:41 +01:00
Jan Cholasta
39e474e14e certstore: Make certificate retrieval more robust
https://fedorahosted.org/freeipa/ticket/4565

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-03-19 14:38:34 +00:00
Martin Basti
f26220b9b3 DNS: remove NSEC3PARAM from records
NSEC3PARAM is configurable only from zone commands. This patch removes
this record type from DNS records.

Ticket: https://fedorahosted.org/freeipa/ticket/4930
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-03-09 15:21:04 +01:00
Martin Basti
63c497a1fb DNS fix: do not show part options for unsupported records
Do not show parts options in help output, if record is marked as unsupported.

Ticket: https://fedorahosted.org/freeipa/ticket/4930
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-03-09 15:21:04 +01:00
Martin Basti
0c3bf595f3 DNS fix: do not traceback if unsupported records are in LDAP
Show records which are unsupported, if they are in LDAP.
Those records are not editable, and web UI doesnt show them.

Fixes traceback caused by --structured option

Ticket: https://fedorahosted.org/freeipa/ticket/4930
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-03-09 15:21:04 +01:00
Jan Cholasta
2625efa727 advise: Add separate API object for ipa-advise
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-03-05 11:01:36 +01:00
Jan Cholasta
dae6a18813 ipalib: Move plugin package setup to ipalib-specific API subclass
https://fedorahosted.org/freeipa/ticket/3090

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-03-05 11:01:36 +01:00
Jan Cholasta
2db741e847 ipalib: Allow multiple API instances
Merged the Registrar class into the Registry class. Plugins are now
registered globally instead of in ipalib.api and are instantiated per-API
instance. Different set of plugin base classes can be used in each API
instance.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-03-05 11:01:36 +01:00
Tomas Babej
93f3bb3ddd idviews: Use case-insensitive detection of Default Trust View
The usage of lowercased varsion of 'Default Trust View' can no
longer be used to bypass the validation.

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

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2015-02-23 17:51:21 +01:00
Tomas Babej
72af5fd975 ipalib: Make sure correct attribute name is referenced for fax
Fixes the invalid attribute name reference in the
'System: Read User Addressbook Attributes' permission.

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2015-02-19 18:36:16 +01:00
Martin Babinsky
b95f4330c9 Changing the token owner changes also the manager
This works if the change is made to a token which is owned and managed by the
same person. The new owner then automatically becomes token's manager unless
the attribute 'managedBy' is explicitly set otherwise.

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

Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
2015-02-18 13:55:27 +01:00
Martin Kosek
8ea8a7038e group-detach does not add correct objectclasses
https://fedorahosted.org/freeipa/ticket/4874

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-02-18 13:18:31 +01:00
Petr Vobornik
76d401bb88 Fix TOTP Synchronization Window label
Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
2015-02-17 08:26:42 +01:00
Gabe
3117e7b79c permission-add does not prompt for ipapermright in interactive mode
- Add flag "ask_create" to ipalib/plugins/permission.py
- Bump API version

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-02-16 16:39:03 +01:00
Martin Babinsky
06376a48b2 migrate-ds: exit with error message if no users/groups to migrate are found
'ipa migrate-ds' will now exit with error message if no suitable users/groups
are found on LDAP server during migration.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-02-16 16:33:46 +01:00
Martin Basti
9cbbcadd04 Fix warning message on client side
Add message about only on server side.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-02-13 08:52:15 +01:00
Nathaniel McCallum
9549a5984b Expose the disabled User Auth Type
Additionally, fix a small bug in ipa-kdb so that the disabled User
Auth Type is properly handled.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-02-12 10:31:24 +01:00
David Kupka
3b87302f5a idviews: Allow setting ssh public key on ipauseroverride-add
https://fedorahosted.org/freeipa/ticket/4868

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-01-27 16:03:13 +00:00
Martin Basti
af0a2409f9 Always return absolute idnsname in dnszone commands
Ticket: https://fedorahosted.org/freeipa/ticket/4722
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-01-26 07:07:44 +00:00
Martin Kosek
6652c4eb2e Allow PassSync user to locate and update NT users
Add new PassSync Service privilege that have sufficient access to
let AD PassSync service search for NT users and update the password.
To make sure existing PassSync user keeps working, it is added as
a member of the new privilege.

New update plugin is added to add link to the new privilege to the
potentially existing PassSync user to avoid breaking the PassSync
service.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-01-19 16:49:27 +01:00
Martin Basti
95371bd736 Detect and warn about invalid DNS forward zone configuration
Shows warning if forward and parent authoritative zone do not have
proper NS record delegation, which can cause the forward zone will be
ineffective and forwarding will not work.

Ticket: https://fedorahosted.org/freeipa/ticket/4721
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-01-15 13:20:12 +01:00
Tomas Babej
e11e8235ac baseldap: Handle missing parent objects properly in *-find commands
The find_entries function in ipaldap does not differentiate between
a LDAP search that returns error code 32 (No such object) and LDAP
search returning error code 0 (Success), but returning no results.

In both cases errors.NotFound is raised. In turn, LDAPSearch
commands interpret NotFound exception as no results.

To differentiate between the cases, a new error EmptyResult
was added, which inherits from NotFound to preserve the compatibility
with the new code.

This error is raised by ipaldap.find_entries in case it is performing
a search with and the target dn does not exist.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-01-13 16:16:14 +00:00
David Kupka
b0f412177f Remove ipanttrustauthincoming/ipanttrustauthoutgoing from ipa trust-add output.
https://fedorahosted.org/freeipa/ticket/4787

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-01-13 15:33:55 +01:00
Petr Spacek
2ff8ced517 Fix default value type for wait_for_dns option
wait_for_dns value should be an integer so default value was changed from
False to 0.

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2015-01-13 11:53:00 +01:00
Petr Vobornik
a18ef90284 rpcclient: use json_encode_binary for verbose output
`json.dumps` is not able to process some IPA's object types and therefore requires to preprocess it with `json_encode_binary` call. This step was not used in  rpcclient's verbose output.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-01-13 10:18:33 +01:00
Petr Vobornik
e6beaaccce migrate-ds: fix compat plugin check
After ACI refactoring, admin cannot read Schema Compatibility plugin configuration and therefore migrade-ds won't find if compat plugin is enabled.

Now the check si done by looking if cn=compat subtree is present.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-01-12 17:44:17 +00:00
Tomas Babej
c5c9d49706 idviews: Ignore host or hostgroup options set to None
Since passing --hosts= or --hostsgroups= to idview-apply or unapply
commands does not make sense, ignore it.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2014-12-12 17:04:21 +01:00