Commit Graph

6238 Commits

Author SHA1 Message Date
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
Jan Cholasta
6b55623526 Remove stray error condition in ipa-server-install. 2013-06-12 12:59:54 +02:00
Jan Cholasta
cf84376928 Use the correct PKCS#12 file for HTTP server.
https://fedorahosted.org/freeipa/ticket/3665
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
f8de527d83 PEP8 fixes in idrange.py 2013-06-10 12:27:34 +03:00
Tomas Babej
d2b943f08b Extend idrange commands to support new range origin types
Following values of ipaRangeType attribute are supported
and translated accordingly in the idrange commands:

 'ipa-local': 'local domain range'
 'ipa-ad-winsync': 'Active Directory winsync range'
 'ipa-ad-trust': 'Active Directory domain range'
 'ipa-ad-trust-posix': 'Active Directory trust range with
                        POSIX attributes'
 'ipa-ipa-trust': 'IPA trust range'

Part of https://fedorahosted.org/freeipa/ticket/3647
2013-06-10 12:27:34 +03: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
ddb3957011 Add ipaRangeType attribute to LDAP Schema
This adds a new LDAP attribute ipaRangeType with
OID 2.16.840.1.113730.3.8.11.41 to the LDAP Schema.

ObjectClass ipaIDrange has been altered to require
ipaRangeType attribute.

Part of https://fedorahosted.org/freeipa/ticket/3647
2013-06-10 12:27:33 +03:00
Sumit Bose
9a83009d33 Fix type of printf argument 2013-06-10 10:56:59 +02:00
Ana Krivokapic
86cc18931f Prevent error when running IPA commands with su/sudo
https://fedorahosted.org/freeipa/ticket/3685
2013-06-07 13:10:45 +02: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
bcf8ab24d5 Do not check userPassword with 7-bit plugin
Default list of attributes that are checked with 7-bit plugin
for being 7-bit clean includes userPassword. Consecutively, one
is unable to set passwords that contain non-ascii characters.

https://fedorahosted.org/freeipa/ticket/3640
2013-06-06 18:12:50 +02:00
Martin Kosek
adc57707c0 Remove redundant u'' character
One Python's unicode marking character was being printed by RPC plugin
which then appeared in ipa-client-install output. This patch removes
it.
2013-06-06 08:36:04 +02:00
Petr Vobornik
fae658f505 Fix regression: missing facet tab group labels
Currently there is only empty space between facet tabs and facet title.

It's a regression caused by recent refactoring.

https://fedorahosted.org/freeipa/ticket/3688
2013-06-05 14:51:45 +02:00
Tomas Babej
e87c21ade2 Incorporate interactive prompts in idrange-add
In idrange-add command, ensure that RID base is prompted for
in the interactive mode if domain SID or domain name was
specified.

If domain name nor SID was specified, make sure rid base is
prompted for if secondary rid base was specified and vice versa.

https://fedorahosted.org/freeipa/ticket/3602
2013-06-05 12:50:29 +02:00
Tomas Babej
89ffaf411d Add prompt_param method to avoid code duplication
Extracted common code from ipalib/plugins/cli.py and
ipalib/plugins/dns.py that provided way to prompt user
for the value of specific attribute.

Added prompt_param method to Command class in ipalib/frontend.py

Done as part of https://fedorahosted.org/freeipa/ticket/3602
2013-06-05 12:50:29 +02:00
Tomas Babej
8984e3e105 Remove redundant check for env.interactive
Fixed as part of
https://fedorahosted.org/freeipa/ticket/3602
2013-06-05 12:50:29 +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 Vobornik
e31eea3268 Make ssbrowser.html work in IE 10
Manual configuration page for other browsers (ssbrowser.html) doesn't work in IE 10 - error page is displayed.

This patch is conditioning creation of Firefox configuration object so that configure.jar is requested only in Firefox. IE doesn't request it and so it does not fail.

https://fedorahosted.org/freeipa/ticket/3645
2013-06-04 12:24:13 +02:00
Sumit Bose
f497aafdca Fix format string typo 2013-06-03 15:41:24 +02:00
Diane Trout
517e475f61 Fix log format not a string literal.
This was to resolve a -Werror=format-security error.

  ipa_extdom_extop.c: In function 'ipa_extdom_extop':
  ipa_extdom_extop.c:144:9: error: format not a string literal and no format
