Commit Graph

1155 Commits

Author SHA1 Message Date
Petr Viktorin
993c1c8557 update_managed_permissions: Pass around anonymous ACI rather than its blacklist
It turns out the ACI object of the anonymous read ACI, rather than just the
list of its attributes, will be useful in the future.
Change the plugin so that the ACI object is passed around.

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-05-26 12:12:35 +02:00
Petr Viktorin
86f943ca18 Replace "replica admins read access" ACI with a permission
Add a 'Read Replication Agreements' permission to replace
the read ACI for cn=config.

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-05-21 09:57:16 +02:00
Adam Misnyovszki
fa7057b727 Trust add datetime fix
Fixes trust add, since now datetime object is returned
for 'modifytimestamp', which cannot be split like a string.

Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
2014-05-06 19:14:45 +03:00
Thorsten Scherf
3f3c8eee24 Fixed typo how to create an example gpg key
Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
2014-05-06 13:20:17 +02:00
Petr Viktorin
d893b77fb6 Add several managed read permissions under cn=etc
This adds permissions to:
- cn=masters,cn=ipa (with new privilege)
- cn=dna,cn=ipa (authenticated users)
- cn=ca_renewal,cn=ipa (authenticated users)
- cn=CAcert,cn=ipa (anonymous)
- cn=replication (authenticated users)
- cn=ad (authenticated users)

Part of the work for: https://fedorahosted.org/freeipa/ticket/3566

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-24 14:36:41 +02:00
Petr Viktorin
af3a4adc46 Add support for non-plugin default permissions
Add support for managed permissions that are not tied to an object
class and thus can't be defined in an Object plugin.

A dict is added to hold templates for the non-plugin permissions.

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-24 14:36:41 +02:00
Jan Cholasta
8b6dc819d5 Support API version-specific RPC marshalling.
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-04-18 14:59:20 +02:00
Petr Viktorin
81b0e7466d Do not ask for memberindirect when updating managed permissions
One of the default_attributes of permission is memberofindirect,
a virtual attribute manufactured by ldap2, which is set when a permission
is part of a role.
When update_entry is called on an entry with memberofindirect,
ipaldap tries to add the attribute to LDAP and fails with an objectclass
violation.

Do not ask for memberindirect when retrieving the entry.

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-17 10:04:16 +02:00
Jan Cholasta
50c7f3b236 Fix update_ca_renewal_master plugin on CA-less installs.
This also fixes updates from ancient versions of IPA which did not have
automatic CA subsystem certificate renewal.

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-10 16:40:10 +02:00
Petr Viktorin
41607774bc Add mechanism for adding default permissions to privileges
Part of the work for: https://fedorahosted.org/freeipa/ticket/3566

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-10 14:49:16 +02:00
Petr Viktorin
c58d6b2689 Allow overriding all attributes of default permissions
Allow overriding ipapermtarget, ipapermtargetfilter, ipapermlocation,
objectclass of default managed permissions.
This allows defining permissions that are not tied to an object type.
Default values are same as before.

Also, do not reset ipapermbindruletype when updating an existing
managed permission.

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-09 13:40:42 +02:00
Petr Viktorin
fb2f0ae8d5 Document the managed permission updater operation
The method was explained on the [Design] page, but as the updater
is extended the design page would become obsolete.
Document the operation in the docstring of the plugin itself.

Design: http://www.freeipa.org/page/V3/Managed_Read_permissions#Default_Permission_Updater
Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-09 13:40:42 +02:00
Jan Cholasta
915cd6942c Fix upload of CA certificate to LDAP in CA-less install.
https://fedorahosted.org/freeipa/ticket/4300

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-04-08 14:04:40 +02:00
Jan Cholasta
0497d163d9 Remove unused method is_master of CAInstance.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:56 +01:00
Jan Cholasta
fd5ef28bf2 Use the same certmonger configuration for both CA masters and clones.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
fac6bf30b6 Merge restart_httpd functionality to renew_ra_cert.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
2c466b79e8 Merge restart_pkicad functionality to renew_ca_cert and remove restart_pkicad.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
b5d082ec4d Make the default dogtag-ipa-ca-renew-agent behavior depend on CA setup.
On CA masters, a certificate is requested and stored to LDAP. On CA clones,
the certificate is retrieved from LDAP.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
c3169add3b Store information about which CA server is master for renewals in LDAP.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
6a19738a45 Use dogtag-ipa-ca-renew-agent to track certificates on master CA.
Before, dogtag-ipa-renew-agent was used to track the certificates and the
certificates were stored to LDAP in renew_ca_cert and renew_ra_cert. Since
dogtag-ipa-ca-renew-agent can store the certificates itself, the storage code
was removed from renew_ca_cert and renew_ra_cert.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
babddaaee8 Use dogtag-ipa-ca-renew-agent to retrieve renewed certificates from LDAP.
Before, this was done by dogtag-ipa-retrieve-agent-submit.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:55 +01:00
Jan Cholasta
57f0be7b5d Use certmonger D-Bus API to configure certmonger in CA install.
Before, certmonger was configured by modifying its internal database directly.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
def727ce56 Show progress when enabling SSL in DS in ipa-server-install output.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
51caf48ed9 Remove unused method export_ca_cert of dsinstance.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
9b3055ca41 Upload CA certificate from DS NSS database in CA-less server install.
Before, the file provided in the --root-ca-file option was used directly for
the upload. However, it is the same file which is imported to the NSS
database, so the second code path is not necessary.

Also removed now unused upload_ca_dercert method of dsinstance.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
48539b35d7 Use LDAP API to upload CA certificate instead of ldapmodify command.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
fea7163e87 Move CACERT definition to a single place.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Jan Cholasta
4c761108e8 Fix certificate renewal scripts to work with separate CA DS instance.
https://fedorahosted.org/freeipa/ticket/3805

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-25 16:54:54 +01:00
Petr Viktorin
f4de4a2aa7 Add Object metadata and update plugin for managed permissions
The default read permission is added for Netgroup as an example.

Part of the work for: https://fedorahosted.org/freeipa/ticket/3566
Design: http://www.freeipa.org/page/V3/Managed_Read_permissions
Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-03-25 14:18:12 +01:00
Petr Viktorin
7c9fa8fad9 ipaserver.install.service: Fix estimated time display
Use basic math rather than timezone conversion to get
minutes and seconds.
Break out the message generation into a small tested function.

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

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2014-03-13 18:15:43 +01:00
Alexander Bokovoy
6195870e82 ipaserver/dcerpc: make sure to always return unicode SID of the trust domain
Trusted domain SID could be obtained through different means. When it is
fetched from the AD DC via LDAP, it needs to be extracted from a default
context and explicitly converted to unicode.

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-03-12 18:16:52 +01:00
Petr Vobornik
723166aebe Support OTP in form based auth
OTP requires to use kerberos FAST channel. Ccache with ticket obtained using ipa.keytab is used as an armor.

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

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-03-12 17:29:28 +01:00
Martin Kosek
0be66e9a67 ipa-replica-install never checks for 7389 port
When creating replica from a Dogtag 9 based IPA server, the port 7389
which is required for the installation is never checked by
ipa-replica-conncheck even though it knows that it is being installed
from the Dogtag 9 based FreeIPA. If the 7389 port would be blocked by
firewall, installation would stuck with no hint to user.

