Commit Graph

309 Commits

Author SHA1 Message Date
Jan Cholasta
c34f5fbc88 Update host SSH public keys on the server during client install.
This is done by calling host-mod to update the keys on IPA server and nsupdate
to update DNS SSHFP records. DNS update can be disabled using --no-dns-sshfp
ipa-client-install option.

https://fedorahosted.org/freeipa/ticket/1634
2012-02-13 22:21:43 -05:00
John Dennis
d1e0c1b606 Add ipa_memcached service
* Adds ipa_memcached SystemV initscript

* Adds ipa_memcached service file and tmpfiles.d/ipa.conf
  to recreate /var/run/ipa_memcached on reboot.

* Adds ipa_memcached config file

* Adds memcacheinstnace.py to manage ipa_memcaced as
  as SimpleService object.

* Updates the IPA service list to include ipa_memcached,
  at service positon 39, httpd is position 40

* Updates the spec file:
  - requires the memcached daemon and python client
  - installs service or initscripts depending on OS
  - installs config file
  - creates /var/run/ipa_memcached directory

* Modifies ipa-server-install to install ipa_memcached
2012-02-09 13:20:28 -06:00
Martin Kosek
13cdf51ab4 Remove unused options from ipa-managed-entries
ipa-managed-entries contain auto-generated options that are not
used in the script and may just confuse users. Remove them.

https://fedorahosted.org/freeipa/ticket/2347
2012-02-07 12:01:02 +01:00
Petr Viktorin
5362b0b566 Fix/add options in ipa-managed-entries man page
* The --entry option was wrongly listed as --entries; fix that.
  https://fedorahosted.org/freeipa/ticket/2277

* Add the --help option
2012-02-07 09:56:20 +01:00
Ondrej Hamada
2e860f6d07 Fix 'no-reverse' option description
The description of 'no-reverse' option was fixed in both code and
manpages of ipa-replica-install and ipa-dns-install.

https://fedorahosted.org/freeipa/ticket/2161
2012-02-02 17:50:55 -05:00
Rob Crittenden
7a1399bee1 Check for the existence of a replication agreement before deleting it.
When using ipa-replica-manage or ipa-csreplica-manage to delete an
agreement with a host we would try to make a connection to that host
prior to tryign to delete it. This meant that the trying to delete
a host we don't have an agreement with would return a connection
error instead of a "no agreement with host foo" error.

Also display a completed message when an agreement is removed.

https://fedorahosted.org/freeipa/ticket/2048
https://fedorahosted.org/freeipa/ticket/2125
2012-01-30 17:27:55 +01:00
Martin Kosek
6141919fba Fix ipa-server-install for dual NICs
A server may have 2 or more NICs and its hostname may thus resolve
to 2 and more forward addresses. IP address checks in install
scripts does not expect this setup and may fail or crash.

This script adds a support for multiple forward addresses for
a hostname. The install scripts do not crash now. When one IP
address is needed, user is asked to choose from all detected
server IP addresses.

https://fedorahosted.org/freeipa/ticket/2154
2012-01-22 23:01:42 -05:00
Rob Crittenden
f3b606b627 Update and package ipa-upgradeconfig man page.
Require that the tool be run as root to avoid a permission-related
backtrace.

https://fedorahosted.org/freeipa/ticket/1758
2012-01-23 16:07:49 +01:00
Simo Sorce
0d3cd4c384 Fix replication setup
Changes to add a cs-replication management tool mistakenly always set a flag
that caused replicas to not add the list of attribute we exclude from
replication.
2012-01-13 10:22:38 -05:00
Martin Kosek
95f3ec5d70 Let replicas install without DNS
Let ipa-replica-prepare and ipa-replica-install work without
proper DNS records as records in /etc/hosts are sufficient for
DS replication.

  1) ipa-replica-prepare now just checks if the replica hostname
     is resolvable (DNS records are not required). It is now able
     to prepare a replica file even when the replica IP address is
     present in /etc/hosts only.
  2) ipa-replica-install is now able to proceed when the hostname
     is not resolvable. It uses an IP address passed in a new
     option --ip-address to create a record in /etc/hosts in the
     same way as ipa-server-install does.

https://fedorahosted.org/freeipa/ticket/2139
2012-01-13 09:11:05 +01:00
Martin Kosek
bc5085699d Fix LDAP updates in ipa-replica-install
ipalib API needs to be bootstrapped in 'installer' context otherwise
LDAP update plugins don't get initialized and ipa-replica-install
crashes.

