Commit Graph

347 Commits

Author SHA1 Message Date
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
JR Aquino
1ac613fc18 25 Create Tool for Enabling/Disabling Managed Entry Plugins
Remove legacy ipa-host-net-manage
Add ipa-managed-entries tool
Add man page for ipa-managed-entries tool

https://fedorahosted.org/freeipa/ticket/1181
2011-09-21 09:22:13 +02:00
Martin Kosek
709e3ddc5c dirsrv is not stopped correctly in the fallback
The previous patch fixed ipactl stop command. However, the dirsrv
stop in the ipactl start command fallback was not right either.

https://fedorahosted.org/freeipa/ticket/1800
2011-09-20 12:41:26 +02:00
Martin Kosek
e49b0e6c09 ipactl does not stop dirsrv
Remove an invalid instance name passed to dirsrv service so that
it is correctly stopped.

https://fedorahosted.org/freeipa/ticket/1800
2011-09-20 10:50:21 +02:00
Sumit Bose
29a7a7e8ce Add ipa-adtrust-install utility
https://fedorahosted.org/freeipa/ticket/1619
2011-09-14 18:45:13 -04:00
Rob Crittenden
ba1bdda25f Update ipa-ldap-updater man page saying it is not an end-user utility
https://fedorahosted.org/freeipa/ticket/1792
2011-09-14 14:39:55 +02:00
Rob Crittenden
4fd20966f6 Improved handling for ipa-pki-proxy.conf
- Remove ipa-pki-proxy.conf when IPA is uninstalled
- Move file removal to httpinstance.py and use remove_file()
- Add a version stanza
- Create the file if it doesn't exist on upgraded installs

https://fedorahosted.org/freeipa/ticket/1771
2011-09-13 16:09:15 +02:00
Sumit Bose
579c8e56e0 Call standard_logging_setup() before any logging is done 2011-09-13 12:54:18 +02:00
Alexander Bokovoy
bbbb550aaa Convert installation tools to platform-independent access to system services
http://fedorahosted.org/freeipa/ticket/1605
2011-09-13 11:15:50 +02:00
Martin Kosek
d0ce604b4d Fix permissions in installers
Fix permissions for (configuration) files produced by
ipa-server-install or ipa-client-install. This patch is needed
when root has a umask preventing files from being world readable.

https://fedorahosted.org/freeipa/ticket/1644
2011-09-07 13:02:43 +02:00
Martin Kosek
dc3d0f3879 Improve man pages structure
There are too many options in ipa-*-install scripts which makes it
difficult to read. This patch adds subsections to install script
online help and man pages to improve readability. No option has
been changed.

To further improve man pages:

1) All man pages were changed to have the same header and top-center
   title to provide united look.

2) Few typos in man pages have been fixed

https://fedorahosted.org/freeipa/ticket/1687
2011-09-07 12:55:12 +02:00
Simo Sorce
15cada3733 conncheck: Fix List of ports to check
We need to check all Kerberos ports both TCP and UDP transports.

Since we have the PKI proxy configuration all communication with the CA happens
on the standard 80/443 ports so we need to check them always.
We do not need to leave the old CA ports open. These ports are still used
locally but not over the network.
2011-09-01 10:10:18 -04:00
Simo Sorce
801dc97adb install: We do not need a kpasswd keytab anymore
We now use MIT's kadmin instead of our old ipa_kpasswd daemon.
kadmind knows how to fetch the keys directly from the database and doesn't need
a keytab on the filesystem.
2011-08-31 16:27:20 -04:00
Simo Sorce
096cc43fe6 install: We do not need a ldap password anymore
Our new ipa-kdb driver access ldap via ldapi:// and EXTERNAL auth and doesn't
need a bind password anymore.

Fixes: https://fedorahosted.org/freeipa/ticket/1743
2011-08-31 16:27:20 -04:00
Martin Kosek
6a2dfde086 Let Bind track data changes
Integrate new bind-dyndb-ldap features to automatically track
DNS data changes:

 1) Zone refresh
    Set --zone-refresh in installation to define number of seconds
    between bind-dyndb-ldap polls for new DNS zones. User now
    doesn't have to restart name server when a new zone is added.

 2) New zone notifications
    Use LDAP persistent search mechanism to immediately get
    notification when any new DNS zone is added. Use --zone-notif
    install option to enable. This option is mutually exclusive
    with Zone refresh.