Make sure that the port configuration parsed from replica info file
is used consistently in the installers.

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

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-03-11 17:10:28 +01:00
Alexander Bokovoy
e99fa380af adtrustinstance: make sure to stop and disable winbind in uninstall()
Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-02-28 09:50:14 +01:00
Alexander Bokovoy
3a7ba6013f ipaserver/dcerpc: catch the case of insuffient permissions when establishing trust
We attempt to delete the trust that might exist already. If there are not enough
privileges to do so, we wouldn't be able to create trust at the next step and it will fail.
However, failure to create trust will be due to the name collision as we already had
the trust with the same name before. Thus, raise access denied exception here
to properly indicate wrong access level instead of returning NT_STATUS_OBJECT_NAME_COLLISION.

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

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-02-27 14:33:15 +01:00
Tomas Babej
96f87e548a trusts: Remove usage of deprecated LDAP API
Remove a reference to the old deprecated LDAP API invoked by
the usage of trust_add method.

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

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-02-27 12:54:37 +01:00
Alexander Bokovoy
090a9669d8 bindinstance: make sure zone manager is initialized in add_master_dns_records
Bind instance is configured using a short-circuited way when replica is set up.
Make sure required properties are in place for that.

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

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-02-26 12:44:56 +01:00
Jan Cholasta
792c3f9c8c Always use real entry DNs for memberOf in ldap2.
https://fedorahosted.org/freeipa/ticket/4192

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-02-24 14:30:23 +01:00
Petr Spacek
dd55e13aa9 Clarify error message about missing DNS component in ipa-replica-prepare.
https://fedorahosted.org/freeipa/ticket/4188

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-02-21 16:04:20 +01:00
Nathaniel McCallum
49038cda9f Add OTP last token plugin
This plugin prevents the deletion or deactivation of the last
valid token for a user. This prevents the user from migrating
back to single factor authentication once OTP has been enabled.

Thanks to Mark Reynolds for helping me with this patch.

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-02-21 10:26:02 +01:00
Nathaniel McCallum
abb63ed9d1 Add HOTP support
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2014-02-21 10:26:02 +01:00
Petr Viktorin
894b70a164 ipa tool: Print the name of the server we are connecting to with -v
The logging level for these messages was decreaed so that they
do not show up in ipa-advise output.
Reset the log level to INFO and configure ipa-advise to not display
INFO messages from xmlclient by default.

Partially reverts commit efe5a96725

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

Reviewed-By: Tomáš Babej <tbabej@redhat.com>
2014-02-05 15:35:36 +01:00
Petr Spacek
c919363538 Remove working directory for bind-dyndb-ldap plugin.
The working directory will be provided directly
by bind-dyndb-ldap package.

This partially reverts commit 689382dc83.

https://fedorahosted.org/freeipa/ticket/3967
2014-01-27 16:04:33 +01:00
Jan Cholasta
c2bd6f365d Convert remaining frontend code to LDAPEntry API. 2014-01-24 20:38:15 +01:00
Jan Cholasta
97c1c95f20 Convert remaining update code to LDAPEntry API. 2014-01-24 20:29:31 +01:00
Jan Cholasta
08051f1651 Convert remaining installer code to LDAPEntry API. 2014-01-24 20:29:31 +01:00
Petr Viktorin
6bdc75ea24 Implement XML introspection
https://fedorahosted.org/freeipa/ticket/2937
2014-01-14 13:41:19 +01:00
Petr Viktorin
6a2b70946f rpcserver: Consolidate __call__ in xmlclient and jsonclient_kerb
The two classes had very similar __call__ methods, but the JSON
server lacked error handling.

Create a common class for the __call__ method.

https://fedorahosted.org/freeipa/ticket/4069
2013-12-10 17:36:32 +01:00
Martin Kosek
b7f1531262 httpd should destroy all CCACHEs
Use "kdestroy -A" command to destroy all CCACHEs, both the primary
and the non-primary ones to make sure that the non-primary ones are
not used later.

https://fedorahosted.org/freeipa/ticket/4084
2014-01-22 17:00:46 +01:00
Martin Kosek
f49c26db2c Switch httpd to use default CCACHE
Stock httpd no longer uses systemd EnvironmentFile option which is
making FreeIPA's KRB5CCNAME setting ineffective. This can lead in hard
to debug problems during subsequent ipa-server-install's where HTTP
may use a stale CCACHE in the default kernel keyring CCACHE.

Avoid forcing custom CCACHE and switch to system one, just make sure
that it is properly cleaned by kdestroy run as "apache" user during
FreeIPA server installation process.

https://fedorahosted.org/freeipa/ticket/4084
2014-01-22 10:14:05 +01:00
Alexander Bokovoy
531ede2904 ipa-adtrust-install: configure host netbios name by default
Ensure we set host netbios name by default in smb.conf

https://fedorahosted.org/freeipa/ticket/4116
2014-01-20 10:35:03 +01:00
Petr Spacek
79fa073411 Treat error during write to /etc/resolv.conf as non-fatal.
https://fedorahosted.org/freeipa/ticket/4110
2014-01-16 17:04:40 +01:00
Jan Cholasta
7ce3320996 Do not start the service in stopped_service if it was not running before.
This fixes a possible NSS database corruption in renew_ca_cert.
2014-01-15 17:44:10 +01:00
Alexander Bokovoy
cb411ff94e ipaserver/install/installutils: clean up properly after yield
When a context to which we yield generates exception, the code in
private_ccache() and stopped_service() didn't get called for cleanup.
2014-01-15 17:44:10 +01:00
Ana Krivokapic
689382dc83 Enable Retro Changelog and Content Synchronization DS plugins
Enable Retro Changelog and Content Synchronization DS plugins which are required
for SyncRepl support.

Create a working directory /var/named/ipa required by bind-dyndb-ldap v4+.

https://fedorahosted.org/freeipa/ticket/3967
2014-01-14 16:37:56 +01:00
Jan Cholasta
f7128b9c03 Use raw LDAP data in ldapupdate.
https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:40 +01:00
Jan Cholasta
d6c3d3f57a Store old entry state in dict rather than LDAPEntry.
https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:39 +01:00
Jan Cholasta
4284a8349b Remove legacy LDAPEntry properties data and orig_data.
https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:39 +01:00
Jan Cholasta
61887ac392 Add LDAPEntry method generate_modlist.
Use LDAPEntry.generate_modlist instead of LDAPClient._generate_modlist and
remove LDAPClient._generate_modlist.

https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:39 +01:00
Jan Cholasta
9d4bcb63de Reduce amount of LDAPEntry.reset_modlist calls in ldapupdate.
https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:39 +01:00
Jan Cholasta
21fab665f4 Use LDAPClient.update_entry for LDAP mods in ldapupdate.
Remove legacy IPAdmin methods generateModList and updateEntry.

https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:41:39 +01:00
Jan Cholasta
7b3d9be388 Rename LDAPEntry method commit to reset_modlist.
https://fedorahosted.org/freeipa/ticket/3488
2014-01-10 14:38:29 +01:00
Jan Cholasta
911f5e9eb7 PKI service restart after CA renewal failed
Fix both the service restart procedure and registration of old
pki-cad well known service name.

This patch was adapted from original patch of Jan Cholasta 178 to
fix ticket 4092.

https://fedorahosted.org/freeipa/ticket/4092
2014-01-08 09:47:23 +01:00
Xiao-Long Chen
5e96fbc22a Use /usr/bin/python2
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

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