https://fedorahosted.org/freeipa/ticket/2139
2012-01-13 09:10:58 +01:00
Martin Kosek
649d13b597 Prevent service restart failures in ipa-replica-install
Call restart() methods of appropriate services instead of calling
the system service restart command directly as service() method
has a capability to wait until the service is fully up. Without
this patch ipa-replica-install crashed on F-16 because krb5kdc
service was started before dirsrv service was fully up.

https://fedorahosted.org/freeipa/ticket/2139
2012-01-13 09:10:54 +01:00
Rob Crittenden
638a970172 Catch exception when trying to list missing managed entries definitions
On the off chance that the definitions cannot be found we should
catch the error and not raise a backtrace.

https://fedorahosted.org/freeipa/ticket/1912
2012-01-12 05:46:13 -05:00
Martin Kosek
d0648f1fd4 Add DNS check to conncheck port probe
It is pointless to report failures for all checked ports when the
target hostname is not resolvable - user may get easily confused.
This patch changes this behavior so that conncheck fails with
a proper error and does not even continue to port probing part.

https://fedorahosted.org/freeipa/ticket/1984
2012-01-03 16:41:15 -05:00
Martin Kosek
d040b93e38 Ask for user confirmation in ipa-server-install
Summarize entered IPA server configuration so that user can examine
it and stop the installation process in case of error. Before this
patch, user had to know which question is the last one and check
the values he entered in various places during the interactive
wizard.

https://fedorahosted.org/freeipa/ticket/1083
2011-12-07 14:45:09 +01:00
Sumit Bose
3de257fe54 activate CLDAP 2011-12-06 08:29:53 -05:00
Sumit Bose
7c3e5f1be5 Fix some pylint warnings 2011-12-06 08:29:53 -05:00
Sumit Bose
2ac9d4816a Add DNS service records for Windows
https://fedorahosted.org/freeipa/ticket/1939
2011-11-30 11:28:39 +01:00
Martin Kosek
046147b3a4 Make ipa-server-install clean after itself
ipa-server-install may create some files in the first phase of
installation before the actual installation and configuring of
services starts. If the installation is interrupted, these files
may prevent installing the server again until IPA server is
uninstalled. This may be confusing and annoying for the user.

This patch safely recovers all known files that could be created
in the first phase of the installation. No clean up is done if
the actual installation has not started yet or the installation
returned success.

https://fedorahosted.org/freeipa/ticket/1980
2011-11-29 09:18:03 +01:00
Rob Crittenden
2f4b3972a0 Add plugin framework to LDAP updates.
There are two reasons for the plugin framework:
1. To provide a way of doing manual/complex LDAP changes without having
   to keep extending ldapupdate.py (like we did with managed entries).
2. Allows for better control of restarts.

There are two types of plugins, preop and postop. A preop plugin runs
before any file-based updates are loaded. A postop plugin runs after
all file-based updates are applied.

A preop plugin may update LDAP directly or craft update entries to be
applied with the file-based updates.

Either a preop or postop plugin may attempt to restart the dirsrv instance.
The instance is only restartable if ipa-ldap-updater is being executed
as root. A warning is printed if a restart is requested for a non-root
user.

Plugins are not executed by default. This is so we can use ldapupdate
to apply simple updates in commands like ipa-nis-manage.

https://fedorahosted.org/freeipa/ticket/1789
https://fedorahosted.org/freeipa/ticket/1790
https://fedorahosted.org/freeipa/ticket/2032
2011-11-22 23:57:10 -05:00
John Dennis
56401c1abe ticket 2022 - modify codebase to utilize IPALogManager, obsoletes logging
change default_logger_level to debug in configure_standard_logging

add new ipa_log_manager module, move log_mgr there, also export
root_logger from log_mgr.

change all log_manager imports to ipa_log_manager and change
log_manager.root_logger to root_logger.

add missing import for parse_log_level()
2011-11-23 09:36:18 +01:00
Rob Crittenden
8be0d84a59 Don't check for 389-instances.
We no longer need to enforce that no 389-ds instances exist on an IPA
server. Checking that the ports exist should be enough.

This used to be one mechanism we used to check to see if IPA was already
installed. We have a better mechanism now.

https://fedorahosted.org/freeipa/ticket/1735
2011-11-16 10:26:35 +01:00
Martin Kosek
70cb8bf355 Fix ipa-managed-entries bind procedure
Make sure that when Directory Manager password is entered,
we directly do a simple bind instead of trying binding via GSSAPI.
Also capture ldap.INVALID_CREDENTIALS exception and provide nice
error message than crash.

