Commit Graph

9723 Commits

Author SHA1 Message Date
Petr Spacek
3b79ce005c DNS: Reinitialize DNS resolver after changing resolv.conf
Previously the installer did not reinitialize resolver so queries for
records created using --ip-address option might not be answered. This led
to incorrect results during 'Updating DNS system records' phase at the
end of installation.

This is kind of hack but right now we do not have enough time to extend
python-dns's interface with resolver_reinit() method.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-06-30 14:08:04 +02:00
Jan Cholasta
2615103c68 makeaci, makeapi, oddjob: use the default API context
Use the default context rather the server context for code not running
inside the server.

This prevents the affected code from attempting to initialize the session
manager.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-06-30 14:09:24 +02:00
Jan Cholasta
7d9afd988a xmlserver: initialize RPC server plugins only in server context
Do not initialize the plugins for all in-server API instances, as they are
used only in the server context.

This prevents code using in-server API instances from attempting to
initialize the session manager.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-06-30 14:09:24 +02:00
Jan Cholasta
a901ec1ce9 session: do not initialize session manager on import
Removes the side effect of attempting to connect to memcached when the
session module is imported, which caused user visible warnings and/or
SELinux AVC denials.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-06-30 14:09:24 +02:00
Jan Cholasta
dcf8b47471 session: move the session module from ipalib to ipaserver
The module is used only on the server, so there's no need to have it in
ipalib, which is shared by client and server.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-06-30 14:09:24 +02:00
Pavel Vomacka
ec6925e775 Change paths of strings in auth indicators widget on service page
Strings which are used by widget which shows authentication indicators were moved.
Therefore the change in string paths.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-30 13:42:58 +02:00
Pavel Vomacka
55049fceb9 Add authentication identificator to host page
Also move strings which are connected with authentication indicators to authtype dict.
This place is more general than have them in service dict. It's nicer when these strings are
not used only on service page.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-30 13:42:58 +02:00
Nathaniel McCallum
0855b014b1 Add authentication indicators support to Host objects
https://fedorahosted.org/freeipa/ticket/433

Reviewed-By: Sumit Bose <sbose@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-30 13:39:59 +02:00
Martin Basti
fed9d9aaa7 cert.py split module docstring to multiple ugetext string
It is hard to translate whole dosctring again and again aftear each
minor change. This split will make life for translators easier. (Just note: dosctring was
changed and that is the reason why I'm sending this, because translators
must translate it again anyway)

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-06-30 13:21:04 +02:00
Martin Basti
a155f692e7 Fix replica install with CA
The incorrect api was used, and CA record updated was duplicated.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-06-30 13:18:51 +02:00
Lenka Doudova
0399110240 Tests: Fix frontend tests
Test ipatests/test_ipalib/test_frontend.py::test_Command::test_validate fails due to attributes that are no longer present, therefore assertion for these values was removed.

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

Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
2016-06-30 13:17:32 +02:00
Lenka Doudova
35d3a58421 Tests: Fix failing tests in ipatests/test_ipalib/test_frontend.py
Test fails were caused mainly by assertion between unicode and nonunicode string, or due to changes in code related to thin client.

Fixes:
test_Command::test_default_from_chaining
test_Command::test_args_options_2_params
test_Command::test_params_2_args_options
test_Command::test_validate_output_per_type

Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
2016-06-30 13:16:31 +02:00
Lenka Doudova
1d9e1521c5 Tests: Remove DNS configuration from trust tests
Since DNS configuration is no longer needed for running trust tests, this method's contents are removed. Method is left empty as reference for others, should they have issues with DNS configuration.

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2016-06-30 13:14:27 +02:00
Jan Cholasta
99339bf789 replica install: don't allow install against a newer server
If the version of the remote server is higher than the local version, don't
allow installing a replica of it.

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-06-30 11:54:47 +02:00
Jan Cholasta
ce93b091d2 backup: use in-server API in ipa-backup and ipa-restore
Use in-server API so that the commands don't try to fetch API schema and
fail.

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