arguments [-Werror=format-security]
2013-06-03 09:57:24 +02:00
Petr Vobornik
ec41744e76 Regression fix: missing control buttons in nested search facets
Regression introduced by 6e90920233 - 'Move spec modifications from facet factories to pre_ops'.

https://fedorahosted.org/freeipa/ticket/3605
2013-06-03 09:23:24 +02:00
Ana Krivokapic
b1321e95d7 Deprecate options --dom-sid and --dom-name in idrange-mod
https://fedorahosted.org/freeipa/ticket/3636
2013-05-31 14:21:12 +02:00
Tomas Babej
c9370c4a8e Do not allow removal of ID range of an active trust
When removing an ID range using idrange-del command, validation
in pre_callback ensures that the range does not belong to any
active trust. In such case, ValidationError is raised.

Unit tests to cover the functionality has been added.

https://fedorahosted.org/freeipa/ticket/3615
2013-05-31 10:55:34 +02:00
Ana Krivokapic
64738ba94e Ignore files generated by build 2013-05-31 10:50:58 +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
Alexander Bokovoy
b21abc76ca Fix cldap parser to work with a single equality filter (NtVer=...)
https://fedorahosted.org/freeipa/ticket/3639
2013-05-30 12:39:45 +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
Tomas Babej
0b5c0286ed Do not translate trust type and direction with --raw in trust_show and trust-find
In trust_show command, make sure that --raw flag is honoured.
Attributes ipanttrusttype and ipanttrustdirection are no longer
translated to strings from their raw ldap values when --raw is
used.

https://fedorahosted.org/freeipa/ticket/3525
2013-05-29 10:11:27 +02:00
Simo Sorce
1e224c2ea0 CLDAP: Return empty reply on non-fatal errors
Windows DCs return an empty reply when a legal request cannot satisfied.
If we get EINVAL or ENOENT it means the information requested could not be
found or input parameters were bogus.
Always return an empty reply in these cases.

On any other internal error just return, the request may have been legit but we
can't really handle it right now, pretend we never saw it and hope the next
attempt will succeed.

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

Signed-off-by: Simo Sorce <simo@redhat.com>
2013-05-28 16:01:52 +02:00
Simo Sorce
b402b6d553 CLDAP: Fix domain handling in netlogon requests
1. Stop using getdomainname() as it is often not properly initialized
2. The code using getdomainname() was not working anyway it was trying to
look at the function call output in hostname which is always empty at that
point.
3. Always check the requested domain matches our own, we cannot reply to
anything else anyway.

Pre-requisite to fix: https://fedorahosted.org/freeipa/ticket/3639

Signed-off-by: Simo Sorce <simo@redhat.com>
2013-05-28 16:01:52 +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
Martin Kosek
0f646d7ac5 Handle DIR type CCACHEs in test_cmdline properly
Pass a whole krbV.CCache object to ldap2 connect() method so that
it can properly detect both type and name of a CCAHE. Otherwise
the test fails on systems with default DIR type CCACHE.
2013-05-22 14:09:31 +02:00
Petr Viktorin
50a04e5ace Relax getkeytab test to allow additional messages on stderr
https://fedorahosted.org/freeipa/ticket/3633
2013-05-22 14:09:26 +02:00
Petr Spacek
9fbdf9f51f ipa-client-install: Add 'debug' and 'show' statements to nsupdate commands
https://fedorahosted.org/freeipa/ticket/3629
2013-05-22 12:29:47 +02:00
Petr Vobornik
89be148580 Web UI: move ./_base/metadata_provider.js to ./metadata.js
Metadata provider is IPA specific object, not a framework object, so it should not be in _base directory.

https://fedorahosted.org/freeipa/ticket/3604
2013-05-17 12:32:24 +02:00
Petr Vobornik
17caa5dd5a Unite and move facet pre_ops to related modules
Facet pre_ops defined in ./facet module were moved to modules where facet are actually defined. Moved pre_ops were united with the ones defined for the facets in these modules.