To enable this functionality in existing IPA installations,
update a list of arguments for bind-dyndb-ldap in /etc/named.conf.
An example when zone refresh is disabled and DNS data change
notifications (argument psearch of bind-dyndb-ldap) are enabled:

dynamic-db "ipa" {
...
        arg "zone_refresh 0";
        arg "psearch yes";
};

This patch requires bind-dyndb-ldap-1.0.0-0.1.b1 or later.

https://fedorahosted.org/freeipa/ticket/826
2011-08-31 16:46:12 +02:00
Rob Crittenden
d7618acb73 Add common is_installed() fn, better uninstall logging, check for errors.
The installer and ipactl used two different methods to determine
whether IPA was configured, unify them.

When uninstalling report any thing that looks suspicious and warn
that a re-install may fail. This includes any remaining 389-ds instances
and any state or files that remains after all the module uninstallers
are complete.

Add wrappers for removing files and directories to log failures.

https://fedorahosted.org/freeipa/ticket/1715
2011-08-29 16:50:43 -04:00
Adam Young
5ee93349f6 enable proxy for dogtag
Dogtag is going to be proxied through httpd.  To make this work, it has to support renegotiation of the SSL
connection.  This patch enables renegotiate in the nss configuration file during during apache configuration,
as well as modifies libnss to set the appropriate optins on the ssl connection in order to  renegotiate.

The IPA install uses the internal ports instead of proxying through
httpd since  httpd is not set up yet.

IPA needs to Request the certificate through a port that uses authentication.  On the Dogtag side, they provide an additional mapping for this:   /ca/eeca/ca as opposed tp /ca/ee/ca  just for this purpose.

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

add flag to pkicreate in order to enable using proxy.

add the proxy file in  /etc/http/conf.d/

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2011-08-29 17:54:49 -04:00
Simo Sorce
dfa944da24 daemons: Remove ipa_kpasswd
Now that we have our own database we can properly enforce stricter constraints
on how the db can be changed. Stop shipping our own kpasswd daemon and instead
use the regular kadmin daemon.
2011-08-26 08:26:08 -04:00
Rob Crittenden
17a86397ce Suppress 389-ds debug output when starting services
If the user wants the output they can pass the --debug flag to ipactl.

https://fedorahosted.org/freeipa/ticket/1402
2011-08-24 13:54:08 +02:00
Jan Cholasta
610faff6f3 Verify that the external CA certificate files are correct.
ticket 1572
2011-08-23 01:23:41 -04:00
Jan Cholasta
b8d4f8ad9f Add option to install without the automatic redirect to the Web UI.
ticket 1570
2011-08-18 23:24:29 -04:00
Jan Cholasta
cc7f9aa7a9 Verify that passwords specified through command line options of ipa-server-install meet the length requirement.
ticket 1621
2011-08-18 20:49:05 -04:00
Jan Cholasta
1ec531469e Make sure messagebus is running prior to starting certmonger.
ticket 1580
2011-08-18 20:15:48 -04:00
Rob Crittenden
cc86c1459b Add information on setting api.env.host in the ipactl.8 man page
ticket https://fedorahosted.org/freeipa/ticket/1390
2011-08-19 08:38:33 +02:00
Jan Cholasta
8edd7ed998 Ask for reverse DNS zone information in attended install right after asking for DNS forwarders, so that DNS configuration is done in one place.
ticket 1522
2011-08-09 13:12:19 +02:00
Rob Crittenden
8495af1a50 Re-arrange CA configuration code to reduce the number of restarts.
Ade Lee from the dogtag team looked at the configuration code and
determined that a number of restarts were not needed and recommended
re-arranging other code to reduce the number of restarts to one.

https://fedorahosted.org/freeipa/ticket/1555
2011-08-03 20:38:07 -04:00
Martin Kosek
eb0454d45c Improve error message in ipactl
If a hostname configured in /etc/ipa/default.conf is changed and
is different from the one stored in LDAP in cn=ipa,cn=etc,$SUFFIX
ipactl gives an unintelligible error.

This patch improves the error message and also offers a list of
configured master so that the hostname setting in IPA configuration
can be easily fixed.

