Commit Graph

4671 Commits

Author SHA1 Message Date
Jan Cholasta
9b6649a1ce Move the nsupdate functionality to separate function in ipa-client-install.
Done as part of adding SSH support.

https://fedorahosted.org/freeipa/ticket/1634
2012-02-13 22:21:38 -05:00
Jan Cholasta
04b8575c52 Add API initialization to ipa-client-install.
This change makes it possible to call IPA commands from ipa-client-install.

Done to support adding SSH host keys to DNS.

https://fedorahosted.org/freeipa/ticket/1634
2012-02-13 22:21:35 -05:00
Jan Cholasta
3c2b0fc28a Add support for SSH public keys to user and host objects.
This patch adds a new multivalue param "sshpubkey" for specifying SSH public
keys to both user and host objects. The accepted value is base64-encoded
public key blob as specified in RFC4253, section 6.6.

Additionaly, host commands automatically update DNS SSHFP records when
requested by user.

https://fedorahosted.org/freeipa/ticket/754
2012-02-13 22:21:27 -05:00
Jan Cholasta
9b6baf9bee Add LDAP ACIs for SSH public key schema.
https://fedorahosted.org/freeipa/ticket/754
2012-02-13 22:20:23 -05:00
Jan Cholasta
63ea0a304e Add LDAP schema for SSH public keys.
https://fedorahosted.org/freeipa/ticket/754
2012-02-13 22:20:18 -05:00
Petr Viktorin
528a94f839 Internationalization for HBAC and ipalib.output
* hbacrule: Internationalize HBAC rule "all" category exceptions
  https://fedorahosted.org/freeipa/ticket/2267

* hbactest: Use internationalized names (doc) instead of names
  for output items
  Also don't convert result to bool, `not` does it implicitly

* ipalib.output: Internationalize descriptions of some standard entries
2012-02-14 19:08:40 +01:00
Petr Voborník
2755709f2e Removed question marks from field labels
In user group adder dialog, the "Is this a POSIX group?" was replaced with "POSIX group".
In host search facet, the "Enrolled?" was replaced with "Enrolled".

https://fedorahosted.org/freeipa/ticket/2353
2012-02-14 08:35:49 -06:00
Petr Vobornik
7e02cb8aec Fixed entity link disabling
Problem:
Entity link (eg: to hosts in dns record or to dns record in host) is not changing its state when linked record doesn't exist. The link can remain wrongly enabled from previous state.

Fixed:
The link is disabled when target doesn't exist.

https://fedorahosted.org/freeipa/ticket/2364
2012-02-14 08:35:41 -06:00
Martin Kosek
8aa63d0171 Add Petr Viktorín to Contributors.txt 2012-02-10 11:57:53 +01:00
Petr Viktorin
90d99f6017 Clean up i18n strings
This patch switches to named ("%(name)s") instead of positional ("%s")
substitutions for internationalized strings, so translators can
reorder the words.
This fixes https://fedorahosted.org/freeipa/ticket/2179 (xgettext no
longer gives warnings).

Also, some i18n calls are rewritten to translate the template before
substitutions, not after.
2012-02-10 11:53:40 +01:00
Endi S. Dewata
eba3a341e6 Fixed ipa.js for sessions.
The patch fixes a problem in error_handler_login() when it gets
an error other than 401.

The login_url is not needed for fixtures because it does not need
authentication.

The patch also fixes jslint warnings and formatting issues.
2012-02-09 13:21:12 -06:00
John Dennis
bba4ccb3a0 add session manager and cache krb auth
This patch adds a session manager and support for caching
authentication in the session. Major elements of the patch are:

* Add a session manager to support cookie based sessions which
  stores session data in a memcached entry.

* Add ipalib/krb_utils.py which contains functions to parse ccache
  names, format principals, format KRB timestamps, and a KRB_CCache
  class which reads ccache entry and allows one to extract information
  such as the principal, credentials, credential timestamps, etc.

* Move krb constants defined in ipalib/rpc.py to ipa_krb_utils.py so
  that all kerberos items are co-located.