Reviewed-By: Milan Kubik <mkubik@redhat.com>
2016-06-30 11:04:05 +02:00
Jan Cholasta
8d5272e687 schema: properly fix Flag arguments on the client
The previous fix in commit a77e21cbca made
some Bool arguments appear as Flag on the client. This change fixes that.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-06-30 11:02:20 +02:00
Pavel Vomacka
aaf65e9c56 Add certificate widget to ID override user details page.
Add possibility to add, remove, view, get and download custom certificates on ID override user page.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 16:46:12 +02:00
Lenka Doudova
f37c3af0db Tests: Fix failing ipatests/test_ipalib/test_errors.py
Some strings in the testsuite are unicode which wasn't reflected in the tests. This patch fixes the problem by changing concerned strings to unicode.

Reviewed-By: Ganna Kaihorodova <gkaihoro@redhat.com>
2016-06-29 16:45:13 +02:00
Pavel Vomacka
31a13c9e98 Add button for dns_update_system_records command
Part of: https://fedorahosted.org/freeipa/ticket/5905

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-06-29 16:33:42 +02:00
Florence Blanc-Renaud
3c40d3aa9e Do not allow installation in FIPS mode
https://fedorahosted.org/freeipa/ticket/5761

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2016-06-29 16:17:27 +02:00
Pavel Vomacka
d7898ac2eb Add new custom command multivalued widget
Add general class for multivalued widget which uses special commands which
are performed immediately.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
2f048224d2 Updated certificates table
All certificates which are not issued by IPA CA are grey and not clickable. That's
because these certificates are not maintained by IPA CA.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
82e69e4300 Add new certificates widget to the service details page
https://fedorahosted.org/freeipa/ticket/5108
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
79ec965a96 Add new certificates widget to the host details page. Also extends evaluator and add support for adapters.
https://fedorahosted.org/freeipa/ticket/5108
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
0b72571c5a Add new certificates widget to the user details page
https://fedorahosted.org/freeipa/ticket/5108
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
55a0baf1c3 Add certificate widget
The certificate widget is used for each certificate in certs_widget. It allows to
view, get, download, revoke and restore certificate.

https://fedorahosted.org/freeipa/ticket/5108
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
6d3622c600 Add widget for showing multiple certificates
Certs widget is based on multivalued widget and adds ability to add new certificate
and delete it. Each line is cert_widget.

https://fedorahosted.org/freeipa/ticket/5108
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
3056f349b9 Remove old useless actions - get and view
These two actions are not available any more. So that code is never called.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
260a00b81f Changed the way how to handle remove hold and revoke actions
Method calling in actions is moved to another function - these calls may be used
by another functions, not only by actions.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
06a9a84876 Refactored certificate view and remove hold dialog
Removed old layout created using html tables. Now table layout is made by div
and modern css styling.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
e7a55ef30b Add Object adapter
Object adapter changes data to more useful format. Single value is reachable
as single value, property with more values is transformed to array.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
044d3c25de Add ability to turn off activity icon
By specifying correct attribute when creating command it turn off showing activity icon
when webui waits for response from the server.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
3d61aca623 Add working widget
This widget can be used as notification that some other widget is working.
It shows spinner and cover the other widget by specified color.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
f243bd2d65 Extends functionality of DropdownWidget
Adds methods which are able to enable and disable options according to the name of option
and methods which set or get whole item list.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
Pavel Vomacka
e3e83272c9 Add support for custom menu in multivalued widget
Every single widget which is in multivalued widget can now have custom action menu
and the delete button is included in this custom action menu.

Part of this ticket:
https://fedorahosted.org/freeipa/ticket/5381

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-06-29 15:41:58 +02:00
David Kupka
573819eb07 test: cert: Reflect change in behavior in tests
Command cert-find with parameter sizelimit set to 0 no longer returns 0
certificates but returns all.

More precise ConversionError is returned when parameter is not
convertible to its type.

https://fedorahosted.org/freeipa/ticket/5381
https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-06-29 14:49:08 +02:00
Petr Spacek
954f6095fd DNS: Remove unnecessary DNS check from installer
Previously we were checking content of DNS before actually adding DNS
records for replicas. This is causing cycle in logic and adds weird
corner cases to the installer which can blow up on DNS timeout or so.