https://fedorahosted.org/freeipa/ticket/1558
2011-08-04 08:18:18 +02:00
John Dennis
442973edc5 Clean up existing DN object usage 2011-07-29 13:13:55 +02:00
Jan Cholasta
a2641254fe Fix external CA install.
ticket 1523
2011-07-26 22:30:21 -04:00
Martin Kosek
1897f12bc2 Fix man page ipa-csreplica-manage
Fix references to ipa-replica-manage in ipa-csreplica-manage.

https://fedorahosted.org/freeipa/ticket/1519
2011-07-25 10:55:33 +02:00
Jan Cholasta
df7ee2ccf5 Fix ipa-compat-manage not working after recent ipa-nis-manage change.
ticket 1147
2011-07-22 10:38:49 +02:00
Jan Cholasta
c1f5dadc4e Don't delete NIS netgroup compat suffix on 'ipa-nis-manage disable'.
ticket 1469
2011-07-19 13:45:01 +02:00
Jan Cholasta
c09f116f43 Clean up of IP address checks in install scripts.
Fixes ipa-dns-install incorrect warning.

ticket 1486
2011-07-19 12:30:47 +02:00
Rob Crittenden
3fdca99c48 Create tool to manage dogtag replication agreements
For the most part the existing replication code worked with the
following exceptions:

- Added more port options
- It assumed that initial connections were done to an SSL port. Added
  ability to use startTLS
- It assumed that the name of the agreement was the same on both sides.
  In dogtag one is marked as master and one as clone. A new option is
  added, master, the determines which side we're working on or None
  if it isn't a dogtag agreement.
- Don't set the attribute exclude list on dogtag agreements
- dogtag doesn't set a schedule by default (which is actually recommended
  by 389-ds). This causes problems when doing a force-sync though so
  if one is done we set a schedule to run all the time. Otherwise the
  temporary schedule can't be removed (LDAP operations error).

https://fedorahosted.org/freeipa/ticket/1250
2011-07-17 22:16:32 -04:00
Rob Crittenden
2f650b60a4 Use information from the certificate subject when setting the NSS nickname.
There were a few places in the code where certs were loaded from a
PKCS#7 file or a chain in a PEM file. The certificates got very
generic nicknames.

We can instead pull the subject from the certificate and use that as
the nickname.

https://fedorahosted.org/freeipa/ticket/1141
2011-07-17 22:14:24 -04:00
Rob Crittenden
038089a0c9 Validate that the certificate subject base is in valid DN format.
https://fedorahosted.org/freeipa/ticket/1176
2011-07-17 22:10:03 -04:00
Martin Kosek
1a207bb23c Fix typo in ipa-replica-prepare
https://fedorahosted.org/freeipa/ticket/1327
https://fedorahosted.org/freeipa/ticket/1347
2011-07-18 14:54:41 +02:00
Martin Kosek
50a2c45760 Check IPA configuration in install tools
Install tools may fail with unexpected error when IPA server is not
installed on a system. Improve user experience by implementing
a check to affected tools.

https://fedorahosted.org/freeipa/ticket/1327
https://fedorahosted.org/freeipa/ticket/1347
2011-07-18 09:36:43 +02:00
Jan Cholasta
5f0adc3fbe Fix exit status of ipa-nis-manage enable.
ticket 1247
2011-07-15 02:39:17 -04:00
Martin Kosek
d802aa57f1 Fix self-signed replica installation
When a replica for self-signed server is being installed, the
installer crashes with "Not a dogtag CA installation". Make sure
that installation is handled correctly for both dogtag and
self-signed replicas.

https://fedorahosted.org/freeipa/ticket/1479
2011-07-14 22:36:53 -04:00
Martin Kosek
aece880d8f Fix ipa-dns-install
When DNS plugin is installed via ipa-dns-install and user has a valid
Kerberos ticket at the time, the DNS installation is corrupt and named
won't start, reporting Preauthentication error.

When the non-DM identity is used for authentication, krbprincipalkey
attribute in DNS service LDAP record is not created, thus leading
to the error. This patch makes sure that authentication with Directory
Manager password is used every time.

https://fedorahosted.org/freeipa/ticket/1483
2011-07-15 17:36:29 +02:00
Jan Cholasta
881df73568 Fix creation of reverse DNS zones.
Create reverse DNS zone for /24 IPv4 subnet and /64 IPv6 subnet by
default instead of using the netmask from the --ip-address option.

