summaryrefslogtreecommitdiffstats
path: root/ipatests
Commit message (Collapse)AuthorAgeFilesLines
* Use Python3-compatible dict method namesPetr Viktorin2015-09-0112-36/+40
| | | | | | | | | | | | | | | | | | | | | | Python 2 has keys()/values()/items(), which return lists, iterkeys()/itervalues()/iteritems(), which return iterators, and viewkeys()/viewvalues()/viewitems() which return views. Python 3 has only keys()/values()/items(), which return views. To get iterators, one can use iter() or a for loop/comprehension; for lists there's the list() constructor. When iterating through the entire dict, without modifying the dict, the difference between Python 2's items() and iteritems() is negligible, especially on small dicts (the main overhead is extra memory, not CPU time). In the interest of simpler code, this patch changes many instances of iteritems() to items(), iterkeys() to keys() etc. In other cases, helpers like six.itervalues are used. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Use six.string_types instead of "basestring"Petr Viktorin2015-09-013-12/+18
| | | | | Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Integration tests for topology pluginOleg Fayans2015-08-283-21/+241
| | | | | Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Fix user tracker to reflect new user-del messageLenka Doudova2015-08-271-1/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* vault: fix vault tests after default type changePetr Vobornik2015-08-261-2/+9
| | | | | | https://fedorahosted.org/freeipa/ticket/5251 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Port from python-krbV to python-gssapiMichael Simacek2015-08-265-26/+14
| | | | | | | | | | | | | | | | | | python-krbV library is deprecated and doesn't work with python 3. Replacing all it's usages with python-gssapi. - Removed Backend.krb and KRB5_CCache classes They were wrappers around krbV classes that cannot really work without them - Added few utility functions for querying GSSAPI credentials in krb_utils module. They provide replacements for KRB5_CCache. - Merged two kinit_keytab functions - Changed ldap plugin connection defaults to match ipaldap - Unified getting default realm Using api.env.realm instead of krbV call Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Robbie Harwood <rharwood@redhat.com> Reviewed-By: Simo Sorce <ssorce@redhat.com>
* Added support for changing vault encryption.Endi S. Dewata2015-08-251-0/+249
| | | | | | | | | | | | The vault-mod command has been modified to support changing vault encryption attributes (i.e. type, password, public/private keys) in addition to normal attributes (i.e. description). Changing the encryption requires retrieving the stored secret with the old attributes and rearchiving it with the new attributes. https://fedorahosted.org/freeipa/ticket/5176 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Automated test for stageuser pluginLenka Doudova2015-08-253-6/+1421
| | | | | | | | Ticket: https://fedorahosted.org/freeipa/ticket/3813 Test plan: http://www.freeipa.org/page/V4/User_Life-Cycle_Management/Test_Plan Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
* Temporary fix for ticket 5240Oleg Fayans2015-08-241-2/+2
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added a user-friendly output to an import errorOleg Fayans2015-08-241-1/+5
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipatests: Take otptoken import test out of executionMilan Kubík2015-08-201-0/+2
| | | | | | | | | | | | The issue reported in ticket [1] hasn't been solved yet. This patch prevents the test cases for OTP import being run. The change is intended as a *temporary* workaround until proper fix for the issue is introduced. [1] https://fedorahosted.org/freeipa/ticket/5192 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use absolute importsPetr Viktorin2015-08-1235-43/+58
| | | | | | | In Python 3, implicit relative imports will not be supported. Use fully-qualified imports everywhere. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Replace dict.has_key with the 'in' operatorPetr Viktorin2015-08-123-26/+26
| | | | | | | | | The deprecated has_key method will be removed from dicts in Python 3. For custom dict-like classes, has_key() is kept on Python 2, but disabled for Python 3. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Modernize function and method attribute namesPetr Viktorin2015-08-121-4/+4
| | | | | | | | Python 3 uses double-underscored names for internal function attributes. In Python 2.7, these names exist as aliases to the old 'func_*' and 'im_*' names. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* Modernize 'except' clausesPetr Viktorin2015-08-1213-32/+32
| | | | | | | The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
* test suite for user/host/service certificate management API commandsMartin Babinsky2015-08-031-0/+349
| | | | | | | | | These tests excercise various scenarios when using new class of API commands to add or remove certificates to user/service/host entries. Part of http://www.freeipa.org/page/V4/User_Certificates Reviewed-By: Milan Kubík <mkubik@redhat.com>
* tests: Allow Tracker.dn be an instance of FuzzyMilan Kubík2015-07-311-2/+3
| | | | | | | | | | | | | Some of the IPA LDAP entries are using ipaUniqueID as the "primary key". To match this UUID based attribute in assert_deepequal, an instance of Fuzzy class must be used. This change adds the possibility to assign the Fuzzy object as the DN for the tracked entry. The user may need to override the rdn and name properties for the class using the Fuzzy DN. Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* Modernize number literalsPetr Viktorin2015-07-312-4/+4
| | | | | | | | | | | | | | Use Python-3 compatible syntax, without breaking compatibility with py 2.7 - Octals literals start with 0o to prevent confusion - The "L" at the end of large int literals is not required as they use long on Python 2 automatically. - Using 'int' instead of 'long' for small numbers is OK in all cases except strict type checking checking, e.g. type(0). https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Added test - topology plugin is listed among DS pluginsOleg Fayans2015-07-271-0/+70
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: test_cert: Services can have multiple certificatesTomas Babej2015-07-221-4/+4
| | | | | | | | | Old certificates of the services are no longer removed and revoked after new ones have been issued. Check that both old and new certificates are present. Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: test_rpc: Create connection for the current threadTomas Babej2015-07-221-0/+3
| | | | | | | Both context.xmlclient and context.xmlclient_<id> need to be created in order to successfully call the Command.forward method. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: vault_plugin: Skip tests if KRA not availableTomas Babej2015-07-221-0/+11
| | | | Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: Version is currently generated during command callTomas Babej2015-07-221-35/+16
| | | | | | | | In the previous versions, version in the response was generated as part of the process_keyword_arguments method. This is no longer true, and so the explicit check for it should be removed. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: realmdomains_plugin: Add explanatory commentTomas Babej2015-07-221-0/+3
| | | | | | | | | | | The realmdomains_mod command will fail if the testing environment is configured improperly and the IPA domain's NS/SOA records are not resolvable. This can easily happen if the machine's DNS server is not configured to the IPA server. Leave a explanatory note in the class. Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: service_plugin: Make sure the cert is decoded from base64Tomas Babej2015-07-221-1/+5
| | | | Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: user_plugin: Add preserved flag when --all is usedTomas Babej2015-07-211-1/+4
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* Py3: replace tab with spaceMartin Basti2015-07-171-3/+3
| | | | | | python3 does not allow to mix spaces and tabs Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Fix minor typosYuri Chornoivan2015-07-171-1/+1
| | | | | | | | | | | | | <ame> -> <name> overriden -> overridden ablity -> ability enties -> entries the the -> the https://fedorahosted.org/freeipa/ticket/5109 Reviewed-By: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Added vault access control.Endi S. Dewata2015-07-081-6/+21
| | | | | | | | | | | New LDAP ACIs have been added to allow vault owners to manage the vaults and to allow members to access the vaults. New CLIs have been added to manage the owner and member list. The LDAP schema has been updated as well. https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Added ipaVaultPublicKey attribute.Endi S. Dewata2015-07-071-2/+2
| | | | | | | | | A new attribute ipaVaultPublicKey has been added to replace the existing ipaPublicKey used to store the vault public key. https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Added symmetric and asymmetric vaults.Endi S. Dewata2015-07-071-23/+198
| | | | | | | | | | | The vault plugin has been modified to support symmetric and asymmetric vaults to provide additional security over the standard vault by encrypting the data before it's sent to the server. The encryption functionality is implemented using the python-cryptography library. https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* plugable: Remove unused call method of PluginJan Cholasta2015-07-011-10/+0
| | | | | | https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Specify plugin base classes and modules using API propertiesJan Cholasta2015-07-011-1/+5
| | | | | | https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Change is_production_mode to method of APIJan Cholasta2015-07-012-12/+59
| | | | | | https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Remove SetProxy, DictProxy and MagicDictJan Cholasta2015-07-011-170/+0
| | | | | | https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Pass API to plugins on initialization rather than using set_apiJan Cholasta2015-07-0115-143/+136
| | | | | | https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Load plugins only from modules imported by APIJan Cholasta2015-07-016-19/+19
| | | | | | | | Previously all plugin modules imported from anywhere were added to the API. https://fedorahosted.org/freeipa/ticket/3090 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* plugable: Move plugin base class and override logic to APIJan Cholasta2015-07-011-97/+21
| | | | | | | | | | | | Each API object now maintains its own view of registered plugins. This change removes the need to register plugin base classes. This reverts commit 2db741e847c60d712dbc8ee1cd65a978a78eb312. https://fedorahosted.org/freeipa/ticket/3090 https://fedorahosted.org/freeipa/ticket/5073 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* generalize certificate creation during testingMartin Babinsky2015-06-233-26/+26
| | | | | | | | | | | With added support for multiple certificates for hosts, services, and even users, IPA testing framework will need a more flexible way to generate temporary testing certificates for these entities. This patch modifies the currently used `testcert` module to support these requirements. Related to work on http://www.freeipa.org/page/V4/User_Certificates Reviewed-By: Milan Kubík <mkubik@redhat.com>
* DNSSEC: validate forward zone forwardersMartin Basti2015-06-111-0/+20
| | | | | | | | | | Show warning messages if DNSSEC validation is failing for particular FW zone or if the specified forwarders do not work https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* DNSSEC: Improve global forwarders validationMartin Basti2015-06-111-2/+3
| | | | | | | | | | Validation now provides more detailed information and less false positives failures. https://fedorahosted.org/freeipa/ticket/4657 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* vault: Move vaults to cn=vaults,cn=kraJan Cholasta2015-06-101-12/+12
| | | | | | https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: David Kupka <dkupka@redhat.com>
* Added vault-archive and vault-retrieve commands.Endi S. Dewata2015-06-081-1/+71
| | | | | | | | | | New commands have been added to archive and retrieve data into and from a vault, also to retrieve the transport certificate. https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Abstract the HostTracker class from host plugin testMilan Kubík2015-06-052-150/+292
| | | | | | | | | | | Implements a base class to help test LDAP based plugins. The class has been decoupled from the original host plugin test and moved to separate module ipatests.test_xmlrpc.ldaptracker. https://fedorahosted.org/freeipa/ticket/5032 Reviewed-By: David Kupka <dkupka@redhat.com>
* Add plugin to manage service constraint delegationsRob Crittenden2015-06-032-0/+602
| | | | | | | | | | Service Constraints are the delegation model used by ipa-kdb to grant service A to obtain a TGT for a user against service B. https://fedorahosted.org/freeipa/ticket/3644 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added vault plugin.Endi S. Dewata2015-05-251-0/+445
| | | | | | | | | A new plugin has been added to manage vaults. Test scripts have also been added to verify the functionality. https://fedorahosted.org/freeipa/ticket/3872 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* User life cycle: Stage user Administrators permission/priviledgeThierry Bordaz2015-05-182-0/+4
| | | | | | | | Creation of stage user administrator https://fedorahosted.org/freeipa/ticket/3813 Reviewed-By: David Kupka <dkupka@redhat.com>
* webui-ci: fix type error in host_tasks inicializationsPetr Vobornik2015-05-122-2/+4
| | | | | | host_tasks initializations were not modified along with pytest migration Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Test Objectclass of postdetach groupLenka Ryznarova2015-05-071-0/+69
| | | | | | | | | Add regression test to check whether a post detach group has a full set of objectclass. Add regression test to check whether group-add-member is successfull for a post detach group. https://fedorahosted.org/freeipa/ticket/4909 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* webui-ci: do not open 2 browser windowsPetr Vobornik2015-05-071-3/+3
| | | | Reviewed-By: Milan Kubik <mkubik@redhat.com>