* Modify javascript in ipa.js so that the IPA.command() RPC call
  checks for authentication needed error response and if it receives
  it sends a GET request to /ipa/login URL to refresh credentials.

* Add session_auth_duration config item to constants.py, used to
  configure how long a session remains valid.

* Add parse_time_duration utility to ipalib/util.py. Used to parse the
  session_auth_duration config item.

* Update the default.conf.5 man page to document session_auth_duration
  config item (also added documentation for log_manager config items
  which had been inadvertantly omitted from a previous commit).

* Add SessionError object to ipalib/errors.py

* Move Kerberos protection in Apache config from /ipa to /ipa/xml and
  /ipa/login

* Add SessionCCache class to session.py to manage temporary Kerberos
  ccache file in effect for the duration of an RPC command.

* Adds a krblogin plugin used to implement the /ipa/login
  handler. login handler sets the session expiration time, currently
  60 minutes or the expiration of the TGT, whichever is shorter. It
  also copies the ccache provied by mod_auth_kerb into the session
  data.  The json handler will later extract and validate the ccache
  belonging to the session.

* Refactored the WSGI handlers so that json and xlmrpc could have
  independent behavior, this also moves where create and destroy
  context occurs, now done in the individual handler rather than the
  parent class.

* The json handler now looks up the session data, validates the ccache
  bound to the session, if it's expired replies with authenicated
  needed error.

* Add documentation to session.py. Fully documents the entire process,
  got questions, read the doc.

* Add exclusions to make-lint as needed.
2012-02-09 13:20:45 -06:00
John Dennis
d1e0c1b606 Add ipa_memcached service
* Adds ipa_memcached SystemV initscript

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

* Adds ipa_memcached config file

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

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

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

* Modifies ipa-server-install to install ipa_memcached
2012-02-09 13:20:28 -06:00
Alexander Bokovoy
af187713e7 Adopt to python-ldap 2.4.6 by removing unused references which are not available in python-ldap anymore 2012-02-08 20:13:21 -05:00
Alexander Bokovoy
8bba212c80 Handle upgrade issues with systemd in Fedora 16 and above
Since 389-ds-base-1.2.10-0.8.a7 Directory Server's systemd settings are
configured via /etc/sysconfig/dirsrv.systemd. It means logic change in
systemd/fedora16 platform of FreeIPA.

Additionally, existing installs need to be handled during upgrade.

Fixes:
    https://fedorahosted.org/freeipa/ticket/2117
    https://fedorahosted.org/freeipa/ticket/2300
2012-02-08 20:11:20 -05:00
Alexander Bokovoy
2978e72e6a Add management of inifiles to allow manipulation of systemd units
inifile_replace_variables() works similar to config_replace_variables() but
allows to apply changes to specific section of an inifile. Inifiles are
commonly used by freedesktop.org software and particularly used by systemd.

When modifying inifile, all changes will be applied to specific section.

Also fixes corner case in config_replace_variables() which would dublicate
variables when adding them.
2012-02-08 20:08:30 -05:00
Petr Viktorin
d706c411ef Honor default home directory and login shell in user_add
The homedirectory argument had a default_from '/home/<name>', ignoring
the ipahomesrootdir config setting. This patch removes that default,
and adds a test case for ipahomesrootdir.

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

The login shell had the same problem. Again this patch removes the
client-side default and adds a test.

Building the home directory from the default is changed to use
posixpath.join instead of string formatting and ad-hoc cleanup,
and to use '/home' instead of failing when the ipahomesrootdir
setting is not present for some reason.
2012-02-09 18:11:57 +01:00
Rob Crittenden
44c69ef33e Make ipaconfigstring modifiable by users.
Convert from a freeform string into a enumeration.

Only values currently allowed are AllowLMhash and AllowNThash.

To add more than one value on the command-line either specify
--ipaconfigstring multiple times or add the values comma-separated.