https://fedorahosted.org/freeipa/ticket/1927
2011-11-16 08:52:40 +01:00
JR Aquino
714b0d11ec Replication: Adjust replica installation to omit processing memberof computations
https://fedorahosted.org/freeipa/ticket/1794

If the master does not yet support the total update list feature we still
run the memberof fixup task and not fail to replicate due to the new
attribute not being settable.

Jointly-developed-with: Simo Sorce <ssorce@redhat.com>
Jointly-developed-with: Nathank Kinder <nkinder@redhat.com>
2011-11-14 05:30:06 -05:00
Martin Kosek
0165a03694 Hosts file not updated when IP is passed as option
When an IPA server with unresolvable hostname is being installed,
a hostname record must be inserted to /etc/hosts or the
installation will fail. However, it is not inserted when IP
address is passed as an option (--ip-address) and not
interactively. This patch fixes this so that /etc/hosts
record is inserted in both cases.

https://fedorahosted.org/freeipa/ticket/2074
2011-11-10 20:56:29 -05:00
Martin Kosek
ccb1433839 Fix ipa-replica-conncheck port labels
https://fedorahosted.org/freeipa/ticket/2057
2011-11-04 08:55:25 +01:00
Martin Kosek
32a506cac8 Fix ipa-server-install answer cache
Current Answer Cache storing mechanism is not ideal for storing
non-trivial Python types like arrays, custom classes, etc.
RawConfigParser just translates values to string, which
are not correctly decoded when the Answer Cache is parsed and
restored in the installer.

This patch replaces RawConfigParser with Python's standard pickle
module, which is a recommended way for serialization in Python.

https://fedorahosted.org/freeipa/ticket/2054
2011-11-03 21:46:27 +01:00
Martin Kosek
0450934e36 Fix ipa-managed-entries password option long form
https://fedorahosted.org/freeipa/ticket/1913
2011-10-26 08:55:09 +02:00
Martin Kosek
b26d0dcc04 Add --zonemgr/--admin-mail validator
Do at least a basic validation of DNS zone manager mail address.

Do not require '@' to be in the mail address as the SOA record
stores this value without it and people may be used to configure
it that way. '@' is always removed by the installer/dns plugin before
the DNS zone is created.

https://fedorahosted.org/freeipa/ticket/1966
2011-10-26 08:52:50 +02:00
Alexander Bokovoy
25d5d7ed93 Add support for systemd environments and use it to support Fedora 16
https://fedorahosted.org/freeipa/ticket/1192
2011-10-24 15:10:11 +02:00
Rob Crittenden
eaec3c4968 Add explicit instructions to ipa-replica-manage for winsync replication
https://fedorahosted.org/freeipa/ticket/1946
2011-10-14 09:05:06 +02:00
Martin Kosek
363c23a37c Check /etc/hosts file in ipa-server-install
There may already be a record in /etc/hosts for chosen IP address
which may not be detected under some circumstances. Make sure
that /etc/hosts is checked properly.

https://fedorahosted.org/freeipa/ticket/1923
2011-10-13 00:54:45 -04:00
Martin Kosek
77cc5e0246 Hostname used by IPA must be a system hostname
Make sure that the hostname IPA uses is a system hostname. If user
passes a non-system hostname, update the network settings and
system hostname in the same way that ipa-client-install does.

This step should prevent various services failures which may not
be ready to talk to IPA with non-system hostname.

https://fedorahosted.org/freeipa/ticket/1931
2011-10-13 00:54:41 -04:00
Martin Kosek
9bff6cb8a9 Check hostname resolution sanity
Always check (even with --setup-dns or --no-host-dns) that if the
host name or ip address resolves, it resolves to sane value. Otherwise
report an error. Misconfigured /etc/hosts causing these errors could
harm the installation later.

https://fedorahosted.org/freeipa/ticket/1923
2011-10-13 00:54:37 -04:00
Rob Crittenden
5c10f66e4a Fix upgrades of selfsign server
In checking to see if the dogtag proxy configuration needed to be updated
we didn't handle the case where dogtag isn't installed at all.

https://fedorahosted.org/freeipa/ticket/1951
2011-10-11 17:08:17 -04:00
Rob Crittenden
7bd3b3e121 Fix DNS permissions and membership in privileges
This resolves two issues:

1. The DNS acis lacked a prefix so weren't tied to permissions
2. The permissions were added before the privileges so the member
   values weren't calculated properly

