Commit Graph

159 Commits

Author SHA1 Message Date
Tomas Babej
5f8fd8a8e3 tests: realmdomains_plugin: Add explanatory comment
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>
2015-07-22 11:10:49 +02:00
Tomas Babej
12395a94f3 tests: service_plugin: Make sure the cert is decoded from base64
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-07-22 11:09:59 +02:00
Tomas Babej
705603a396 tests: user_plugin: Add preserved flag when --all is used
Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-07-21 18:59:40 +02:00
Martin Basti
c6c84faecf Py3: replace tab with space
python3 does not allow to mix spaces and tabs

Reviewed-By: Christian Heimes <cheimes@redhat.com>
2015-07-17 17:19:51 +02:00
Yuri Chornoivan
75fde43491 Fix minor typos
<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>
2015-07-17 14:33:30 +02:00
Endi S. Dewata
bf6df3df9b Added vault access control.
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>
2015-07-08 06:30:23 +00:00
Endi S. Dewata
475ade4bec Added ipaVaultPublicKey attribute.
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>
2015-07-07 07:44:56 +00:00
Endi S. Dewata
fc5c614950 Added symmetric and asymmetric vaults.
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>
2015-07-07 07:44:56 +00:00
Jan Cholasta
e39fe4ed31 plugable: Pass API to plugins on initialization rather than using set_api
https://fedorahosted.org/freeipa/ticket/3090

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-07-01 13:05:30 +00:00
Martin Babinsky
74883bbc95 generalize certificate creation during testing
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>
2015-06-23 10:29:20 +02:00
Martin Basti
f8c8c360f1 DNSSEC: validate forward zone forwarders
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>
2015-06-11 13:12:31 +02:00
Martin Basti
9aa6124b39 DNSSEC: Improve global forwarders validation
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>
2015-06-11 13:12:31 +02:00
Jan Cholasta
81729e22d3 vault: Move vaults to cn=vaults,cn=kra
https://fedorahosted.org/freeipa/ticket/3872

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-06-10 16:17:34 +00:00
Endi S. Dewata
df1bd39a43 Added vault-archive and vault-retrieve commands.
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>
2015-06-08 10:04:23 +00:00
Milan Kubík
d25a45a9f9 Abstract the HostTracker class from host plugin test
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>
2015-06-05 19:06:20 +02:00
Rob Crittenden
a92328452d Add plugin to manage service constraint delegations
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>
2015-06-03 09:47:40 +00:00
Endi S. Dewata
fde21adcbd Added vault plugin.
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>
2015-05-25 06:17:09 +00:00
Thierry Bordaz
51937cc571 User life cycle: Stage user Administrators permission/priviledge
Creation of stage user administrator

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-05-18 09:37:21 +02:00
Lenka Ryznarova
b7af182546 Test Objectclass of postdetach group
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>
2015-05-07 16:05:54 +02: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
Jan Cholasta
cbb112dd57 ldap: Use LDAPClient instead of IPASimpleLDAPObject in LDAPEntry
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2015-04-16 06:58:31 +00:00
Ales 'alich' Marecek
ca96ecbf40 Ipatests DNS SOA Record Maintenance
https://fedorahosted.org/freeipa/ticket/4746

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-04-02 08:56:32 +00:00
Tomas Babej
a34ff7f6c1 ipatests: Add coverage for adding and removing sshpubkeys in ID overrides
Adds xmlrpc tests for:
  - Adding a user ID override with sshpubkey
  - Modifying a user ID override to contain sshpubkey
  - Removing a sshpubkey value from a user ID override

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2015-02-19 17:03:06 +01:00
Petr Vobornik
25f5ee0cb6 ipatests: add missing ssh object classes to idoverrideuser
Reviewed-By: Martin Kosek <mkosek@redhat.com>
2015-02-19 17:03:06 +01:00
Tomas Babej
f83b4fe330 ipatests: Fix incorrect assumptions in idviews tests
https://fedorahosted.org/freeipa/ticket/4839

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-01-26 13:01:33 +01:00
Tomas Babej
3341d31ec7 ipatests: Fix old command references in the ID views tests
Make sure only new API command versions are referenced.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-01-26 13:01:33 +01:00
Tomas Babej
a294f10d06 ipatests: Add coverage for referential integrity plugin applied on ipaAssignedIDView
This adds a test case which makes sure that referential integrity
plugin does not leave any trailing references for ipaAssignedIDView
attribute on hosts, if the ID view being referenced has been deleted.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-01-26 13:01:33 +01:00
Martin Basti
9af8fa9dd5 DNS tests: warning if forward zone is inactive
Ticket: https://fedorahosted.org/freeipa/ticket/4721
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2015-01-15 13:21:47 +01:00
Petr Viktorin
07545569ec test_host_plugin: Use HostTracker fixtures
The racker object "remembers" expected state across several tests,
so only changes (rather than all expected state) need to be specified
in each test. Also, the tracker fixture will make it easy to use hosts
in other test modules.