https://fedorahosted.org/freeipa/ticket/1433
2012-02-09 08:29:09 +01:00
Ondrej Hamada
616d543a54 Memberof attribute control and update
Checking of parameters used by _make_aci funcion was rewritten.
Additional attributes of ACI(type, attribute, memberof, targetgroup,
subtree, filter) could be unset.

Permission plugin now allows to unset memberof value.
https://fedorahosted.org/freeipa/ticket/2255

Added checking of existence of groups that are specified in permission
and delegation module.

https://fedorahosted.org/freeipa/ticket/2286
https://fedorahosted.org/freeipa/ticket/2305
2012-02-08 10:43:25 +01:00
Rob Crittenden
304b70843a Consolidate external member code into two functions in baseldap.py
External members (users and hosts) are assumed when doing member
management on certain attributes. If the member isn't in IPA it
is assumed to be external. When doing member management we need
to sift through the list of failures and pull out all those
that were simply not found in IPA.

https://fedorahosted.org/freeipa/ticket/1734
2012-02-08 09:12:53 +01:00
Adam Young
cca80c7c8c ignore generated services file. 2012-02-07 15:52:02 +01:00
Adam Young
a2cc9b4282 Remove delegation from browser config 2012-02-07 15:51:44 +01:00
Martin Kosek
13cdf51ab4 Remove unused options from ipa-managed-entries
ipa-managed-entries contain auto-generated options that are not
used in the script and may just confuse users. Remove them.

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

* Add the --help option
2012-02-07 09:56:20 +01:00
Petr Voborník
cbd77cae0a Automember UI - Fixed I18n labels
Hard-coded labels in Automember UI have been moved into internal.py to
allow translation.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-07 00:48:10 -06:00
Petr Voborník
fccea2dca4 Automember UI - default groups
In this patch was implemented and added a control for defining default automember groups.

There is a difference from UXD spec. In the spec the control was placed below table in the search facet. This was not working well with the combobox in the control. Open combobox requires some space below it. As it was placed at the bottom of the page it created unwanted blank space and forced showing scrollbars. Moving the control above the table solves the problem without rewriting combobox logic. It can be rewritten and moved down later.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-07 00:48:07 -06:00
Rob Crittenden
e6cdcad8df Require minimum SSF 56, confidentially. Also ensure minssf <= maxssf.
This ensures a correct configuration in case a user has created their
own openldap config file and set SASL_SECPROPS to something bad.

Note that this doesn't modify the 389-ds setting which by default is 0.

https://fedorahosted.org/freeipa/ticket/2021
2012-02-05 19:01:34 -05:00
Petr Viktorin
01929015e0 Switch --group and --membergroup in example for delegation
The example mistakenly showed how to allow "employees" to edit
addresses of "managers".
This fixes the example by switching the two options.

https://fedorahosted.org/freeipa/ticket/2317
2012-02-06 14:13:33 +01:00
Martin Kosek
b32d320922 Return proper DN in netgroup-add
This patch fixes netgroup unit test failures which expect the
original DN.

https://fedorahosted.org/freeipa/ticket/2069
2012-02-06 13:51:23 +01:00
Rob Crittenden
3684929270 Make submount automount maps work.
Indirect automount nesting is achieved by adding a key that references
another map. This isn't heirarchical, in fact, you can have multiple
duplicate keys all pointing at the same map, which itself is mounted
in other places. It can be a real mess if you want.

In any case, a submount map has its information set to
"-fstype=autofs <type>:<map>"

The type can be any valid automount type: file, nis, yp, ldap, etc. We
are going to hardcode ldap in when we create these using
automountmap-add-indirect. If a user wants a different type they can
create the key themselves (or edit it later).

Here is an example of creating a submount:

$ ipa automountlocation-add baltimore
$ ipa automountmap-add-indirect baltimore auto.share --mount=/share
$ ipa automountmap-add-indirect baltimore --parentmap=auto.share --mount=sub auto.sub
$ ipa automountkey-add baltimore auto.sub --key=share --info=attic:/share
$ ls /share/sub/share
builds  lost+found

This looks like:

etc/auto.master:
/-      /etc/auto.direct
/share  /etc/auto.share
---------------------------
/etc/auto.direct:
---------------------------
/etc/auto.share:
sub     -fstype=autofs ldap:auto.sub

maps not connected to /etc/auto.master:
---------------------------
/etc/auto.sub:
share   attic:/share

I've also added a catch-all when using the tofiles function. We were
missing any maps that weren't attached to auto.master. They will now
be shown along with whatever keys they have.

https://fedorahosted.org/freeipa/ticket/1268
2012-02-06 10:50:40 +01:00
Martin Kosek
d4272ce374 Add argument help to CLI
CLI command help contains a documentation for all options that can
be passed to commands. However, help strings for positional
arguments are not included.

This patch uses an OptionParser description field to list all
command arguments as OptionParser does not have a native support
to provide such information to user.

https://fedorahosted.org/freeipa/ticket/1974
2012-02-06 08:57:07 +01:00
Martin Kosek
3bd36af36e Remove debug messages
https://fedorahosted.org/freeipa/ticket/2010
https://fedorahosted.org/freeipa/ticket/2323
https://fedorahosted.org/freeipa/ticket/2228
https://fedorahosted.org/freeipa/ticket/2232
2012-02-06 08:49:31 +01:00
Martin Kosek
f2cc9c8d33 Improve password change error message
User always receives the same error message if he changes his password
via "ipa passwd" command and the new password fails configured
password policy. He then has to investigate on his own the actual
reason why was the policy violated. This patch improves our SLAPI PWD
plugins to provide a better error message explaining the violation
reason.

https://fedorahosted.org/freeipa/ticket/2067
2012-02-03 17:21:33 +01:00
Martin Kosek
cf12f3106a Fix raw format for ACI commands
ACI plugins (permission, selfservice and delegation) were not
prepared to serve ACIs in a raw format, i.e. raw "aci" attribute
taken from LDAP. This patch fixes all these plugins and their
commands to provide provide this format. Few ACI raw format unit
tests were added for all these plugins.

https://fedorahosted.org/freeipa/ticket/2010
https://fedorahosted.org/freeipa/ticket/2223
https://fedorahosted.org/freeipa/ticket/2228
https://fedorahosted.org/freeipa/ticket/2232
2012-02-03 17:04:51 +01:00
Ondrej Hamada
2e860f6d07 Fix 'no-reverse' option description
The description of 'no-reverse' option was fixed in both code and
manpages of ipa-replica-install and ipa-dns-install.

https://fedorahosted.org/freeipa/ticket/2161
2012-02-02 17:50:55 -05:00
Martin Kosek
b2239d533d Improve migration help
Improve migration help topic so that it easier understandable:
  - Add missing list of Topic commands
  - Add one more example to demonstrate migration abilities
  - Add breaks to too long lines to improve readibility

https://fedorahosted.org/freeipa/ticket/2174
2012-02-03 16:39:27 +01:00
Martin Kosek
de9a0df508 Improve dnszone-add error message
When a new DNS record is being added to DNS zone via command
  ipa dnsrecord-add ZONE @
and the target ZONE does not exist it returns ObjectclassViolation
which may confuse users. Make sure that standard DNS Zone NotFound
exception is returned.

https://fedorahosted.org/freeipa/ticket/2270
2012-02-03 16:31:00 +01:00
Martin Kosek
f411ed1e47 Add data field for A6 record
Since A6 is an obsolete RR type, no DNS part option was created.
This is, however, not consistent with the rest of per-type API
and may cause problems. This patch adds at least a DNS part for
raw A6 record data so that the record type is treated consistently.

This patch also fixes interactive mode for A6 records. Their data
were not detected correctly as dnsrecord_add didn't expect
a number in DNS part option name.

https://fedorahosted.org/freeipa/ticket/2309
2012-02-03 16:26:20 +01:00
Martin Kosek
e1fecfaf6a Add SRV record target validator
Add missing SRV record target validator to filter out possible
user errors.