Custom reverse DNS zone can be specified using new --reverse-zone
option, which replaces the old --ip-address netmask way of creating
reverse zones.

The reverse DNS zone name is printed to the user during the install.

ticket 1398
2011-07-15 16:42:16 +02:00
Jan Cholasta
3656d9be3c Verify that the hostname is fully-qualified before accessing the service information in ipactl.
Fail gracefully if the supplied hostname isn't fully-qualified in
ipa-server-install.

ticket 1035
2011-06-24 01:23:14 -04:00
Rob Crittenden
8a32bb3746 Make dogtag an optional (and default un-) installed component in a replica.
A dogtag replica file is created as usual. When the replica is installed
dogtag is optional and not installed by default. Adding the --setup-ca
option will configure it when the replica is installed.

A new tool ipa-ca-install will configure dogtag if it wasn't configured
when the replica was initially installed.

This moves a fair bit of code out of ipa-replica-install into
installutils and cainstance to avoid duplication.

https://fedorahosted.org/freeipa/ticket/1251
2011-06-23 19:04:33 -04:00
Rob Crittenden
8810758c11 Let the framework be able to override the hostname.
The hostname is passed in during the server installation. We should use
this hostname for the resulting server as well. It was being discarded
and we always used the system hostname value.

Important changes:
- configure ipa_hostname in sssd on masters
- set PKI_HOSTNAME so the hostname is passed to dogtag installer
- set the hostname when doing ldapi binds

This also reorders some things in the dogtag installer to eliminate an
unnecessary restart. We were restarting the service twice in a row with
very little time in between and this could result in a slew of reported
errors, though the server installed ok.

ticket 1052
2011-06-23 02:11:34 -04:00
Martin Kosek
b227208d01 Fix IPA install for secure umask
Make sure that IPA can be installed with root umask set to secure
value 077. ipa-server-install was failing in DS configuration phase
when dirsrv tried to read boot.ldif created during installation.

https://fedorahosted.org/freeipa/ticket/1282
2011-06-21 23:45:00 -04:00
Rob Crittenden
dd69c7dbe6 Make data type of certificates more obvious/predictable internally.
For the most part certificates will be treated as being in DER format.
When we load a certificate we will generally accept it in any format but
will convert it to DER before proceeding in normalize_certificate().

This also re-arranges a bit of code to pull some certificate-specific
functions out of ipalib/plugins/service.py into ipalib/x509.py.

This also tries to use variable names to indicate what format the certificate
is in at any given point:

dercert: DER
cert: PEM
nsscert: a python-nss Certificate object
rawcert: unknown format

ticket 32
2011-06-21 19:09:50 -04:00
Rob Crittenden
c329a54c09 The IP address provided to ipa-server-install must be local
Compare the configured interfaces with the supplied IP address and
optional netmask to determine if the interface is available.

https://fedorahosted.org/freeipa/ticket/1175
2011-06-20 22:14:10 -04:00
Martin Kosek
d9808498a8 Improve IP address handling in IPA option parser
Implements a way to pass match_local and parse_netmask parameters
to IP option checker.

Now, there is just one common option type "ip" with new optional
attributes "ip_local" and "ip_netmask" which can be used to
pass IP address validation parameters.

https://fedorahosted.org/freeipa/ticket/1333
2011-06-19 20:06:21 -04:00
Martin Kosek
08d1b6da1a Add port 9443 to replica port checking
Port 9443 (Agent secure port on PKI-CA) was missing. Additionaly,
checked port descriptions case consistency fixed.

https://fedorahosted.org/freeipa/ticket/1321
2011-06-15 17:22:10 +02:00
Martin Kosek
f215089785 Improve DNS zone creation
When a new DNS zone is being created a local hostname is set as a
nameserver of the new zone. However, when the zone is created
during ipa-replica-prepare, the the current master/replica doesn't
have to be an IPA server with DNS support. This would lead to DNS
zones with incorrect NS records as they wouldn't point to a valid
name server.

Now, a list of all master servers with DNS support is retrieved
during DNS zone creation and added as NS records for a new DNS
zone.

https://fedorahosted.org/freeipa/ticket/1261
2011-06-15 09:02:09 +02:00
Rob Crittenden
9f72637b13 Do better detection on status of CA DS instance when installing.
The conditional used to determine if thd CA 389-ds instance was already
configured was rather poor so it was possible to pass command-line
arguments in to confuse it. This would cause it to not be installed at
all causing the dogtag installation to fail in a strange way.