This change makes the tests independent; any permutation of any subset
of these tests should now pass.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-01-14 11:40:28 +01:00
Petr Viktorin
8add23d401 test_host_plugin: Split tests into independent classes
Any of the classes may be run alone.

In classes not marked @ordered, individual tests are independent.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-01-14 11:40:28 +01:00
Petr Viktorin
4d9112b5c6 test_host_plugin: Convert tests to imperative style
This has several advantages:
- Tests other than run-command/check-response can be added easily
- Tracebacks are meaningful (which means we'll be able to remove a lot of
  test name/description/location tracking code)
- Individual tests can be selected/deselected using normal pytest mechanisms
  (but for isolated tests, more changes will be needed)

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-01-14 11:40:28 +01:00
Petr Viktorin
61c4ecccc1 Run pylint on tests
Drop support for pylint < 1.0

Enable ignoring unknown attributes on modules (both nose and pytest
use advanced techniques, support for which only made it to pylint
recently)

Fix some bugs revealed by pylint

Do minor refactoring or add pylint:disable directives where the
linter complains.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-01-14 11:40:28 +01:00
Martin Basti
92feba2223 New test cases for Forward_zones
https://fedorahosted.org/freeipa/ticket/4750

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2015-01-13 14:34:47 +01:00
Martin Basti
6a0934f584 DNS tests: separate current forward zone tests
Ticket: https://fedorahosted.org/freeipa/ticket/4750
Reviewed-By: Martin Kosek <mkosek@redhat.com>
2015-01-13 14:34:47 +01:00
Petr Vobornik
026c9eca09 add --hosts and --hostgroup options to allow/retrieve keytab methods
`--hosts` and `--hostgroup` options added to:
* service-allow-create-keytab
* service-allow-retrieve-keytab
* service-disallow-create-keytab
* service-disallow-retrieve-keytab
* host-allow-create-keytab
* host-allow-retrieve-keytab
* host-disallow-create-keytab
* host-disallow-retrieve-keytab

in order to allow hosts to retrieve keytab of their services or related hosts as described on http://www.freeipa.org/page/V4/Keytab_Retrieval design page

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2014-12-03 11:34:10 +00:00
David Kupka
56ca47d535 Fix error message for nonexistent members and add tests.
https://fedorahosted.org/freeipa/ticket/4643

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-24 16:04:57 +01:00
Petr Viktorin
0cb12f3cde Declarative tests: Switch to pytest
Provide a local pytest plugin to generate tests.

The Declarative tests can now only be run with pytest

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
07def0b275 Declarative tests: Move cleanup to setup_class/teardown_class
https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
93c69b5127 Use setup_class/teardown_class in Declarative tests
Pytest will consider each Declarative test individually, running
setup/teardown for each one.
Move the setup and teardown to the class level.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
84bd4c1246 test_automount_plugin: Fix test ordering
Nose ran the `test_a_*` and `test_a2_*` tests in opposite order
than the source suggested. Fix this.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
375e9f7c4b tests: Use PEP8-compliant setup/teardown method names
The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

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

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Martin Basti
310e46452c Fix warning message should not contain CLI commands
Message is now universal for both CLI and WebUI

Ticket: https://fedorahosted.org/freeipa/ticket/4647
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2014-11-19 15:20:55 +01:00
Petr Vobornik
3d11de4849 idrange: include raw range type in output
iparangetype output is a localized human-readable value which is not suitable for machine-based API consumers

Solved by new iparangetyperaw output attribute which contains iparangetype's raw value

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-11 10:56:16 +01:00
Petr Vobornik
feea9047be unittests: baserid for ipa-ad-trust-posix idranges
https://fedorahosted.org/freeipa/ticket/4221

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-11 10:56:16 +01:00
Martin Basti
5e1172f560 fix forwarder validation errors
Fix tests, validation in dnsconfig mod, wuser warning

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2014-10-21 15:55:09 +02:00
Petr Vobornik
b69a8dad2e tests: management of keytab permissions
https://fedorahosted.org/freeipa/ticket/4419

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2014-10-17 14:11:35 +02:00
Martin Basti
41015e6c9c DNS missing tests
* try to remove non-existent permission
* try to remove idnssoamname using dnszone-mod --name-server=

Reviewed-By: David Kupka <dkupka@redhat.com>
2014-10-09 10:02:22 +02:00
Petr Viktorin
3eca0ff2fe test_service_plugin: Do not lowercase memberof_role
This adjusts the test for the change in commit 792c3f9c8c

Related ticket: https://fedorahosted.org/freeipa/ticket/4192
2014-10-01 12:43:40 +02:00
Tomas Babej
8fb0e3a2b4 ipatests: Add xmlrpc tests for idviews plugin
Add coverage for the ID views and ID overrides.

Part of: https://fedorahosted.org/freeipa/ticket/3979

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-09-30 10:42:06 +02:00
Tomas Babej
d83af7d38d baseldap: Properly handle the case of renaming object to the same name
When renaming a object to the same name, errors.EmptyModList is raised.
This is not properly handled, and can cause other modifications in the
LDAPUpdate command to be ignored.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2014-09-29 15:24:58 +02:00