Commit Graph

8152 Commits

Author SHA1 Message Date
Fraser Tweedale
4cf2bfcaa6 Add profile_id parameter to 'request_certificate'
Add the profile_id parameter to the 'request_certificate' function
and update call sites.

Also remove multiple occurrences of the default profile ID
'caIPAserviceCert'.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
c09bd35e7c Add generic split_any_principal method
There exist methods to split user or service/host principals, but
there is no method to split any kind of principal and allow the
caller to decide what to do.

Generalize ``ipalib.plugins.service.split_principal`` to return a
service of ``None`` if the principal is a user principal, rename it
``split_any_principal`` and reimplement ``split_principal`` to
preserve existing behaviour.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
b24fe0eb73 Import included profiles during install or upgrade
Add a default service profile template as part of FreeIPA and format
and import it as part of installation or upgrade process.

Also remove the code that modifies the old (file-based)
`caIPAserviceCert' profile.

Fixes https://fedorahosted.org/freeipa/ticket/4002

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
ba075b195c Enable LDAP-based profiles in CA on upgrade
Part of: https://fedorahosted.org/freeipa/ticket/4560

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
300b74fc7f Add certprofile plugin
Add the 'certprofile' plugin which defines the commands for managing
certificate profiles and associated permissions.

Also update Dogtag network code in 'ipapython.dogtag' to support
headers and arbitrary request bodies, to facilitate use of the
Dogtag profiles REST API.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
35af0d6d66 Add ACL to allow CA agent to modify profiles
Part of: https://fedorahosted.org/freeipa/ticket/57

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
273a297e97 ipa-pki-proxy: provide access to profiles REST API
Part of: https://fedorahosted.org/freeipa/ticket/57

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
3d15f2966b Add schema for certificate profiles
The certprofile object class is used to track IPA-managed
certificate profiles in Dogtag and store IPA-specific settings.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
ba071e757d Install CA with LDAP profiles backend
Install the Dogtag CA to use the LDAPProfileSubsystem instead of the
default (file-based) ProfileSubsystem.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-04 08:27:33 +00:00
Fraser Tweedale
62e9867114 Fix certificate management with service-mod
Adding or removing certificates from a service via --addattr or
--delattr is broken.  Get certificates from entry_attrs instead of
options.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-03 17:53:56 +00:00
Martin Basti
b6924c00ab Fix: regression in host and service plugin
Test failures:
 * wrong error message
 * mod operation always delete usercertificates

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

Reviewed-By: Milan Kubik <mkubik@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2015-06-03 17:52:30 +00:00
Ludwig Krispenz
8457edc14d accept missing binddn group
replicas installed from older versions do not have a binddn group
just accept the errror

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-06-03 15:56:22 +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
Fraser Tweedale
7f7c247bb5 Support multiple host and service certificates
Update the framework to support multiple host and service
certificates.

host-mod and service-mod revoke existing certificates that are not
included in the modified entry.  Using addattr=certificate=... will
result in no certificates being revoked.

The existing behaviour of host-disable, host-del, service-disable
and service-del (revoke existing certificate) is preserved but now
applies to all certificates in the host or service entry.

Also update host-show and service-show to write all the principal's
certificates to the file given by the ``--out=FILE`` option.

Part of: http://www.freeipa.org/page/V4/User_Certificates

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-02 14:03:12 +00:00
Gabe
b98077ea68 Do not print traceback when pipe is broken
https://fedorahosted.org/freeipa/ticket/2284

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-02 13:56:19 +00:00
Gabe
387be8651c Allow ipa help command to run when ipa-client-install is not configured
https://fedorahosted.org/freeipa/ticket/3584

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-06-02 13:54:36 +00:00
Martin Basti
943c539122 ULC: fix: upgrade for stage Stage User Admins failed
Upgrade failed because entry 'dn: cn=Stage User
Administrators,cn=privileges,cn=pbac,$SUFFIX' doesnt exist.

Now upgrade will create the privilege if it does not exist.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
2015-06-02 13:50:19 +00:00
Ludwig Krispenz
faa4d0b6ea replica install fails with domain level 1
when updating an replication agreement from a toplogy segment an incorrect default value was used for bindmethod.
    Only attributes explicitely set in the segment should be applied.
    At shutdown the server could crash because the plugin was called after it was stopped.

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

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-06-02 14:05:32 +02:00
Martin Basti
af8f44c86a Installers fix: remove temporal ccache
Environ variable may be changed outside, so store path into global
variable.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-06-02 10:35:22 +00:00
Simo Sorce
e2c2d5967d Add compatibility function for older libkrb5
Before krb5 1.13 the krb5_salttype_to_string() function was returning
incorrect names (display names of some kind instead of the names
used by the rest of the library to map saltname to the salt type
integer number).
This patch adds a function that checks at runtime if we have a working
function and uses a fallback map updated to the salt types known up
to 1.12, this allows us to use the library provided function in
following releases where new salt types may emerge.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Milan Kubik <mkubik@redhat.com>
2015-05-30 12:24:15 -04:00
Jan Cholasta
f451af9a5a install: Move ipa-server-upgrade code into a module
https://fedorahosted.org/freeipa/ticket/4468

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-29 08:00:33 +00:00
Jan Cholasta
3cb42e33c0 install: Move ipa-replica-install code into a module
https://fedorahosted.org/freeipa/ticket/4468

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-29 08:00:33 +00:00
Jan Cholasta
6dabe6ebb2 install: Move ipa-server-install code into a module
https://fedorahosted.org/freeipa/ticket/4468

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-29 08:00:33 +00:00
Jan Cholasta
5a7b153ad2 install: Make a package out of ipaserver.install.server
Until ipa-server-install, ipa-replica-install and ipa-server-upgrade are merged
into a single code base, keep their respective bits in separate modules in the
package.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-29 08:00:33 +00:00
Simo Sorce
d5b6c83601 Detect default encsalts kadmin password change
When kadmin tries to change a password it will get the allowed keysalts
from the password policy. Failure to provide them will result in kadmin
using the defaults specified in the kdc.conf file or hardcoded defaults
(the default salt is then of type NORMAL).

This patch provides the supported values that have been read out of the
appropriate LDAP attribute when we read the server configuration.

Then at actual password change, check if kadmin is handing us back the exact
list of supported encsalts we sent it, and in that case replace it with the
real default encsalts.

Fixes https://fedorahosted.org/freeipa/ticket/4914

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Martin Babinsky <mbabinsk@redhat.com>
2015-05-27 09:45:56 -04:00
Martin Babinsky
01fa05dd4e KRA: get the right dogtag version during server uninstall
Ensure that the correct version of dogtag is passed from API object to the KRA
uninstaller during IPA server uninstall.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-05-26 12:43:46 +00:00
Petr Vobornik
41662eb9f0 server-find and server-show commands
ipa server-find
  ipa server-show FQDN

These commands display a list of IPA servers stored in cn=masters,cn=ipa,cn=etc,$SUFFIX

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-05-26 12:16:31 +00:00
Tomas Babej
f3010498af Add Domain Level feature
https://fedorahosted.org/freeipa/ticket/5018

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-05-26 11:59:47 +00:00
Martin Basti
9eedffdfa6 Server Upgrade: fix remove statement
If value does not exists then do not update entry. Otherwise, together with
nonexistent entry, the LDAP decode error will be raised.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-26 11:33:07 +00:00
Martin Basti
f903c2d5bf Fix: use DS socket check only for upgrade
To detect if DS server is running, use the slapd socket for upgrade, and the LDAP port
for installation.

Without enabled LDAPi socket checking doesnt work.

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

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2015-05-26 11:30:15 +00:00
Ludwig Krispenz
4bcc2546d5 install part - manage topology in shared tree
https://fedorahosted.org/freeipa/ticket/4302

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-05-26 10:43:50 +02:00
Ludwig Krispenz
25bf0c6e78 ds plugin - manage replication topology in the shared tree
Implementation of ticket: https://fedorahosted.org/freeipa/ticket/4302
        Design page: http://www.freeipa.org/page/V4/Manage_replication_topology

Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-26 10:40:29 +02:00
Tomas Babej
c5f319d3e8 replica-manage: Properly delete nested entries
Bad ordering of LDAP entries during replica removal resulted in a failure to
delete replica and its services from cn=masters,cn=ipa,cn=etc,$SUFFIX. This
patch enforces the correct ordering of entries resulting in proper removal of
services before the host entry itself.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-26 09:52:45 +02:00
Martin Kosek
d0a330aa1c Fix typo in ipa-server-upgrade man page 2015-05-26 07:53:44 +02:00
Martin Basti
027515230a Server Upgrade: Move code from ipa-upgradeconfig to separate module
This also prevent the script ipa-upgradeconfig execute upgrading.
Upgrade of services is called from ipa-server-upgrade

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-05-25 16:34:44 +00:00
Martin Babinsky
6a4b428120 merge KRA installation machinery to a single module
This is a prerequisite to further refactoring of KRA install/uninstall
functionality in all IPA install scripts.

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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-05-25 16:23:32 +00:00
Alexander Bokovoy
5fd8e53f66 ipaserver/dcerpc: Ensure LSA pipe has session key before using it
With Samba 4.2 there is a bug that prevents Samba to consider Kerberos
credentials used by IPA httpd process when talking to smbd. As result,
LSA RPC connection is seen as anonymous by Samba client code and we cannot
derive session key to use for encrypting trust secrets before transmitting
them.

Additionally, rewrite of the SMB protocol support in Samba caused previously
working logic of choosing DCE RPC binding string to fail. We need to try
a different set of priorities until they fail or succeed.

Requires Samba fixes from https://bugzilla.redhat.com/show_bug.cgi?id=1219832

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1219834

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-05-25 16:36:43 +02: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
Petr Vobornik
5f04da35df git ignore ipaplatform/__init__.py
This file is generated in `make version-update`

added in 9f049ca144

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-22 15:58:44 +02:00
Martin Basti
c43c5d1e43 Server Upgrade: Fix: execute schema update
Accidentaly schema upgrade has not been executed.

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

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2015-05-22 15:56:33 +02:00
Martin Basti
3d17bf8e63 Server Upgrade: wait until DS is ready
During server upgrade we should wait until DS is ready after restart, otherwise
connection error is raised.

Instead of 389 port, the DS socket is checked.

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

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2015-05-22 15:51:05 +02:00
Martin Basti
98e4c6d6de Uid uniqueness: fix: exclude compat tree from uniqueness
Without this commit it is not possible to move user to staged area.

Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-22 15:41:41 +02:00
Jan Cholasta
454e8691cf client-install: Fix kinits with non-default Kerberos config file
https://fedorahosted.org/freeipa/ticket/4808

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-21 07:42:24 +00:00
Martin Babinsky
9d8ac395c0 do not check for directory manager password during KRA uninstall
ipa-kra-install validates and asks for directory manager password during
uninstallation phase. Since this password is never used during service
uninstall, the uninstaller will not perform these checks anymore.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-05-20 13:13:29 +00:00
Petr Vobornik
80251e772b webui: datetime widget with datepicker
Datetime widget was transform from a simple text input to 3 separate inputs:
- date with bootstrap-datepicker
- hour
- minute

e.g.:
 Validity end    [ 2015-05-18     ] [23]:[01] UTC
       Vendor    [ abc                            ]

Editation of seconds is not supported.

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

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-20 14:36:09 +02:00
Petr Vobornik
9e3320403a webui: add boostrap-datepicker files
https://fedorahosted.org/freeipa/ticket/4347

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-20 14:36:09 +02:00
Petr Vobornik
2361ac11ad webui: option to not create user private group
Web UI wa not able to create a user without a private group.

New field added to user adder dialog to allow that.

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

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Ales 'alich' Marecek <amarecek@redhat.com>
2015-05-20 14:18:17 +02:00
Petr Vobornik
9b5655607d webui: fix empty table border in Firefox
Firefox suffers from: https://bugzilla.mozilla.org/show_bug.cgi?id=409254

This is a workaround to fix it.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2015-05-20 14:16:42 +02:00
Petr Vobornik
7ddcff3ef7 webui: prefer search facet's deleter dialog
Deleter dialog in search facet is now chosen in order as follows:
- facet's, defined as spec, e.g.:
  deleter_dialog: { $factory: IPA.user.deleter_dialog }
- entity's, the same but it entity spec
- default, which is IPA.search_deleter_dialog

Previous didn't allow to override entity dialog with facet one and
also definition by spec was not allowed.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00
Petr Vobornik
99d282d38d webui: stageusers, display page elements based on user state
Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
2015-05-20 14:04:10 +02:00