https://fedorahosted.org/freeipa/ticket/1244
2011-06-13 00:15:14 -04:00
Jan Cholasta
d2b483cbb3 Fix directory manager password validation in ipa-nis-manage.
ticket 1283, 1284
2011-06-13 12:59:22 +02:00
Rob Crittenden
7940270b9f Remove root autobind search restriction, fix upgrade logging & error handling.
There was no point in limiting autobind root to just search cn=config since
it could always just modify its way out of the box, so remove the
restriction.

The upgrade log wasn't being created. Clearing all other loggers before
we calling logging.basicConfig() fixes this.

Add a global exception when performing updates so we can gracefully catch
and log problems without leaving the server in a bad state.

https://fedorahosted.org/freeipa/ticket/1243
https://fedorahosted.org/freeipa/ticket/1254
2011-06-13 09:51:05 +02:00
Martin Kosek
915235859c IPA installation with --no-host-dns fails
--no-host-dns option should allow installing IPA server on a host
without a DNS resolvable name.

Update parse_ip_address and verify_ip_address functions has been
changed not to return None and print error messages in case of
an error, but rather let the Exception be handled by the calling
routine.

https://fedorahosted.org/freeipa/ticket/1246
2011-06-10 08:29:14 +02:00
Rob Crittenden
a26fb5aaca Fix external CA installation
When re-creating the CADS instance it needs to be more fully-populated
so we have enough information to create an SSL certificate and move
the principal to a real entry.

https://fedorahosted.org/freeipa/ticket/1245
2011-06-09 17:41:43 +02:00
Martin Kosek
ab098ada04 Skip know_host check for ipa-replica-conncheck
When IPA replica is installed and the master machine record is not
in ~/.ssh/known_hosts, ipa-replica-install will prompt user to answer
a question about adding a host to this file.

This has, however, a potential to break automatic tests.
ipa-replica-conncheck should not require any further user interaction
when all mandatory options are filled.

https://fedorahosted.org/freeipa/ticket/1305
2011-06-08 11:31:15 -04:00
Martin Kosek
241ee334de Connection check program for replica installation
When connection between a master machine and future replica is not
sane, the replica installation may fail unexpectedly with
inconvenient error messages. One common problem is misconfigured
firewall.

This patch adds a program ipa-replica-conncheck which tests the
connection using the following procedure:

1) Execute the on-replica check testing the connection to master
2) Open required ports on local machine
3) Ask user to run the on-master part of the check OR run it
   automatically:
     a) kinit to master as default admin user with given password
     b) run the on-master part using ssh
4) When master part is executed, it checks connection back to
   the replica and prints the check result

This program is run by ipa-replica-install as mandatory part. It
can, however, be skipped using --skip-conncheck option.
ipa-replica-install now requires password for admin user to run
the command on remote master.

https://fedorahosted.org/freeipa/ticket/1107
2011-06-08 09:29:52 +02:00
Martin Kosek
8077b7ab93 Fix forward zone creation in ipa-replica-prepare
When a new forward zone is created in ipa-replica-prepare
the master DNS address gets corrupted by invalid A/AAAA record.

https://fedorahosted.org/freeipa/ticket/1260
2011-06-08 09:14:06 +02:00
Jan Cholasta
db78f36235 Honor netmask in DNS reverse zone setup.
ticket 910
2011-05-30 13:37:03 +02:00
Jan Cholasta
80b4b3d44b Parse netmasks in IP addresses passed to server install.
ticket 1212
2011-05-30 13:36:26 +02:00
Martin Kosek
17c3f9e84e Fix reverse zone creation in ipa-replica-prepare
When a new reverse zone was created in ipa-replica-prepare (this
may happen when a new replica is from different subnet), the master
DNS address was corrupted by invalid A/AAAA record. This caused
problems for example in installing replica.

https://fedorahosted.org/freeipa/ticket/1223
2011-05-27 18:00:47 +02:00
Rob Crittenden
5288bdb79a Document that deleting and re-adding a replica requires a dirsrv restart.
If you install a replica, delete the replica, then re-add it and then
try to re-initialize the agreement it will fail because the remote master
has the old service principals cached. It needs to be restarted to work.

ticket 1077
2011-05-26 09:48:54 -04:00