summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
Commit message (Collapse)AuthorAgeFilesLines
* Add options to run only ipaclient unittestsChristian Heimes2017-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new option for ipa-run-tests makes the test runner ignore subdirectories or skips tests that depend on the ipaserver package or on a running framework for RPC integration tests. The new option enables testing of client-only builds. $ ipatests/ipa-run-tests --ipaclient-unittests ... platform linux2 -- Python 2.7.13, pytest-2.9.2, py-1.4.32, pluggy-0.3.1 rootdir: /home/heimes/redhat, inifile: tox.ini plugins: sourceorder-0.5, cov-2.3.0, betamax-0.7.1, multihost-1.1 collected 451 items test_util.py ........ util.py .. test_ipaclient/test_csrgen.py ..............ssss... test_ipalib/test_aci.py ................... test_ipalib/test_backend.py ........ test_ipalib/test_base.py ............... test_ipalib/test_capabilities.py . test_ipalib/test_cli.py ... test_ipalib/test_config.py ............... test_ipalib/test_crud.py ............... test_ipalib/test_errors.py ....... test_ipalib/test_frontend.py ........................................ test_ipalib/test_messages.py .... test_ipalib/test_output.py ... test_ipalib/test_parameters.py ............................................................. test_ipalib/test_plugable.py ........ test_ipalib/test_rpc.py ......ssssssss test_ipalib/test_text.py ............................. test_ipalib/test_x509.py ... test_ipapython/test_cookie.py ............ test_ipapython/test_dn.py ........................... test_ipapython/test_ipautil.py .................................................................. test_ipapython/test_ipavalidate.py .......... test_ipapython/test_kerberos.py .............. test_ipapython/test_keyring.py .......... test_ipapython/test_ssh.py ............................... test_pkcs10/test_pkcs10.py ..... https://fedorahosted.org/freeipa/ticket/6517 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Add SHA256 fingerprints for certsTomas Krizek2017-03-074-2/+11
| | | | | | | https://fedorahosted.org/freeipa/ticket/6701 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Moving ipaCert from HTTPD_ALIAS_DIRStanislav Laznicka2017-03-011-1/+1
| | | | | | | | | | | | | The "ipaCert" nicknamed certificate is not required to be in /var/lib/ipa/radb NSSDB anymore as we were keeping a copy of this file in a separate file anyway. Remove it from there and track only the file. Remove the IPA_RADB_DIR as well as it is not required anymore. https://fedorahosted.org/freeipa/ticket/5695 https://fedorahosted.org/freeipa/ticket/6680 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Remove md5_fingerprints from IPAStanislav Laznicka2017-02-234-10/+2
| | | | | | | | | | MD5 is a grandpa and FIPS does not like it at all. https://fedorahosted.org/freeipa/ticket/5695 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* Tests: search for disabled usersMartin Basti2017-02-171-0/+41
| | | | | | | | | Add tests for searching disabled/enabled users. XFAIL: newly created users has no 'nsaccountlock' attribute set and user-find doesn't return them as active users. This should be fixed. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Separate RA cert store from the HTTP cert storeSimo Sorce2017-02-151-2/+2
| | | | | | | | | | | | | | | This is in preparation for separating out the user under which the ipa api framework runs as. This commit also removes certs.NSS_DIR to avoid confusion and replaces it where appropriate with the correct NSS DB directory, either the old HTTPD_ALIAS_DIR ot the RA DB IPA_RADB_DIR. In some cases its use is removed altogether as it was simply not necessary. https://fedorahosted.org/freeipa/ticket/5959 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* tests: Add tests for kerberos principal aliases in stageuserDavid Kupka2017-02-072-1/+11
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: kerberos_principal_aliases: Deduplicate testsDavid Kupka2017-02-071-30/+32
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: Stageuser-{add,remove}-certDavid Kupka2017-02-071-0/+19
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: add-remove-cert: Use harcoded certificates instead of requesting themDavid Kupka2017-02-071-5/+81
| | | | | | | | | | | | | Requesting certificates for test purposes is not necessary as we allow to upload arbitrary certificate to the user, host or service. Also requesting certificate from dogtag takes some time and the test is slower for no good reason. More it's not posible to request certificate for stageuser even though it's possible to upload certificates to stageusers now. https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* py3: tests_xmlrpc: do not call str() on bytesMartin Basti2017-02-022-3/+3
| | | | | | | | | Calling str() on bytes causes undesired side effect: it adds prefix "b" to the result of conversion. The method decode() should be used instead. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* User Tracker: Test to create user with minimal valuesGanna Kaihorodova2017-01-191-0/+13
| | | | | | | | | | Test to create user with minimal values, where uid is not specified https://fedorahosted.org/freeipa/ticket/6126 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com> Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* User Tracker: creation of user with minimal valuesGanna Kaihorodova2017-01-191-11/+31
| | | | | | | | | | | | Fix provide possibility to create user-add test with minimal values, where uid is not specified, to provide better coverage. Also provide check for non-empty unicode string for attributes required in init method https://fedorahosted.org/freeipa/ticket/6126 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com> Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
* Stage User: Test to create stage user with minimal valuesGanna Kaihorodova2017-01-191-0/+11
| | | | | | | | | Test to create stage user with minimal values, where uid is not specified https://fedorahosted.org/freeipa/ticket/6448 Reviewed-By: Lenka Doudova <ldoudova@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Tests: Stage User Tracker implementationGanna Kaihorodova2017-01-191-8/+30
| | | | | | | | | | | Fix provide possibility of creation stage user with minimal values, with uid not specified and check for non-empty unicode string for attributes requested in init method https://fedorahosted.org/freeipa/ticket/6448 Reviewed-By: Lenka Doudova <ldoudova@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Generate sha256 ssh pubkey fingerprints for hostsStanislav Laznicka2017-01-125-5/+5
| | | | | | | | Replace md5 with sha256 for host ssh pubkey fingerprints https://fedorahosted.org/freeipa/ticket/5695 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Remove "Request Certificate with SubjectAltName" permissionFraser Tweedale2016-12-211-1/+1
| | | | | | | | | | | | | | | | | | subjectAltName is required or relevant in most certificate use cases (esp. TLS, where carrying DNS name in Subject DN CN attribute is deprecated). Therefore it does not really make sense to have a special permission for this, over and above "request certificate" permission. Furthermore, we already do rigorously validate SAN contents again the subject principal, and the permission is waived for self-service requests or if the operator is a host principal. So remove the permission, the associated virtual operation, and the associated code in cert_request. Fixes: https://fedorahosted.org/freeipa/ticket/6526 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* tests: Expect krbpwdpolicyreference in result of {host,service}-{find,show} ↵David Kupka2016-12-144-2/+58
| | | | | | | | | | | --all Result of {host,service}-{find,show} commands with option '--all' always contains krbpwpolicyreference attributes. https://fedorahosted.org/freeipa/ticket/6561 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* Add options to write lightweight CA cert or chain to fileFraser Tweedale2016-12-122-7/+41
| | | | | | | | | | | | | | Administrators need a way to retrieve the certificate or certificate chain of an IPA-managed lightweight CA. Add params to the `ca' object for carrying the CA certificate and chain (as multiple DER values). Add the `--chain' flag for including the chain in the result (chain is also included with `--all'). Add the `--certificate-out' option for writing the certificate to a file (or the chain, if `--chain' was given). Fixes: https://fedorahosted.org/freeipa/ticket/6178 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* cert-request: match names against principal aliasesFraser Tweedale2016-12-061-12/+73
| | | | | | | | | | | | | | | Currently we do not check Kerberos principal aliases when validating a CSR. Enhance cert-request to accept the following scenarios: - for hosts and services: CN and SAN dnsNames match a principal alias (realm and service name must be same as nominated principal) - for all principal types: UPN or KRB5PrincipalName othername match any principal alias. Fixes: https://fedorahosted.org/freeipa/ticket/6295 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* tests: Added basic tests for certs in idoverridesOleg Fayans2016-11-291-0/+82
| | | | | | | https://fedorahosted.org/freeipa/ticket/6412 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Created idview trackerOleg Fayans2016-11-291-0/+116
| | | | | | | | | Needed for basic certs in idoverrides tests https://fedorahosted.org/freeipa/ticket/6412 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Fix Python 3 bugs discovered by pylintChristian Heimes2016-11-251-1/+1
| | | | | | | | | | | | In Python 3 exception instances no longer have a message attribute. For most exceptions, str(e) or string formatting give the same result. Fix some renamed modules, module members and functions. https://fedorahosted.org/freeipa/ticket/4985 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Document make_delete_command method in UserTrackerLenka Doudova2016-11-151-3/+13
| | | | | | https://fedorahosted.org/freeipa/ticket/6485 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Tests: Verify that validity info is present in cert-show and cert-find commandLenka Doudova2016-11-141-0/+4
| | | | | | https://fedorahosted.org/freeipa/ticket/6419 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Modernize ipa-getkeytab test suiteMartin Babinsky2016-11-081-0/+4
| | | | | | | | | The test suite is now leveraging host/service tracker objects as test case fixture, removing much of ad-hoc setup/teardown. https://fedorahosted.org/freeipa/ticket/6409 Reviewed-By: Simo Sorce <ssorce@redhat.com>
* Tests: Verify that cert commands show CA without --allLenka Doudova2016-10-261-1/+17
| | | | | | | | | Verify that command cert-find, cert-show and cert-request show CA even without --all. https://fedorahosted.org/freeipa/ticket/6410 Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* Unaccessible variable self.attrs in TrackerGanna Kaihorodova2016-10-251-0/+1
| | | | | | | | | | In tracker, 'self.attrs' variable is created and filled in track_create method. Some objects are not created but still require access to this variable. Created 'self.attrs' variable in init https://fedorahosted.org/freeipa/ticket/6125 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* Tests: Certificate revocationLenka Doudova2016-10-121-5/+75
| | | | | | | | | Providing tests for certificate revocation to replace deleted tests from test_cert_find. https://fedorahosted.org/freeipa/ticket/6349 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* Tests: Remove invalid certplugin testsLenka Doudova2016-10-121-74/+1
| | | | | | | | | | | A bunch of certplugin tests were testing number of revoked certificates with various revocation reasons. Since existence of revoked certificates often depends on other parts of IdM than IPA, it is not really valid to check their presence unless creation of revoked certificate is intentionally tested. https://fedorahosted.org/freeipa/ticket/6349 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* remove trailing newlines form python modulesMartin Babinsky2016-10-121-1/+0
| | | | | | | | | pylint-1.6.4-1.fc26.noarch reports these, hence they should be fixed in order to build FreeIPA with this version https://fedorahosted.org/freeipa/ticket/6391 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: print what was expected from callables in xmlrpc_testsPetr Spacek2016-10-111-14/+22
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS: Support URI resource record typePetr Spacek2016-10-111-0/+89
| | | | | | https://fedorahosted.org/freeipa/ticket/6344 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Remove silent deleting and creating entries by trackerLenka Doudova2016-10-064-7/+5
| | | | | | https://fedorahosted.org/freeipa/ticket/6123 Reviewed-By: Milan Kubik <mkubik@redhat.com>
* ipatests: Implement tests with CSRs requesting SANMilan Kubík2016-10-041-2/+301
| | | | | | | | | The patch implements several test cases testing the enforcement of CA ACLs on certificate requests with subject alternative names. https://fedorahosted.org/freeipa/ticket/6366 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* ipatests: Fix name property on a service trackerMilan Kubík2016-10-041-1/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/6366 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Fix: find OSCP certificate testMartin Basti2016-09-301-1/+3
| | | | | | | | Test should check if any OSCP certificate has been returned https://fedorahosted.org/freeipa/ticket/6359 Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* Pylint: enable check for unused-variablesMartin Basti2016-09-271-0/+2
| | | | | | | | | | | | | | | Unused variables may: * make code less readable * create dead code * potentialy hide issues/errors Enabled check should prevent to leave unused variable in code Check is locally disabled for modules that fix is not clear or easy or have too many occurences of unused variables Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Remove unused variables in testsMartin Basti2016-09-2715-55/+54
| | | | | | | | This commit removes or marks unused variables as "expected to be unused" by using '_' prefix. Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Pylint: enable global-variable-not-assigned checkMartin Basti2016-09-231-6/+0
| | | | | | | the global keyword should be used only when variable from outside is assigned inside, otherwise it has no effect and just confuses developers Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* pylint: fix unneeded-notJan Barta2016-09-221-1/+1
| | | | | Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* Test: dont use global variable for iteration in test_cert_pluginMartin Basti2016-09-221-1/+3
| | | | | | | | | Iteration over global variable causes unwanted value changes outside method https://fedorahosted.org/freeipa/ticket/5755 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Tests: Fix host attributes in ipa-join host testLenka Doudova2016-09-211-0/+6
| | | | | | | | | Fixing discrepancies between returned and checked attributes in ipa-join host test, that arose after recent changes in behavior. https://fedorahosted.org/freeipa/ticket/6326 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Update host test with ipa-joinLenka Doudova2016-09-211-4/+9
| | | | | | | | | Updating path to ipa-join command to allow execution of test_xmlrpc/test_host::TestHostFalsePwdChange::test_join_host. https://fedorahosted.org/freeipa/ticket/6326 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Remove unnecessary attributes from base trackerLenka Doudova2016-09-211-2/+0
| | | | | | https://fedorahosted.org/freeipa/ticket/6128 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Remove --force options from tracker base classLenka Doudova2016-09-2114-18/+32
| | | | | | | | | | Removing --force option from tracker base class so it would not be required to be implemented in every specific tracker, even though it's not necessary. Modifying existing trackers to reflect this change. https://fedorahosted.org/freeipa/ticket/6124 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Tests: Add missing attributes to test_xmlrpc/test_trust testsLenka Doudova2016-08-311-3/+9
| | | | | | | | | Several tests in test_xmlrpc/test_trust_plugin.py fail because some attributes are not expected. Fixing the tests so that the extra attributes are recognized. https://fedorahosted.org/freeipa/ticket/6276 Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
* Tests: Random issuer certificate can be added to a serviceLenka Doudova2016-08-311-7/+33
| | | | | | | | | | | Changing negative test case that verified that a certificate with different than expected issuer cannot be added to a service to a positive one that verifies that this operation now proceeds successfully. Corresponds to changes made in scope of https://fedorahosted.org/freeipa/ticket/4559 implementation. https://fedorahosted.org/freeipa/ticket/6258 Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
* Tests: fix test_forward_zones in test_xmlrpc/test_dns_pluginPetr Spacek2016-08-301-9/+1
| | | | | | | | | | | | | | | | | | Class test_forward_zones in ipatests/test_xmlrpc/test_dns_plugin was using DNS zone 'fwzone2.test.' and expected to get warning 'Forwarding policy conflicts with some automatic empty zones.' (aka 'DNSForwardPolicyConflictWithEmptyZone'). This does not make sense because 'test.' zone is not listed in IANA registry 'Locally-Served DNS Zones': http://www.iana.org/assignments/locally-served-dns-zones/locally-served-dns-zones.xhtml To fix this I simply removed the warning from set of expected results. https://fedorahosted.org/freeipa/ticket/6213 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Tests: fix test_forward_zones in test_xmlrpc/test_dns_pluginPetr Spacek2016-08-301-2/+2
| | | | | | | | | | | | Class test_forward_zones in ipatests/test_xmlrpc/test_dns_plugin had server IP and zone name interchanged in "expected" dictionart. I do not understand how this happened. https://fedorahosted.org/freeipa/ticket/6213 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>