For updates we need to add in the members and recalculate memberof via
a DS task.

https://fedorahosted.org/freeipa/ticket/1898
2011-10-09 23:44:22 -04:00
Adam Young
12cc78caf6 Execute pki proxy setup when server is upgraded if needed 2011-10-09 23:32:55 -04:00
Martin Kosek
5b968f9632 Improve ipa-replica-prepare DNS check
Currently, verify_fqdn() function raises RuntimeError for every
problem with the hostname. This makes it difficult for tools
like ipa-replica-prepare to behave differently for a subset of
raised errors (for example to be able to create a DNS record for
new replica when verify_fqdn() reports a lookup error).

Implement own exceptions for verify_fqdn() that they can be safely
used to distinguish the error type.

https://fedorahosted.org/freeipa/ticket/1899
2011-10-06 11:27:50 +02:00
Simo Sorce
652d315b3e replica-prepare: anonymous binds may be disallowed
Fixes: https://fedorahosted.org/freeipa/ticket/1900
2011-10-06 08:41:27 +02:00
Martin Kosek
185ca8f6fc Install tools crash when password prompt is interrupted
When getpass.getpass() function is interrupted via CTRL+D, EOFError
exception is thrown. Most of the install tools are not prepared for
this event and crash with this exception. Make sure that it is
handled properly and nice error message is printed.

https://fedorahosted.org/freeipa/ticket/1916
2011-10-06 08:28:15 +02:00
Nalin Dahyabhai
7d5106de97 - note that PKCS#12 files also contain private keys, and that the "pkinit" options refer to the KDC's credentials 2011-10-04 22:59:56 -04:00
Jan Cholasta
209bcb0b98 Work around pkisilent bugs.
Check directory manager password and certificate subject base for
invalid characters.
(https://bugzilla.redhat.com/show_bug.cgi?id=658641)

Shell-escape pkisilent command-line arguments.
(https://bugzilla.redhat.com/show_bug.cgi?id=741180)

ticket 1636
2011-10-04 20:12:58 -04:00
Jan Cholasta
12bfed37d4 Add a function for formatting network locations of the form host:port for use in URLs.
If the host part is a literal IPv6 address, it must be enclosed in square
brackets (RFC 2732).

ticket 1869
2011-10-05 10:58:25 +02:00
Martin Kosek
28603e0c3a Be more clear about selfsign option
Installing IPA server --selfsign option is currently a one-way ticket
to server with limited certificate capabilities. Make sure that user
really want to install it by implementing the following steps:

- moving the option to the bottom of certificate options section
- adding a warning to ipa-server-install man page
- adding a warning to ipa-server-install help
- adding a warning to ipa-server-install configuration summary
  when one runs ipa-server-install

https://fedorahosted.org/freeipa/ticket/1908
2011-10-04 11:00:42 +02:00
Rob Crittenden
a41457ec3a Detect CA installation type in ipa-replica-prepare and ipa-ca-install.
ipa-ca-install can only add a dogtag CA to an IPA install.

ipa-replica-prepare can only be run on the initial master with a
selfsign backend.

https://fedorahosted.org/freeipa/ticket/1756
https://fedorahosted.org/freeipa/ticket/1757
2011-09-27 17:50:46 +02:00
Martin Kosek
f76d33a296 Revert "Always require SSL in the Kerberos authorization block."
This patch broke installation of a new master. Reverting until
we develop a better solution.

This reverts commit f42da4357e.
2011-09-27 08:54:42 +02:00
Jan Cholasta
5cd121d6dd Fix ipa-replica-prepare always warning the user about not using the system hostname.
ticket 1717
2011-09-26 17:11:09 +02:00
Rob Crittenden
f42da4357e Always require SSL in the Kerberos authorization block.
This also corrects a slight bug where if add is True then we always
re-update the file.

https://fedorahosted.org/freeipa/ticket/1755
2011-09-23 20:41:08 +02:00
Martin Kosek
9ccd979f02 Remove checks for ds-replication plugin
The replication plugin is no longer shipped as a separate package.
Remove the code checking its existence.

https://fedorahosted.org/freeipa/ticket/1815
2011-09-22 13:14:23 +02:00
Simo Sorce
3963687cde conncheck: Additional check to verify the admin password is ok
If we can get a ticket for the master then we know we got all right.
This should avoid being prompted again by ssh if the kinit failed and for some
reason the error was not caught (seen in live tests).
2011-09-21 10:48:34 -04:00