Updated by pviktori@redhat.com
2014-01-03 09:46:05 +01:00
Jan Cholasta
bc3f3381c6 Convert remaining backend code to LDAPEntry API. 2013-12-16 14:44:19 +01:00
Martin Kosek
9677308caa Allow kernel keyring CCACHE when supported
Server and client installer should allow kernel keyring ccache when
supported.

https://fedorahosted.org/freeipa/ticket/4013
2013-12-09 12:21:22 +01:00
Alexander Bokovoy
32df84f04b subdomains: Use AD admin credentials when trust is being established
When AD administrator credentials passed, they stored in realm_passwd,
not realm_password in the options.

When passing credentials to ipaserver.dcerpc.fetch_domains(), make sure
to normalize them.

Additionally, force Samba auth module to use NTLMSSP in case we have
credentials because at the point when trust is established, KDC is not
yet ready to issue tickets to a service in the other realm due to
MS-PAC information caching effects. The logic is a bit fuzzy because
credentials code makes decisions on what to use based on the smb.conf
parameters and Python bindings to set parameters to smb.conf make it so
that auth module believes these parameters were overidden by the user
through the command line and ignore some of options. We have to do calls
in the right order to force NTLMSSP use instead of Kerberos.

Fixes https://fedorahosted.org/freeipa/ticket/4046
2013-11-29 13:13:55 +01:00
Jan Cholasta
4050e553c3 Remove unused method get_api of the ldap2 plugin.
https://fedorahosted.org/freeipa/ticket/3971
2013-11-27 13:46:42 +01:00
Jan Cholasta
97445b2df3 Refactor indirect membership processing.
A single LDAP search is now used instead of one search per member.

https://fedorahosted.org/freeipa/ticket/3971
2013-11-27 13:46:42 +01:00
Jan Cholasta
a9bf18ab95 Support searches with paged results control in LDAPClient.
https://fedorahosted.org/freeipa/ticket/3971
2013-11-27 13:46:41 +01:00
Jan Cholasta
73df6150e5 Move IPA specific code from LDAPClient to the ldap2 plugin.
https://fedorahosted.org/freeipa/ticket/3971
2013-11-27 13:46:41 +01:00
Petr Viktorin
73b8047b22 Add server/protocol type to rpcserver logs
Add the server class name, such as [xmlserver] or [jsonserver_kerb] to
the server logs. This will allow easier debugging of problems specific
to a protocol or server class.
2013-11-26 16:59:59 +01:00
Petr Viktorin
6839d8334e Make jsonserver_kerb start a cookie-based session
Part of the work for: https://fedorahosted.org/freeipa/ticket/3299
2013-11-26 16:59:59 +01:00
Petr Viktorin
1e836d2d0c Switch client to JSON-RPC
Modify ipalib.rpc to support JSON-RPC in addition to XML-RPC.
This is done by subclassing and extending xmlrpclib, because
our existing code relies on xmlrpclib internals.

The URI to use is given in the new jsonrpc_uri env variable. When
it is not given, it is generated from xmlrpc_uri by replacing
/xml with /json.

The rpc_json_uri env variable existed before, but was unused,
undocumented and not set the install scripts.
This patch removes it in favor of jsonrpc_uri (for consistency
with xmlrpc_uri).

Add the rpc_protocol env variable to control the protocol
IPA uses. rpc_protocol defaults to 'jsonrpc', but may be changed
to 'xmlrpc'.
Make backend.Executioner and tests use the backend specified by
rpc_protocol.

For compatibility with unwrap_xml, decoding JSON now gives tuples
instead of lists.

Design: http://freeipa.org/page/V3/JSON-RPC
Ticket: https://fedorahosted.org/freeipa/ticket/3299
2013-11-26 16:59:59 +01:00
Tomas Babej
d361e12ae5 trusts: Always stop and disable smb service on uninstall
https://fedorahosted.org/freeipa/ticket/4042
2013-11-26 15:23:42 +01:00
Jan Cholasta
f20577ddc4 Remove mod_ssl port workaround.
https://fedorahosted.org/freeipa/ticket/4021
2013-11-26 12:58:17 +01:00
Petr Viktorin
ec1585f831 Add formerly update-only schema
Some schema was only delivered in updates. Add it back as ldif files.

https://fedorahosted.org/freeipa/ticket/3454
2013-11-18 16:54:21 +01:00
Petr Viktorin
6381d766ce Remove schema special-casing from the LDAP updater
Now that there's a dedicated schema updater, we do not need the code
in ldapupdate.

https://fedorahosted.org/freeipa/ticket/3454
2013-11-18 16:54:21 +01:00
Petr Viktorin
f52d471aa7 Add schema updater based on IPA schema files
The new updater is run as part of `ipa-ldap-updater --upgrade`
and `ipa-ldap-updater --schema` (--schema is a new option).
The --schema-file option to ipa-ldap-updater may be used (multiple
times) to select a non-default set of schema files to update against.

The updater adds an X-ORIGIN tag with the current IPA version to
all elements it adds or modifies.

https://fedorahosted.org/freeipa/ticket/3454
2013-11-18 16:54:21 +01:00
Petr Viktorin
9e79d2bc5e dsinstance: Move the list of schema filenames to a constant
Preparation for: https://fedorahosted.org/freeipa/ticket/3454
2013-11-18 16:54:21 +01:00
Petr Viktorin
070868f435 ldapupdate: Factor out connection code
The connection code will be the same for both the LDAP updater
and the new schema updater.

Preparation for: https://fedorahosted.org/freeipa/ticket/3454
2013-11-18 16:54:21 +01:00
Ana Krivokapic
eaaf7ed0f2 Use EXTERNAL auth mechanism in ldapmodify
Default to using the EXTERNAL authorization mechanism in calls to ldapmodify

https://fedorahosted.org/freeipa/ticket/3895
2013-11-14 15:01:05 +01:00
Alexander Bokovoy
3693b8e51a Map NT_STATUS_INVALID_PARAMETER to most likely error cause: clock skew
When we get NT_STATUS_INVALID_PARAMETER in response to establish
DCE RPC pipe with Kerberos, the most likely reason is clock skew.
Suggest that it is so in the error message.

https://fedorahosted.org/freeipa/ticket/4024
2013-11-13 12:28:48 +01:00
Ana Krivokapic
f9a8a30b27 Fix regression which prevents creating a winsync agreement
A regression, which prevented creation of a winsync agreement,
was introduced in the original fix for ticket #3989.

https://fedorahosted.org/freeipa/ticket/3989
2013-11-13 08:14:41 +01:00
Martin Kosek
b4ee7da8e9 Server does not detect different server and IPA domain
Server installer does not properly recognize a situation when server
fqdn is not in a subdomain of the IPA domain, but shares the same
suffix.

For example, if server FQDN is ipa-idm.example.com and domain
is idm.example.com, server's FQDN is not in the main domain, but
installer does not recognize that. proper Kerberos realm-domain
mapping is not created in this case and server does not work
(httpd reports gssapi errors).

https://fedorahosted.org/freeipa/ticket/4012
2013-11-11 09:27:12 +01:00
Jan Cholasta
df5f4ee81d Turn LDAPEntry.single_value into a dictionary-like property.
This change makes single_value consistent with the raw property.