The check was completely unnecessary because the installer knows IP
addresses and name of the machine. Removal of the check makes
the installer more reliable.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-06-29 14:19:59 +02:00
Petr Spacek
7be50ea715 Use NSS for name->resolution in IPA installer
This fixes scenarios where IPA server is not able to resolve own name
and option --ip-address was not specified by the user.

This partially reverts changes from commit
dc405005f5

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-06-29 14:19:59 +02:00
Petr Spacek
1802f7a225 client-install: do not fail if DNS times out during DNS update generation
https://fedorahosted.org/freeipa/ticket/5962

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-06-29 14:19:59 +02:00
David Kupka
95191e1612 test: automember: Fix expected exception message
https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 10:49:37 +02:00
Stanislav Laznicka
427bbf6c0d The LDAP*ReverseMember shouldn't imply --all is always specified
The LDAP*ReverseMember methods would always return the whole LDAP
object even though --all is not specified.
Also had to fix some tests as objectClass will not be returned by
default now.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 10:44:30 +02:00
Stanislav Laznicka
30d054a573 Revert "Removed dead code from LDAP{Remove,Add}ReverseMember"
While the code was really dead, it should serve a purpose elsewhere.
This reverts commit c56d65b064.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 10:44:30 +02:00
Jan Cholasta
a77e21cbca schema: fix Flag arguments on the client
Fix Flag arguments appearing as Bool on the client.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-06-29 10:20:00 +02:00
Fraser Tweedale
6e4e522e52 cert-find: fix 'issuer' option
The 'issuer' option of cert-find was recently changed from Str to
DNParam, however, 'ra.find' expects a string and throws when it
receives a DN.

When constructing the dict that gets passed to 'ra.find', turn
DNParams into strings.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 09:54:18 +02:00
Fraser Tweedale
0078e7a919 ipa-certupdate: track lightweight CA certificates
Enhance the ipa-certupdate program to add Certmonger tracking
requests for lightweight CA certificates.

Also update the dogtag-ipa-ca-renew-agent-submit to not store or
retrieve lightweight CA certificates, becaues Dogtag clones observe
renewals and update their NSSDBs on their own, and allow the helper
to request non-self-signed certificates.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 08:52:29 +02:00
Fraser Tweedale
b720aa94e9 Update lightweight CA serial after renewal
For CA replicas to pick up renewed lightweight CA signing
certificates, the authoritySerial attribute can be updated with the
new serial number.

Update the renew_ca_cert script, which is executed by Certmonger
after writing a renewed CA certificate to the NSSDB, to update the
authoritySerial attribute if the certificate belongs to a
lightweight CA.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 08:52:29 +02:00
Fraser Tweedale
67f13c82d8 Skip CS.cfg update if cert nickname not known
After CA certificate renewal, the ``renew_ca_cert`` helper updates
certificate data in CS.cfg.  An unrecognised nickname will raise
``KeyError``.  To allow the helper to be used for arbitrary
certificates (e.g. lightweight CAs), do not fail if the nickname is
unrecognised - just skip the update.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 08:52:29 +02:00
Fraser Tweedale
f0b1e37d2e ipaldap: turn LDAP filter utility functions into class methods
The LDAP filter utilities do not use any instance attributes, so
collectively turn them into class methods to promote reuse.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2016-06-29 08:52:29 +02:00
Fraser Tweedale
45daffa22f Set default OCSP URI on install and upgrade
Dogtag has been updated to support a default OCSP URI when the
profile includes AuthInfoAccess with URI method but does not specify
the URI (instead of constructing one based on Dogtag's hostname and
port).

Add the pkispawn config to ensure that the OCSP URI is set before
issuing CA and system certificates, and add the config to existing
CA instances on upgrade.

Fixes: https://fedorahosted.org/freeipa/ticket/5956
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-06-28 19:15:35 +02:00
Martin Basti
5693d19550 CA replica promotion: add proper CA DNS records
Update 'ipa-ca' records with A/AAAA records of the newly added replica

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

Reviewed-By: Petr Spacek <pspacek@redhat.com>
2016-06-28 16:56:35 +02:00