The move simplifies module dependencies - there is no reason to have general facet module dependent on specialized facet modules.

Pre_ops uniting makes the code simpler.

https://fedorahosted.org/freeipa/ticket/3605
2013-05-17 12:32:16 +02:00
Petr Vobornik
6e90920233 Move spec modifications from facet factories to pre_ops
Spec modifications in factories makes inheritance and extensibility more difficult.

Moving them to pre_ops allows modification of their output by other pre_ops.

https://fedorahosted.org/freeipa/ticket/3605
2013-05-17 12:32:06 +02:00
Ana Krivokapic
8d07054e1b Do not display success message on failure in web UI
https://fedorahosted.org/freeipa/ticket/3591
2013-05-17 12:31:14 +02:00
Nathaniel McCallum
5b58348cd3 Add OTP support to ipa-pwd-extop
During LDAP bind, this now plugin determines if a user is enabled
for OTP authentication. If so, then the OTP is validated in addition
to the password. This allows 2FA during user binds.

    https://fedorahosted.org/freeipa/ticket/3367
    http://freeipa.org/page/V3/OTP
2013-05-17 09:30:51 +02:00
Nathaniel McCallum
1e1bab4edc Remove unnecessary prefixes from ipa-pwd-extop files 2013-05-17 09:30:51 +02:00
Nathaniel McCallum
203754691c Add the krb5/FreeIPA RADIUS companion daemon
This daemon listens for RADIUS packets on a well known
UNIX domain socket. When a packet is received, it queries
LDAP to see if the user is configured for RADIUS authentication.
If so, then the packet is forwarded to the 3rd party RADIUS server.
Otherwise, a bind is attempted against the LDAP server.

https://fedorahosted.org/freeipa/ticket/3366
http://freeipa.org/page/V3/OTP
2013-05-17 09:30:51 +02:00
Nathaniel McCallum
5d51ae50a5 ipa-kdb: Add OTP support
If OTP is enabled for a user, then:
  1. Long-term keys are not provided to KDB
  2. The user string 'otp' is defined to KDB

Since it is not secure to send radius configuration information
over krb5 user strings, we simply set the string to a known default
('[]') which enables the default configuration in the KDC.

https://fedorahosted.org/freeipa/ticket/3561
http://freeipa.org/page/V3/OTP
2013-05-17 09:30:51 +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
Nathaniel McCallum
bc26d87b34 Add ipaUserAuthType and ipaUserAuthTypeClass
This schema addition will be useful for future commits. It allows us to
define permitted external authentication methods on both the user and
global config. The implementation is generic, but the immediate usage
is for otp support.

https://fedorahosted.org/freeipa/ticket/3365
http://freeipa.org/page/V3/OTP
2013-05-17 09:30:51 +02:00
Ana Krivokapic
c5bfeb1ed0 Prompt for nameserver IP address in dnszone-add
Prompt for nameserver IP address in interactive mode of dnszone-add.

Add a corresponding field to dnszone creation dialog in the web UI.

This parameter is required if and only if:
* New zone is a forward zone
* Nameserver is defined inside the new zone

Add a new unit test to cover this functionality.

https://fedorahosted.org/freeipa/ticket/3603
2013-05-16 11:01:33 +02:00
Tomas Babej
78774916c8 Remove redundancy from hbactest help text
I modified the SID in the second example so that result corresponds
with the 5. example.

https://fedorahosted.org/freeipa/ticket/3625
2013-05-15 18:18:13 +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
Petr Viktorin
8897b51814 Remove leading zero from IPA_NUM_VERSION
The numeric IPA_NUM_VERSION contained a leading zero, so it was treated
as octal value in Python code instead of decimal.

https://fedorahosted.org/freeipa/ticket/3622
2013-05-14 18:49:05 +02:00
Petr Vobornik
2ba3140aff Fix: HBAC Test tab is missing
Caused by typo in metadata provider source path.

No metadata -> no HBAC test entity -> no tab

https://fedorahosted.org/freeipa/ticket/3627
2013-05-14 18:43:54 +02:00