https://fedorahosted.org/freeipa/ticket/3521
2013-11-05 13:56:55 +01:00
Tomas Babej
00c0878b90 ipatests: Use command -v instead of which in legacy client advice
Part of: https://fedorahosted.org/freeipa/ticket/3833
2013-11-01 15:39:52 +01:00
Jan Cholasta
a7180ed021 Remove legacy toDict and origDataDict methods of LDAPEntry.
https://fedorahosted.org/freeipa/ticket/3521
2013-10-31 18:09:51 +01:00
Tomas Babej
57ccee4eae advice: Add legacy client configuration script using nss-ldap
Part of: https://fedorahosted.org/freeipa/ticket/3833
2013-10-31 09:22:34 +01:00
Jan Cholasta
e98abdca9b Track DS certificate with certmonger on replicas.
https://fedorahosted.org/freeipa/ticket/3975
2013-10-29 15:31:16 +01:00
Martin Kosek
4bed0de60d Remove mod_ssl conflict
Since mod_nss-1.0.8-24, mod_nss and mod_ssl can co-exist on one
machine (of course, when listening to different ports).

To make sure that mod_ssl is not configured to listen on 443
(default mod_ssl configuration), add a check to the installer checking
of either mod_nss or mod_ssl was configured to listen on that port.

https://fedorahosted.org/freeipa/ticket/3974
2013-10-25 15:35:39 +02:00
Martin Kosek
0880d030ae Make set_directive and get_directive more strict
When set_directive was used for directive "foo" and the word "foo"
was detected anywhere on the line (e.g. in a comment, or in an example),
it was overwritten which may potentially lead to wrong line being
overwritten.

Only match the directives on the beginning of the lines, it is safer.

https://fedorahosted.org/freeipa/ticket/3974
2013-10-25 15:35:39 +02:00
Ana Krivokapic
9a368b6358 Make sure nsds5ReplicaStripAttrs is set on agreements
Add nsds5ReplicaStripAttrs to the agreement LDAP entry before the agreement
is created.

https://fedorahosted.org/freeipa/ticket/3989
2013-10-25 14:58:39 +02:00
Ana Krivokapic
92cd987e0a Add ipa-advise plugins for nss-pam-ldapd legacy clients
Add three new ipa-advise plugins, to facilitate configuration of
legacy clients using nss-pam-ldapd:

* config-redhat-nss-pam-ldapd
* config-generic-linux-nss-pam-ldapd
* config-freebsd-nss-pam-ldapd

https://fedorahosted.org/freeipa/ticket/3672
2013-10-18 16:15:12 +02:00
Tomas Babej
ed3d184a7d adtrustinstance: Move attribute definitions from setup to init method
Majority of the attributes set in the setup method can be set in the
__init__ method where they are actually defined (and set to None).

This is true for attributes that hold constant values and for
attributes that have their values derived from api.env dictionary.

Creates a new __setup_default_attributes method, that is called
from within __init__ and setup (in case the passed values for
hostname or domain do not correspond to that what is set in api.env,
doing otherwise could cause unexpected behaviour).

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Tomas Babej
d769b124b0 adtrustinstance: Properly handle uninstall of AD trust instance
The uninstall method of the AD trust instance was not called upon
at all in the ipa-server-install --uninstall phase.

This patch makes sure that AD trust instance is unconfigured when
the server is uninstalled.