https://fedorahosted.org/freeipa/ticket/2308
2012-02-03 16:25:53 +01:00
Martin Kosek
cb4b2e6fac Fix NSEC record conversion
NSEC record needs special treatment as it is not composed from
a fixed set of DNS parts divided by space, but it contains
a multivalued DNS part "types" containing a list of RR types
it covers.

There was already a special method for parsing raw NSEC record
to DNS parts, but the other direction was missing. This patch
adds special NSEC convertor to fix this issue.

https://fedorahosted.org/freeipa/ticket/2307
2012-02-03 16:25:26 +01:00
Martin Kosek
e41282fbc6 Fix TXT record parsing
TXT record validation fails to parse the record if it contains
spaces. Standard DNS part parser uses a space to divide record
parts. A special parser thus need to be implemented for this RR
type.

https://fedorahosted.org/freeipa/ticket/2306
2012-02-03 16:24:54 +01:00
Martin Kosek
2a667d94ec Improve netgroup-add error messages
These two situations in netgroup-add need to be distinguished:
 1) Netgroup cannot be added because a hostgroup with the same name
    created a colliding managed netgroup
 2) Another native netgroup with the same name exists

This patch checks the colliding netgroup and raise appropriate
error message based on this finding.

https://fedorahosted.org/freeipa/ticket/2069
2012-02-03 16:05:56 +01:00
Petr Voborník
199d6815d4 Automember UI
New UI for automember.

Implemented:
 * search facet core
 * rule details facet
 * attribute_table_widget - new base class for tables which contains multivalued attribute with special add/remove commands
 * adding/removing conditions in details facet

TODO:
 * label translations
 * UI for defining default rules

https://fedorahosted.org/freeipa/ticket/2195
2012-02-01 12:47:46 -06:00
Petr Voborník
c00267308e Navigation and redirection to various facets
In current implementation target facet of navigation(from menu) and redirection is always one exact facet per entity. There isn't a way to navigate to different facet from menu or redirect to different facets from various facets.

This patch adds:
 * possibility to define menu items which can navigate to different facets of various entities. This also means that now current menu tree can contain leafs with the same entity.
 * possibility to define redirection target per facet - it is needed to keep breadcrumb navigation consistent with various navigation tree patch leading to same entity leafs.

This functionality is needed for Automember UI. Automember UI is designed as if it was for two entities but it is in fact only one.

https://fedorahosted.org/freeipa/ticket/2195
2012-02-01 12:47:42 -06:00
Endi Sukma Dewata
b73fc6e550 Show password expiration date.
The user details page was modified to show the password expiration
date next to the existing password field.

Fixed problem resetting password in self-service mode. The JSON
interface for the passwd command requires the username to be
specified although the equivalent CLI command doesn't require it.

Ticket #2064
2012-02-01 15:51:50 +01:00
Endi Sukma Dewata
77f0e9aba5 Use fixed font when displaying certificate.
The textareas used to display certificates were modified to use
fixed font.

Ticket #2017
2012-02-01 15:51:31 +01:00
Endi Sukma Dewata
0c4500738b Hide Add/Delete buttons in self-service mode.
Users do not have add/delete permission in self-service mode, so
the search facet was modified to hide the Add/Delete buttons.

Ticket #2188
2012-02-01 15:51:21 +01:00
Endi Sukma Dewata
ea9d5e6f9a Added icons for status column.
The status formatter was modified to show enabled/disabled icon
before the status text.

The format classes were renamed to formatter to avoid confusion
with the format() method. A new parameter 'type' was added to the
formatter to determine the output type (e.g. text/html).

Ticket #1996
2012-02-01 15:51:10 +01:00
Rob Crittenden
4dfec211f7 %ghost the UI files that we install/create on the fly
https://fedorahosted.org/freeipa/ticket/1764
2012-01-31 18:38:46 +01:00
Endi Sukma Dewata
6bd2f5ba35 Fixed host managed-by adder dialog.
The host managed-by adder dialog has been fixed to use the new
--not-man-hosts option to filter out hosts that are already added.

Ticket #1675
2012-01-31 08:40:00 -06:00