The following steps are undertaken:
  * Remove /var/run/samba/krb5cc_samba
  * Remove our keys from /etc/samba/samba.keytab using ipa-rmkeytab
  * Remove /var/lib/samba/*.tdb files

Additionally, we make sure winbind service is stopped from within the
stop() method.

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Tomas Babej
4a95a50596 ipa-upgradeconfig: Remove backed up smb.conf
Since we are not able to properly restore the Samba server to the
working state after running ipa-adtrust-install, we should not keep
the smb.conf in the fstore.

This patch makes sure that any backed up smb.conf is removed from
the backup and that this file is not backed up anymore.

Part of: https://fedorahosted.org/freeipa/ticket/3479
2013-10-14 11:11:17 +02:00
Martin Kosek
524a1a8567 Use consistent realm name in cainstance and dsinstance
The installers used custom self.realm_name instead of standard
self.realm defined in Service class. It caused crashes in some cases
when Service class methods expected the self.realm to be filled.

https://fedorahosted.org/freeipa/ticket/3854
2013-10-11 10:08:21 +02:00
Martin Kosek
dbfa7157cc PKI installation on replica failing due to missing proxy conf
Proxy configuration was not detected correctly. Both
ipa-pki-proxy.conf and ipa.conf need to be in place and httpd
restarted to be able to check it's status.

https://fedorahosted.org/freeipa/ticket/3964
2013-10-11 09:50:44 +02:00
Martin Kosek
cb9331ebfc Remove --no-serial-autoincrement
Deprecate this option and do not offer it in installation tools.
Without this option enabled, advanced DNS features like DNSSEC
would not work.

https://fedorahosted.org/freeipa/ticket/3962
2013-10-11 09:47:59 +02:00
Petr Viktorin
c813b8fbd3 Do not fail upgrade if the global anonymous read ACI is not found
This helps forward compatibility: the anon ACI is scheduled for removal.

https://fedorahosted.org/freeipa/ticket/3956
2013-10-04 15:41:56 +02:00
Jan Cholasta
194556beb0 Allow PKCS#12 files with empty password in install tools.
https://fedorahosted.org/freeipa/ticket/3897
2013-10-04 10:27:23 +02:00
Jan Cholasta
c123264ac7 Read passwords from stdin when importing PKCS#12 files with pk12util.
This works around pk12util refusing to use empty password files, which prevents
the use of PKCS#12 files with empty password.

https://fedorahosted.org/freeipa/ticket/3897
2013-10-04 10:27:23 +02:00
Alexander Bokovoy
f734988e24 trust: integrate subdomains support into trust-add 2013-10-04 10:25:31 +02:00
Alexander Bokovoy
a87813bf42 ipaserver/dcerpc: remove use of trust account authentication
Since FreeIPA KDC supports adding MS-PAC to HTTP/ipa.server principal,
it is possible to use it when talking to the trusted AD DC.

Remove support for authenticating as trust account because it should not
really be used other than within Samba.
2013-10-04 10:25:31 +02:00
Alexander Bokovoy
0b29bfde0d trusts: support subdomains in a forest
Add IPA CLI to manage trust domains.

ipa trust-fetch-domains <trust>      -- fetch list of subdomains from AD side and add new ones to IPA
ipa trustdomain-find <trust>         -- show all available domains
ipa trustdomain-del <trust> <domain> -- remove domain from IPA view about <trust>
ipa trustdomain-enable <trust> <domain> -- allow users from trusted domain to access resources in IPA
ipa trustdomain-disable <trust> <domain> -- disable access to resources in IPA from trusted domain

By default all discovered trust domains are allowed to access IPA resources

IPA KDC needs also information for authentication paths to subdomains in case they
are not hierarchical under AD forest trust root. This information is managed via capaths
section in krb5.conf. SSSD should be able to generate it once
ticket https://fedorahosted.org/sssd/ticket/2093 is resolved.

part of https://fedorahosted.org/freeipa/ticket/3909
2013-10-04 10:25:31 +02:00
Alexander Bokovoy
0637f590ed ipaserver/dcerpc.py: populate forest trust information using realmdomains
Use realmdomains information to prepopulate forest trust info. As result,
all additional domains should now be enabled from the beginning, unless they
really conflict with existing DNS domains on AD side.

https://fedorahosted.org/freeipa/ticket/3919
2013-10-04 10:25:31 +02:00
Martin Kosek
88759cf7b6 Use FQDN when creating MSDCS SRV records
When IPA server hostname is outside of default DNS domain, instead
of relative domain name, FQDN should be used.

https://fedorahosted.org/freeipa/ticket/3908
2013-10-03 14:14:07 +02:00
Alexander Bokovoy
9cf8ec79c9 ipa-sam: do not modify objectclass when trust object already created
When trust is established, last step done by IPA framework is to set
encryption types associated with the trust. This operation fails due
to ipa-sam attempting to modify object classes in trust object entry
which is not allowed by ACI.

Additionally, wrong handle was used by dcerpc.py code when executing
SetInformationTrustedDomain() against IPA smbd which prevented even to
reach the point where ipa-sam would be asked to modify the trust object.
2013-09-20 09:59:02 +02:00
Ana Krivokapic
15cc9740c0 Do not show unexpected error in ipa-ldap-updater
Prevent showing of unfriendly "Unexpected error" message, when providing
incorrect DM password to ipa-ldap-updater.

https://fedorahosted.org/freeipa/ticket/3825
2013-09-16 12:35:36 +02:00
Jan Cholasta
e380acdc1c Fix nsslapdPlugin object class after initial replication.
This is a workaround for <https://fedorahosted.org/389/ticket/47490>.

https://fedorahosted.org/freeipa/ticket/3915
2013-09-10 09:49:43 +02:00
Petr Viktorin
85b974d1bc Remove __all__ specifications in ipaclient and ipaserver.install
The __all__ list does not cause submodules to be imported, e.g.
one would still have to `import ipaclient.ipachangeconf` rather than
just `import ipaclient` to use `ipaclient.ipachangeconf`.

Even if they did do anything, the lists were incomplete, and (since
`import *` is not used on these modules) unnecessary.

Pylint 1.0 reports undeclared names in __all__ as a warning.
2013-09-06 15:42:33 +02:00
Ana Krivokapic
de7b1f86dc Create DS user and group during ipa-restore
ipa-restore would fail if DS user did not exist. Check for presence of DS
user and group and create them if needed.

https://fedorahosted.org/freeipa/ticket/3856
2013-09-02 16:28:37 +02:00
Tomas Babej
a3d489443c Log proper error message when defaultNamingContext not found 2013-08-29 14:05:20 +02:00
Jan Cholasta
3c9261699a Fix ipa-server-certinstall usage string.
https://fedorahosted.org/freeipa/ticket/3869
2013-08-28 10:20:42 +02:00
Jan Cholasta
fc8f0ae3ad Add --dirman-password option to ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3869
2013-08-28 10:20:41 +02:00
Jan Cholasta
5a8e326aeb Fix nsSaslMapping object class before configuring SASL mappings.
This is a workaround for <https://fedorahosted.org/389/ticket/47490>.

https://fedorahosted.org/freeipa/ticket/3778
2013-08-27 18:43:20 +02:00
Tomas Babej
ab6a6e27d8 Make CS.cfg edits with CA instance stopped
This patch makes sure that all edits to CS.cfg configuration file
are performed while pki-tomcatd service is stopped.

Introduces a new contextmanager stopped_service for handling
a general problem of performing a task that needs certain service
being stopped.

https://fedorahosted.org/freeipa/ticket/3804
2013-08-26 16:21:36 +02:00
Tomas Babej
6961cf2e77 Perform dirsrv tuning at platform level
When configuring the 389 Directory Server instance, we tune it
so that number of file descriptors available to the DS is increased
from the default 1024 to 8192.

There are platform specific steps that need to be conducted
differently on systemd compatible platforms and sysV compatible
platforms.

systemd: set LimitNOFILE to 8192 in /etc/sysconfig/dirsrv.systemd
sysV: set ulimit -n 8192 in /etc/sysconfig/dirsrv
      set ulimit - nofile 8192 in /etc/security/limits.conf

https://fedorahosted.org/freeipa/ticket/3823
2013-08-26 13:07:17 +02:00
Petr Vobornik
34342b9a97 Show human-readable error name in error dialog title
Fixes RPC server's JSON encoding of exception's name.

It allows to show the name in Web UI's error dialog title.
2013-08-26 13:05:36 +02:00
Tomas Babej
edf92f7650 Remove redundant shebangs
Remove redundant shebangs from files that are not used as scripts.

https://fedorahosted.org/freeipa/ticket/3853
2013-08-26 13:03:32 +02:00
Ana Krivokapic
c318213250 Fix broken replica installation
Make sure the subject base parameter is correctly passed and used during the
creation of the DS instance on a replica.

https://fedorahosted.org/freeipa/ticket/3868
2013-08-20 16:36:13 +02:00
Jan Cholasta
78cf94a52c Ask for PKCS#12 password interactively in ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Jan Cholasta
02be7acd15 Add --pin option to ipa-server-certinstall.
Hide the unnecessary --dirsrv_pin and --http_pin options.

https://fedorahosted.org/freeipa/ticket/3869
2013-08-20 16:18:59 +02:00
Jan Cholasta
1669253238 Untrack old and track new cert with certmonger in ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Jan Cholasta
f2c3ae36f9 Replace only the cert instead of the whole NSS DB in ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Jan Cholasta
809123ab02 Ignore empty mod error when updating DS SSL config in ipa-server-certinstall.
https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Jan Cholasta
59c4aba883 Remove unused NSSDatabase and CertDB method find_root_cert_from_pkcs12.
https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Jan Cholasta
2b08168df4 Port ipa-server-certinstall to the admintool framework.
Change the log file path from /var/log/ipa/default.log to admintool's default
path.

https://fedorahosted.org/freeipa/ticket/3641
2013-08-20 16:18:59 +02:00
Martin Kosek
b9ec4d1a67 Prevent *.pyo and *.pyc multilib problems
Differences in the python byte code fails in a build validation
(rpmdiff) done on difference architecture of the same package.

This patch:
 1) Ensures that timestamps of generated *.pyo and *.pyc files match
 2) Python integer literals greater or equal 2^32 and lower than 2^64
    are converted to long right away to prevent different type of
    the integer on architectures with different size of int

https://fedorahosted.org/freeipa/ticket/3858
2013-08-13 15:31:46 +02:00
Tomas Babej
69394bab5a Remove support for IPA deployments with no persistent search
Drops the code from ipa-server-install, ipa-dns-install and the
BindInstance itself. Also changed ipa-upgradeconfig script so
that it does not set zone_refresh to 0 on upgrades, as the option
is deprecated.

https://fedorahosted.org/freeipa/ticket/3632
2013-08-09 12:14:42 +02:00
Ana Krivokapic
da2605c942 Handle --subject option in ipa-server-install
Properly handle --subject option of ipa-server-install, making sure this
value gets passed to certmap.conf. Introduce a new template variable
$SUBJECT_BASE for this purpose.

Also make sure that this value is preserved on upgrades.

https://fedorahosted.org/freeipa/ticket/3783
2013-08-08 16:52:48 +02:00
Ana Krivokapic
efe5a96725 Enable running API commands in ipa-advise plugins
https://fedorahosted.org/freeipa/ticket/3671
https://fedorahosted.org/freeipa/ticket/3672
2013-08-07 09:18:43 +02:00
Ana Krivokapic
fc3f3c90b9 Add ipa-advise plugins for legacy clients
Old versions of SSSD do not directly support cross-realm trusts between IPA
and AD. This patch introduces plugins for the ipa-advise tool, which should
help with configuring an old version of SSSD (1.5-1.8) to gain access to
resources in trusted domain.

Since the configuration steps differ depending on whether the platform includes
the authconfig tool, two plugins are needed:

* config-redhat-sssd-before-1-9 - provides configuration for Red Hat based
  systems, as these system include the autconfig utility
* config-generic-sssd-before-1-9 - provides configuration for other platforms

https://fedorahosted.org/freeipa/ticket/3671
https://fedorahosted.org/freeipa/ticket/3672
2013-08-07 09:18:42 +02:00
Alexander Bokovoy
7ae58f0ca9 Rename slapi-nis configuration variable 2013-08-06 16:31:09 +02:00
Tomas Babej
453d88f886 Wrap lines in the list of available advices
Now the list of available advices is neatly formatted:

-------------------------
List of available advices
-------------------------
    config-fedora-authconfig : Authconfig instructions for configuring Fedora
                               18/19 client with IPA server without use of SSSD.

The advice header printing has been reformatted to conform with the changes.
2013-08-06 15:54:48 +02:00
Tomas Babej
d4bf153d64 Add a word wrapping for comment log messages to AdviceLogger
The comments logged through AdviceLogger are now wrapped up to 70
characters. This change has been documented in the docstrings.
2013-08-06 15:54:47 +02:00
Tomas Babej
8c8da71ea3 Remove overlapping use-cases of the same result variable 2013-08-06 13:44:32 +02:00
Tomas Babej
8122d74596 Use case-insensitive dict for trusted domain info
In DomainValidator, we store a dictionary containing information
for trusted domains. This is a case-sensitive dictionary keyed by
the domain name.

We need to use case-insensitive dictionary since domain names
are generally case-insensitive.

https://fedorahosted.org/freeipa/ticket/3816
2013-08-06 12:25:39 +02:00
Petr Viktorin
fb08402b71 Fix installutils.get_password without a TTY
If stdin is a TTY, ipaserver.install.installutils uses getpass and all
is well. Without a TTY, though, there were two problems:

* The prompt was not printed
* On end of file, an empty string was returned, which caused read_password
  to enter an infinite loop.

Fix both problems.

https://fedorahosted.org/freeipa/ticket/3824
2013-08-06 10:34:26 +02:00
Jan Cholasta
693710784b Print newline after receiving EOF in installutils.read_password. 2013-07-24 10:00:03 +02:00
Jan Cholasta
ab2debd1ea Ask for PKCS#12 password interactively in ipa-replica-prepare.
https://fedorahosted.org/freeipa/ticket/3717
2013-07-24 10:00:03 +02:00
Alexander Bokovoy
7b5cc3ed83 ipaserver/dcerpc: attempt to resolve SIDs through SSSD first
Attempt to resolve SIDs through SSSD first to avoid using trust
account password. This makes possible to run HBAC test requests
without being in 'trusted admins' group.

https://fedorahosted.org/freeipa/ticket/3803
2013-07-23 16:24:38 +03:00
Tomas Babej
17c7d46c25 Use AD LDAP probing to create trusted domain ID range
When creating a trusted domain ID range, probe AD DC to get
information about ID space leveraged by POSIX users already
defined in AD, and create an ID range with according parameters.

For more details:
http://www.freeipa.org/page/V3/Use_posix_attributes_defined_in_AD
https://fedorahosted.org/freeipa/ticket/3649
2013-07-23 16:24:33 +03:00
Alexander Bokovoy
e95a7b1b8d ipa-adtrust-install: configure compatibility tree to serve trusted domain users
Enables  support  for  trusted  domains  users  for old clients through Schema
Compatibility plugin.  SSSD supports trusted domains natively starting with
version 1.9 platform. For platforms that lack SSSD or run older SSSD version
one needs  to  use  this  option.  When  enabled, slapi-nis  package  needs  to
be  installed  and schema-compat-plugin will be configured to provide lookup of
users and groups from trusted domains via SSSD on IPA server. These users and
groups will be available under  cn=users,cn=compat,$SUFFIX  and
cn=groups,cn=compat,$SUFFIX trees.  SSSD will normalize names of users and
groups to lower case.

In  addition  to  providing  these users and groups through the compat tree,
this option enables authentication over LDAP for trusted domain users with DN
under compat tree, i.e. using bind DN uid=administrator@ad.domain,cn=users,cn=compat,$SUFFIX.

This authentication  is related to  PAM  stack  using  'system-auth' PAM
service. If you have disabled HBAC rule 'allow_all', then make sure there is
special service called 'system-auth' created and HBAC rule to allow access to
anyone to this rule on IPA masters is added. Please note that system-auth PAM
service is  not used directly by any other application, therefore it is safe to
create one specifically to support trusted domain users via compatibility path.

https://fedorahosted.org/freeipa/ticket/3567
2013-07-18 17:56:30 +02:00
Ana Krivokapic
f637d05a18 Properly handle non-existent cert files
https://fedorahosted.org/freeipa/ticket/3785
2013-07-18 13:37:40 +02:00
Rob Crittenden
240b12169b Hide sensitive attributes in LDAP updater logging and output
The LDAP updater prints the initial and final states of an entry, as well
as details on the changes made to attributes. This has the potential to
expose sensitive values so exclude those from logging.

https://fedorahosted.org/freeipa/ticket/3782
2013-07-18 10:49:43 +03:00
Tomas Babej
c81849712f Provide ipa-advise tool
Provides a pluggable framework for generating configuration
scriptlets and instructions for various machine setups and use
cases.

Creates a new ipa-advise command, available to root user
on the IPA server.

Also provides an example configuration plugin,
config-fedora-authconfig.

https://fedorahosted.org/freeipa/ticket/3670
2013-07-17 13:49:59 +02:00
Tomas Babej
7a105604e2 Change group ownership of CRL publish directory
Spec file modified so that /var/lib/ipa/pki-ca/publish/ is no
longer owned by created with package installation. The directory
is rather created/removed with the CA instance itself.

This ensures proper creation/removeal, group ownership
and SELinux context.

https://fedorahosted.org/freeipa/ticket/3727
2013-07-16 12:17:40 +02:00
Rob Crittenden
689399fce9 Return the correct Content-type on negotiated XML-RPC requests.
https://fedorahosted.org/freeipa/ticket/3745
2013-07-15 15:36:46 +02:00
Ana Krivokapic
c1e9b6fa1d Make sure replication works after DM password is changed
Replica information file contains the file `cacert.p12` which is protected by
the Directory Manager password of the initial IPA server installation. The DM
password of the initial installation is also used for the PKI admin user
password.

If the DM password is changed after the IPA server installation, the replication
fails.

To prevent this failure, add the following steps to ipa-replica-prepare:
1. Regenerate the `cacert.p12` file and protect it with the current DM password
2. Update the password of the PKI admin user with the current DM password

https://fedorahosted.org/freeipa/ticket/3594
2013-07-11 12:39:29 +03:00
Nathaniel McCallum
4bbbc11029 Permit reads to ipatokenRadiusProxyUser objects
This fixes an outstanding permissions issue from the OTP work.

https://fedorahosted.org/freeipa/ticket/3693
2013-07-11 12:39:27 +03:00
Jan Cholasta
30c06f7573 Use LDAP modify operation directly to add/remove group members.
This prevents getting full member list from LDAP and putting it back later.

https://fedorahosted.org/freeipa/ticket/3706
2013-07-11 12:39:26 +03:00
Jan Cholasta
ab96ca7831 Check trust chain length in CA-less install.
https://fedorahosted.org/freeipa/ticket/3707
2013-07-11 12:39:25 +03:00
Ana Krivokapic
30e7579780 Fix bug in adtrustinstance
Incorrect tuple unpacking in adtrustinstance was causing ipa-adtrust-install
to fail when IPA was installed with no DNS.

https://fedorahosted.org/freeipa/ticket/3746
2013-07-09 11:44:38 -04:00
Jan Cholasta
ea7db35b62 Enable SASL mapping fallback.
Assign a default priority of 10 to our SASL mappings.

https://fedorahosted.org/freeipa/ticket/3330
2013-06-27 17:06:51 +02:00
Petr Vobornik
f5bc155f56 Create Firefox configuration extension on CA-less install
Create:
* kerberosauth.xpi
* krb.js

even when --http_pkcs12 option is used.

https://fedorahosted.org/freeipa/ticket/3747
2013-06-27 16:01:52 +02:00
Ana Krivokapic
2775dec3be Do not display traceback to user
Logging tracebacks at the INFO level caused them to be displayed to user on the
command line. Change the log level to DEBUG, so that tracebacks are not visible
to user.

https://fedorahosted.org/freeipa/ticket/3704
2013-06-24 14:23:09 +02:00
Ana Krivokapic
e5117bd995 Fail when adding a trust with a different range
When adding a trust, if an id range already exists for this trust,
and options --base-id/--range-size are provided with the trust-add command,
trust-add should fail.

https://fedorahosted.org/freeipa/ticket/3635
2013-06-24 14:20:01 +02:00
Jan Cholasta
e201305743 Do not track DS certificate in CA-less setup.
https://fedorahosted.org/freeipa/ticket/3675
2013-06-12 12:59:54 +02:00
Jan Cholasta
2ccadf4726 Skip empty lines when parsing pk12util output. 2013-06-12 12:59:54 +02:00
Jan Cholasta
1e772b1845 Handle exceptions gracefully when verifying PKCS#12 files.
https://fedorahosted.org/freeipa/ticket/3667
2013-06-12 12:59:54 +02:00
Petr Viktorin
e8e88ed208 Flush stream after writing service messages
sys.stdout is buffered by default if redirected to a file.
This may causes automated installation to appear hung.
Flush the stream so that messages are written immediately.
2013-06-11 14:40:29 +02:00
Tomas Babej
11c0f0517f Add update plugin to fill in ipaRangeType attribute
Previously, we deduced the range type from the range objectclass
and filled in virtual attribute in post_callback phase.

Having a ipaRangeType attributeType in schema, we need to fill
the attribute values to ranges created in previous IPA versions.

The plugin follows the same approach, setting ipa-local or
ipa-ad-trust value to the ipaRangeType attribute according
to the objectclass of the range.

Part of https://fedorahosted.org/freeipa/ticket/3647
2013-06-10 12:27:34 +03:00
Tomas Babej
b2c378dcc8 Manage ipa-otpd.socket by IPA
Adds a new simple service called OtpdInstance, that manages
ipa-otpd.socket service. Added to server/replica installer
and ipa-upgradeconfig script.

https://fedorahosted.org/freeipa/ticket/3680
2013-06-06 18:16:59 +02:00
Tomas Babej
6f51f92138 Use private ccache in ipa install tools
All installers that handle Kerberos auth, have been altered to use
private ccache, that is ipa-server-install, ipa-dns-install,
ipa-replica-install, ipa-ca-install.

https://fedorahosted.org/freeipa/ticket/3666
2013-06-05 12:27:45 +02:00
Petr Viktorin
34ba1b7060 Remove code to install Dogtag 9
Since we depend on Dogtag 10 now, there is no need to keep code
that installs a Dogtag 9 CA.

Support for upgraded Dogtag-9-style instances is left in.

https://fedorahosted.org/freeipa/ticket/3529
2013-05-31 10:26:07 +02:00
Tomas Babej
7310395047 Support multiple local domain ranges with RID base set
In ip-adtrust-install, "adding RID bases" step would fail
if there was more than one local range defined. This can be a
common case if e.g. there are users that migrated from previous
IdM solution.

With this patch, we fail only if there are multiple local ranges
that do not have RID bases set.

Keep in mind that overlap checking is ensured by ipa-range-check
DS plugin.

https://fedorahosted.org/freeipa/ticket/3498
2013-05-30 12:35:21 +02:00
Martin Kosek
2d3301ceb7 Avoid exporting KRB5_KTNAME in dirsrv env
The variable is already defined, exporting in dirsrv systemd
environment is not needed and produces a (benign) error.
2013-05-24 14:36:43 +02:00
Nathaniel McCallum
cb68935435 Add IPA OTP schema and ACLs
This commit adds schema support for two factor authentication via
OTP devices, including RADIUS or TOTP. This schema will be used
by future patches which will enable two factor authentication
directly.

https://fedorahosted.org/freeipa/ticket/3365
http://freeipa.org/page/V3/OTP
2013-05-17 09:30:51 +02:00
Martin Kosek
ba89635679 Set KRB5CCNAME so that dirsrv can work with newer krb5-server
The DIR ccache format is now the default in krb5-server 1.11.2-4
but /run/user/<uid> isn't created for Apache by anything so it
has no ccache (and it doesn't have SELinux permissions to write here
either).

Use KRB5CCNAME to set a file path instead in /etc/sysconfig/dirsrv.

https://fedorahosted.org/freeipa/ticket/3628
2013-05-14 17:01:03 -04:00
Martin Kosek
8667d169da Fix ipa-ca DNS name creation
Previous fix (6d06a7e) did not work properly on a CA-less replica
with CA-powered master.

https://fedorahosted.org/freeipa/ticket/3617
2013-05-09 14:16:51 -04:00
Martin Kosek
6368a60730 Do not add ipa-ca records on CA-less installs
ipa-dns-install crashed when it was run on a CA-less server.

https://fedorahosted.org/freeipa/ticket/3617
2013-05-09 15:13:33 +02:00
Rob Crittenden
13cef6cac4 Set KRB5CCNAME so httpd s4u2proxy can with with newer krb5-server
The DIR ccache format is now the default in krb5-server 1.11.2-4
but /run/user/<uid> isn't created for Apache by anything so it
has no ccache (and it doesn't have SELinux permissions to write here
either).

Use KRB5CCNAME to set a file path instead in /etc/sysconfig/httpd.

https://fedorahosted.org/freeipa/ticket/3607
2013-05-09 09:15:47 +02:00
Rob Crittenden
be8c9ec9f2 Specify the location for the agent PKCS#12 file so we don't have to move it.
Dogtag 10.0.2 changed the default location for this file from /root/.pki
to /root/.dogtag which broke our install.

https://fedorahosted.org/freeipa/ticket/3599
2013-05-06 13:37:23 +02:00
Rob Crittenden
6e2c3a45a1 Handle a 501 in cert-find from dogtag as a "not supported"
Upgrading from d9 -> d10 does not set up the RESTful interface
in dogtag, they just never coded it. Rather than trying to backport
things they have decided to not support upgrades.

We need to catch this and report a more reasonable error. They are
returning a 501 (HTTP method unimplemented) in this case.

https://fedorahosted.org/freeipa/ticket/3549
2013-05-03 16:05:49 -04:00
Jan Cholasta
252de46ebf Fix normalization of FQDNs in DNS installer code.
https://fedorahosted.org/freeipa/ticket/3600
2013-05-03 18:05:50 +02:00
Rob Crittenden
bd89e49ed7 Handle socket.gethostbyaddr() exceptions when verifying hostnames.
Log any socket exceptions raised and let the process continue. This
failure isn't a show-stopper. Other checks past this will catch any
other problems.

This was seen when /etc/hosts and /etc/resolv.conf were both empty.

https://fedorahosted.org/freeipa/ticket/3581
2013-04-24 15:28:57 +02:00
Jan Cholasta
63e79a3d86 Add ipa-ca records for existing CA masters when installing DNS for the first time.
https://fedorahosted.org/freeipa/ticket/3564
2013-04-24 14:36:28 +02:00
Jan Cholasta
014f296274 Add DNS records for existing masters when installing DNS for the first time.
https://fedorahosted.org/freeipa/ticket/3564
2013-04-24 14:36:28 +02:00
Jan Cholasta
692fe7cbf7 Use correct zone when removing DNS records of a master.
https://fedorahosted.org/freeipa/ticket/3563
2013-04-18 08:05:17 +02:00
Tomas Babej
fe3ba33d26 Update only selected attributes for winsync agreement
Trying to insert nsDS5ReplicatedAttributeListTotal and
nsds5ReplicaStripAttrs to winsync agreements caused upgrade errors.
With this patch, these attributes are skipped for winsync agreements.

Made find_ipa_replication_agreements() in replication.py more
corresponding to find_replication_agreements. It returns list of
entries instead of unicode strings now.

https://fedorahosted.org/freeipa/ticket/3522
2013-04-16 10:05:43 -04:00
Petr Viktorin
e736e75ce9 Drop --selfsign server functionality
Design: http://freeipa.org/page/V3/Drop_selfsign_functionality
Ticket: https://fedorahosted.org/freeipa/ticket/3494
2013-04-15 16:56:12 -04:00
Petr Viktorin
006ab23c6d Remove obsolete self-sign references from man pages, docstrings, comments
Part of the work for https://fedorahosted.org/freeipa/ticket/3494
2013-04-15 16:56:06 -04:00
Petr Viktorin
4e3c1051d0 Uninstall selfsign CA on upgrade
This will convert a master with a selfsign CA to a CA-less one in
ipa-upgradeconfig.
The relevant files are left in place and can be used to manage certs
manually.

Part of the work for: https://fedorahosted.org/freeipa/ticket/3494
2013-04-15 16:55:27 -04:00
Jan Cholasta
f684c6d6f8 Use A/AAAA records instead of CNAME records in ipa-ca.
https://fedorahosted.org/freeipa/ticket/3547
2013-04-15 21:12:36 +02:00
Tomas Babej
75f0801324 Add nfs:NONE to default PAC types only when needed
We need to add nfs:NONE as a default PAC type only if there's no
other default PAC type for nfs. Adds a update plugin which
determines whether default PAC type for nfs is set and adds
nfs:NONE PAC type accordingly.

https://fedorahosted.org/freeipa/ticket/3555
2013-04-15 14:46:21 +02:00
Rob Crittenden
8377f4e92f Apply LDAP update files in blocks of 10, as originally designed.
In order to have control over the order that updates are applied
a numbering system was created for the update files. These values
were not actually used.

The updates were sorted by DN length and in most cases this was
adequate for proper function. The exception was with roles where
in some cases a role was added as a member of a permission before
the role itself was added so the memberOf value was never created.

Now updates are computed and applied in blocks of 10.

https://fedorahosted.org/freeipa/ticket/3377
2013-04-12 10:16:01 -04:00
Rob Crittenden
c8694cb19f Full system backup and restore
This will allow one to backup and restore the IPA files and data. This
does not cover individual entry restoration.

http://freeipa.org/page/V3/Backup_and_Restore

https://fedorahosted.org/freeipa/ticket/3128
2013-04-12 09:59:17 -04:00
Jan Cholasta
b25080bbca Use only one URL for OCSP and CRL in IPA certificate profile.
https://fedorahosted.org/freeipa/ticket/3552
2013-04-11 13:50:35 +02:00
Petr Viktorin
1bc892c02d Load the CA cert into server NSS databases
The CA cert was not loaded, so if it was missing from the PKCS#12 file,
installation would fail.
Pass the cert filename to the server installers and include it in
the NSS DB.

Part of the work for: https://fedorahosted.org/freeipa/ticket/3363
2013-04-02 15:28:50 +02:00
Petr Viktorin
03a2c66eda Support installing with custom SSL certs, without a CA
Design: http://freeipa.org/page/V3/CA-less_install
https://fedorahosted.org/freeipa/ticket/3363
2013-04-02 15:28:50 +02:00
Petr Viktorin
a03aba5704 dsinstance, httpinstance: Don't hardcode 'Server-Cert' 2013-04-02 15:28:50 +02:00
Petr Viktorin
ac06a28cf9 Trust CAs from PKCS#12 files even if they don't have Friendly Names
Instead of trusting all certificates with friendly names,
now all certs without a "u" flag are trusted as root certs.
2013-04-02 15:28:50 +02:00
Petr Viktorin
1e86378d49 ipaserver.install.certs: Introduce NSSDatabase as a more generic certutil wrapper
The CertDB class was meant to be a wrapper around NSS databases,
certutil, pk12util, etc. Unfortunately, over time it grew too
dependent on the particular scenarios it is used in.
Introduce a new class that has no knowledge about IPA configuration,
and move generic code to it.

In the future, generic code should be moved to NSSDatabase, code
for the self-signed CA should be removed, and IPA-specific code may
stay in CertDB (which calls NSSDatabase).
2013-04-02 15:28:50 +02:00
Alexander Bokovoy
cf8c532ca9 Enhance ipa-adtrust-install for domains with multiple IPA server
As described on http://www.freeipa.org/page/V3/MultipleTrustServers,
notice if FreeIPA server is a replica and adtrust agents contains members
corresponding to the cifs/ services from replication partners.

Only these servers will be advertised as SMB domain controllers

https://fedorahosted.org/freeipa/ticket/2189
2013-04-02 12:36:03 +02:00
Martin Kosek
57d5042d28 Normalize RA agent certificate
Certificate parsed out of sslget request to pki-ca was not always
properly formatted and it may still contain DOS line ending. Make
sure that the certificate is printed with correct line ending.
2013-03-29 09:00:22 +01:00
Tomas Babej
2f0c7d6e23 Add logging to join command
The following is mentioned in the log now:
  - existence of host entry (if it already does exist)
  - missing krbprincipalname and its new value (if there was no
    principal name set)

https://fedorahosted.org/freeipa/ticket/3481
2013-03-25 10:58:23 +01:00
Martin Kosek
b5b040e68f Configure ipa_dns DS plugin on install and upgrade
The plugin is configured unconditionally (i.e. does not check if
IPA was configured with DNS) as the plugin is needed on all
replicas to prevent objectclass violations due to missing SOA
serial in idnsZone objectclass. The violation could happen if just
one replica configured DNS and added a new zone.

https://fedorahosted.org/freeipa/ticket/3347
2013-03-22 14:31:22 +01:00
Martin Kosek
ca6f7f2450 Update named.conf parser
Refactor the named.conf parsing and editing functions in bindinstance
so that both "dynamic-db" and "options" sections of named.conf can
be read and updated

https://fedorahosted.org/freeipa/ticket/3429
2013-03-14 10:50:24 -04:00