Commit Graph

1801 Commits

Author SHA1 Message Date
Endi S. Dewata
09f3e9869a Fixed inconsistent required/optional attributes.
The dialogs and details pages have been modified to use the * symbol
to mark required fields. The automount map and the DNS zone dialogs
have been modified to update the required fields according to the
input type.

Ticket #1696, #1973
2011-10-25 15:11:12 +00:00
Rob Crittenden
f098b213eb Fix problems in help system
Fixes 3 issues:

- If a topic has all its commands disabled, it should be disabled
- If a command is disabled its help should be disabled
- The show-mappings help was missing a doc string so no help was displayed

https://fedorahosted.org/freeipa/ticket/1998
2011-10-20 18:25:27 -04:00
Alexander Bokovoy
c9ef39918a hbactest fails while you have svcgroup in hbacrule
https://fedorahosted.org/freeipa/ticket/1988
2011-10-20 17:23:21 -04:00
Martin Kosek
99d938152f Improve hostgroup/netgroup collision checks
When the NGP plugin is enabled, a managed netgroup is created for
every hostgroup. We already check that netgroup with the same
name does not exist and provide a meaningful error message.
However, this error message was also printed when a duplicate
hostgroup existed.

This patch checks for duplicate hostgroup existence first and
netgroup on the second place. It also makes sure that when NGP
plugin is (temporarily) disabled, a colliding netgroup cannot
be created.

https://fedorahosted.org/freeipa/ticket/1914
2011-10-17 17:09:46 +02:00
Rob Crittenden
b607c5cc5a Fix typo in invalid PTR record error message
https://fedorahosted.org/freeipa/ticket/1982
2011-10-13 22:53:39 -04:00
Martin Kosek
2aa63fe4a9 Improve handling of GIDs when migrating groups
Since IPA v2 server already contain predefined groups that may collide
with groups in migrated (IPA v1) server (for example admins, ipausers),
users having colliding group as their primary group may happen to belong
to an unknown group on new IPA v2 server.

Implement --group-overwrite-gid option to overwrite GID of already
existing groups to prevent this issue.

https://fedorahosted.org/freeipa/ticket/1866
2011-10-11 23:24:00 -04:00
Jan Cholasta
c0879cd00b Disallow deletion of global password policy.
ticket 1936
2011-10-12 10:12:49 +02:00
Alexander Bokovoy
3e1c04f933 Include indirect membership and canonicalize hosts during HBAC rules testing
When users and hosts are included into groups indirectly, make sure that
during HBAC test e fill in all indirect groups properly into an HBAC request.

Also, if hosts provided for test are not specified fully, canonicalize them
using IPA domain.

This makes possible following requests:
ipa hbactest --user foobar --srchost vm-101 --host vm-101 --service sshd

Request to evaluate:
 <user <name foobar groups [hbacusers,ipausers]>
  service <name sshd groups []>
  targethost <name vm-101.ipa.local groups []>
  srchost <name vm-101.ipa.local groups []>
 >

Fixes:
https://fedorahosted.org/freeipa/ticket/1862
https://fedorahosted.org/freeipa/ticket/1949
2011-10-10 17:09:22 -04:00
Martin Kosek
2916ad4ac2 Fix i18n in config plugin 2011-10-11 14:51:09 +02:00
Martin Kosek
88e693a1a5 Improve default user/group object class validation
When user/group default object class is being modified via
ipa config-mod, no validation check is run. Check at least
the following:

- all object classes are known to LDAP
- all default user/group attributes are allowed under the new
  set of default object classes

https://fedorahosted.org/freeipa/ticket/1893
2011-10-11 14:49:36 +02:00
Adam Young
1fef592892 split metadata call
The JSON metadata call has grown large enough that parsing it requires too much stack space on some browsers.  TO avoid breaking the API, this change reuses some testing parameters that we established for the metadata call in the past.  To fetch just the objects call it like this:
{"method":"json_metadata","params":[["all",""],{}],"id":0}
And just the methods call it like this:
{"method":"json_metadata","params":[["","all"],{}],"id":0}

Note the difference in the positional parameters.

To get a specific object,  pass the object name as the first parameter.  To get a specific method, pass a blank first parameter and the method name in the second parameter.

THis is not ideal, but we are constrained by the existing API.
2011-10-09 23:32:52 -04:00
Martin Kosek
a85bb7fa9e Prevent collisions of hostgroup and netgroup
For every hostgroup a managed netgroup is created (if this is allowed).
Make sure that if a stand-alone netgroup exists, a hostgroup with the
same name cannot be created to prevent collisions.

https://fedorahosted.org/freeipa/ticket/1914
2011-10-06 05:29:56 -04:00
Endi S. Dewata
fe8aeef307 Added confirmation when adding multiple entries.
The adder dialog has been modified to show a confirmation message
after each successful addition.

Ticket #1786
2011-10-05 14:51:50 +02:00
Jan Cholasta
12bfed37d4 Add a function for formatting network locations of the form host:port for use in URLs.
If the host part is a literal IPv6 address, it must be enclosed in square
brackets (RFC 2732).

ticket 1869
2011-10-05 10:58:25 +02:00
Alexander Bokovoy
b5758c8005 Unroll StrEnum values when displaying help
https://fedorahosted.org/freeipa/ticket/1848
2011-10-03 16:40:48 -04:00
Rob Crittenden
bd227b3562 Require current password when using passwd to change your own password.
Add a new required parameter, current_password. In order to ask this
first I added a new parameter option, sortorder. The lower the value the
earlier it will be prompted for.

I also changed the way autofill works. It will attempt to get the default
and if it doesn't get anything will continue prompting interactively.

Since current_password is required I'm passing a magic value that
means changing someone else's password. We need to pass something
since current_password is required.

The python-ldap passwd command doesn't seem to use the old password at
all so I do a simple bind to validate it.

https://fedorahosted.org/freeipa/ticket/1808
2011-10-04 15:16:15 +02:00
Jan Cholasta
48a67d9a2e Validate name_from_ip parameter of dnszone.
ticket 1627
2011-10-04 09:25:44 +02:00
Endi S. Dewata
62817a4f72 I18n clean-up.
The hard-coded 'undo' and 'undo all' labels have been moved into
internal.py to allow translation.

Ticket #1897
2011-10-03 15:13:38 +02:00
Martin Kosek
56d89d39ce migrate process cannot handle multivalued pkey attribute
When group/user is migrated, the attribute used for RDN may be
multivalued. Make sure that we pick the value used in the RDN
which should be the unique one and not just the first one.

https://fedorahosted.org/freeipa/ticket/1892
2011-10-03 10:47:49 +02:00
Martin Kosek
759ae9e2ef Fix LDAPCreate search failure
LDAPCreate reports "search criteria was not specific enough" when LDAP
object created in LDAPCreate shares its container with other LDAP objects
and there is one with the same name and RDN attribute.

Pass objectclass to find_entry_by_attr() function used to retrieve
newly created object for POST_CALLBACK to identify correct LDAP
object.

https://fedorahosted.org/freeipa/ticket/1864
2011-09-30 12:24:20 +02:00
Rob Crittenden
8cf8870d3d Add regular expression pattern to host names.
Limit hostnames to letters, digits and - with a maximum length of 255

https://fedorahosted.org/freeipa/ticket/1780
2011-09-27 16:08:26 +02:00
Rob Crittenden
6aa5bfe5db Include failed service and service groups in hbac rule management
hbacrule-service-add/remove failures weren't being displayed because
no label was defined.

https://fedorahosted.org/freeipa/ticket/1863
https://fedorahosted.org/freeipa/ticket/1865
2011-09-27 15:57:14 +02:00
Martin Kosek
43c968f554 Fix error messages in hbacrule
Fix NotFound error messages in hbacrule commands so that the text is
consistent with the rest of the framework.

https://fedorahosted.org/freeipa/ticket/1861
2011-09-27 15:37:01 +02:00
Rob Crittenden
a1430dcb2c Normalize uid in user principal to lower-case and do validation
Use same normalization and validation in passwd plugin and add some
tests for invalid principals

https://fedorahosted.org/freeipa/ticket/1778
2011-09-22 15:41:19 +02:00
Martin Kosek
ffd760c100 Fix /usr/bin/ipa dupled server list
Fix get_url_list() so that the configured master server is there
just once. This fix lets /usr/bin/ipa try connecting to all IPA
masters just once and not print confusing server list with
dupled master.

https://fedorahosted.org/freeipa/ticket/1817
2011-09-22 15:08:32 +02:00
Rob Crittenden
8c45170582 Suppress managed netgroups as indirect members of hosts.
By design these managed netgroups are not supposed to show unless you
specifically want to see them.

https://fedorahosted.org/freeipa/ticket/1738
2011-09-19 08:41:25 +02:00
Rob Crittenden
29ec63c381 Skip the cert validator if the csr we are passed in is a valid filename
The validator will still fire, just after the load_files() call. Basically
it will hit the validator twice. The first time it will exit because the
value of csr is a filename. The second time it will run the validator against
the contents of the file.

ticket https://fedorahosted.org/freeipa/ticket/1777
2011-09-14 18:27:05 +02:00
Endi S. Dewata
0882c25c66 Fixed labels for run-as users and groups.
The labels for the run-as users and groups tables in sudo rule details
page have been modified to improve the clarity.

Ticket #1752
2011-09-13 17:32:33 +00:00
Rob Crittenden
5ddc027d7f Remove normalizer that made role, privilege and permission names lower-case
https://fedorahosted.org/freeipa/ticket/1747
2011-09-12 16:51:25 -04:00
Martin Kosek
a40d4d4d64 Fix pylint false positive in hbactest module
https://fedorahosted.org/freeipa/ticket/1763
2011-09-13 13:49:43 +02:00
Alexander Bokovoy
261a41b3d4 When external host is specified in HBAC rule, allow its use in simulation
https://fedorahosted.org/freeipa/ticket/1763

When external host is specified in HBAC rule, it needs to be added to
the set of source hosts this rule applies to. Add (list of external hosts)
explicitly when converting FreeIPA rules to PyHBAC objects.
2011-09-13 13:14:53 +02:00
Alexander Bokovoy
50a836b44c Cleanup whitespace 2011-09-13 11:16:10 +02:00
Alexander Bokovoy
1bdb5d04fe Unroll groups when testing HBAC rules
Fixes https://fedorahosted.org/freeipa/ticket/1740
2011-09-11 21:08:19 -04:00
Alexander Bokovoy
8f0a7bd646 Incorrect name in examples of ipa help hbactest
https://fedorahosted.org/freeipa/ticket/1741

HBAC rules address PAM services, thus service names should correspond to proper PAM names.
2011-09-11 20:31:42 -04:00
Rob Crittenden
c97eb871c5 Don't allow a OTP to be set on an enrolled host
Setting a password invalidates the existing keytab

https://fedorahosted.org/freeipa/ticket/1719
2011-09-10 00:03:19 +00:00
Yuri Chornoivan
1785d0a7c1 Fix typos
Fix "The the" and "classses" in FreeIPA code and messages.

https://fedorahosted.org/freeipa/ticket/1480
2011-09-07 13:20:42 +02:00
Endi S. Dewata
6892d6e594 Fixed hard-coded UI message in entity.js.
The hard-coded label in IPA.facet has been moved into internal.py to
allow translation.

Ticket #1701
2011-09-01 14:12:15 +00:00
Endi S. Dewata
6c6748748b Fixed hard-coded UI messages.
Some hard-coded messages in ipa.js have been moved into internal.py.
The messages in internal.py have been rearranged to match the output
(ipa_init.json).

A new method IPA.get_message() has been added to take a message ID and
return the translated message or a default message if not found.

Ticket #1701
2011-08-31 16:29:45 +00:00
Martin Kosek
6a2dfde086 Let Bind track data changes
Integrate new bind-dyndb-ldap features to automatically track
DNS data changes:

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

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

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

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

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

https://fedorahosted.org/freeipa/ticket/826
2011-08-31 16:46:12 +02:00
Rob Crittenden
ca1ca17cb6 Suppress managed netgroups from showing as memberof hostgroups.
By design these managed netgroups are not supposed to show unless you
specifically want to see them.

https://fedorahosted.org/freeipa/ticket/1738
2011-08-31 14:34:52 +02:00
Jr Aquino
d05ace8fba 34 Create FreeIPA CLI Plugin for the 389 Auto Membership plugin
Added new container in etc to hold the automembership configs.
Modified constants to point to the new container
Modified dsinstance to create the container
Created automember.py to add the new commands
Added xmlrpc test to verify functionality
Added minor fix to user.py for constant behavior between memberof
and automember

https://fedorahosted.org/freeipa/ticket/1272
2011-08-31 09:49:43 +02:00
Rob Crittenden
e52f652873 Add netgroup as possible memberOf for hostgroups
https://fedorahosted.org/freeipa/ticket/1563
2011-08-29 21:29:16 -04:00
Martin Kosek
327d67fe8d Fix sudo help and summaries
1) Add sudorule docstring headline

2) Fix naming inconsistency in Sudo plugins help and summaries,
   especially capitalization of Sudo objects - Sudo Rule, Sudo
   Command and Sudo Command Group

3) Add missing summaries for sudorule-add-option and
   sudorule-remove-option. To keep backward compatibility with
   older clients, just print the missing summary with
   output_for_cli(), don't expand Output.

https://fedorahosted.org/freeipa/ticket/1595
https://fedorahosted.org/freeipa/ticket/1596
2011-08-29 21:26:23 -04:00
Rob Crittenden
3b9da8e276 Add external source hosts to HBAC.
When adding/removing source hosts if the host isn't found in IPA it is
considered external. The attribute externalhost is used to store
external hosts.

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

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

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

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

add flag to pkicreate in order to enable using proxy.

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

Signed-off-by: Simo Sorce <ssorce@redhat.com>
2011-08-29 17:54:49 -04:00
Endi S. Dewata
79f5c5b2ae Fixed host OTP status.
The host details page has been modified to show the status of the OTP.
Setting a new OTP is now done using a dialog box.

Ticket #1710
2011-08-26 15:19:12 +00:00
John Dennis
1b4eab0411 ticket 1669 - improve i18n docstring extraction
This patch reverts the use of pygettext for i18n string extraction. It
was originally introduced because the help documentation for commands
are in the class docstring and module docstring.

Docstrings are a Python construct whereby any string which immediately
follows a class declaration, function/method declaration or appears
first in a module is taken to be the documentation for that
object. Python automatically assigns that string to the __doc__
variable associated with the object. Explicitly assigning to the
__doc__ variable is equivalent and permitted.

We mark strings in the source for i18n translation by embedding them
in _() or ngettext(). Specialized extraction tools (e.g. xgettext)
scan the source code looking for strings with those markers and
extracts the string for inclusion in a translation catalog.

It was mistakingly assumed one could not mark for translation Python
docstrings. Since some docstrings are vital for our command help
system some method had to be devised to extract docstrings for the
translation catalog. pygettext has the ability to locate and extract
docstrings and it was introduced to acquire the documentation for our
commands located in module and class docstrings.

However pygettext was too large a hammer for this task, it lacked any
fined grained ability to extract only the docstrings we were
interested in. In practice it extracted EVERY docstring in each file
it was presented with. This caused a large number strings to be
extracted for translation which had no reason to be translated, the
string might have been internal code documentation never meant to be
seen by users. Often the superfluous docstrings were long, complex and
likely difficult to translate. This placed an unnecessary burden on
our volunteer translators.

Instead what is needed is some method to extract only those strings
intended for translation. We already have such a mechanism and it is
already widely used, namely wrapping strings intended for translation
in calls to _() or _negettext(), i.e. marking a string for i18n
translation. Thus the solution to the docstring translation problem is
to mark the docstrings exactly as we have been doing, it only requires
that instead of a bare Python docstring we instead assign the marked
string to the __doc__ variable. Using the hypothetical class foo as
an example.

class foo(Command):
    '''
    The foo command takes out the garbage.
    '''

Would become:

class foo(Command):
    __doc__ = _('The foo command takes out the garbage.')

But which docstrings need to be marked for translation? The makeapi
tool knows how to iterate over every command in our public API. It was
extended to validate every command's documentation and report if any
documentation is missing or not marked for translation. That
information was then used to identify each docstring in the code which
needed to be transformed.

In summary what this patch does is:

* Remove the use of pygettext (modification to install/po/Makefile.in)

* Replace every docstring with an explicit assignment to __doc__ where
  the rhs of the assignment is an i18n marking function.

* Single line docstrings appearing in multi-line string literals
  (e.g. ''' or """) were replaced with single line string literals
  because the multi-line literals were introducing unnecessary
  whitespace and newlines in the string extracted for translation. For
  example:

  '''
  The foo command takes out the garbage.
  '''

  Would appear in the translation catalog as:

"\n
  The foo command takes out the garbage.\n
  "

  The superfluous whitespace and newlines are confusing to translators
  and requires us to strip leading and trailing whitespace from the
  translation at run time.

* Import statements were moved from below the docstring to above
  it. This was necessary because the i18n markers are imported
  functions and must be available before the the doc is
  parsed. Technically only the import of the i18n markers had to
  appear before the doc but stylistically it's better to keep all the
  imports together.

* It was observed during the docstring editing process that the
  command documentation was inconsistent with respect to the use of
  periods to terminate a sentence. Some doc had a trailing period,
  others didn't. Consistency was enforced by adding a period to end of
  every docstring if one was missing.
2011-08-24 23:13:16 -04:00
John Dennis
7746e22fe7 ticket 1706 - internationalize cli help framework
In cli.py is a framework for printing out help information. The
command documentation being displayed is internationalized, however
the text generated by the help framework itself is not
internationalized.

The strings output by the help subsystem need to be internationalized.
2011-08-24 23:06:28 -04:00
John Dennis
a4fadbfe63 ticket 1705 - internationalize help topics
* Wrap each topic description in _()

* Replace the use of if 'topic' in dir(module) with the more
  Pythonic and efficient getattr(module, 'topic', None)

* Make sure to invoke unicode on the value returned from _()
  otherwise you'll get a GettextFactory instance, not a string

* Clean up trailing whitespace errors
2011-08-24 23:05:17 -04:00
Rob Crittenden
6dfd7c8242 Retrieve password/keytab state when modifying a host.
ticket https://fedorahosted.org/freeipa/ticket/1714
2011-08-25 16:38:38 +00:00
Rob Crittenden
1936b8050e Add option to only prompt once for passwords, use in entitle_register
A Password param always prompted to confirm the entered password.
This doesn't make sense if you want to prompt for a password to another
system like we do with entitlements. This adds a new boolean option to
control the Password prompt parameter.

https://fedorahosted.org/freeipa/ticket/1695
2011-08-24 15:25:53 -04:00
Rob Crittenden
41d89d0d13 Add label for HBAC services to show as members
https://fedorahosted.org/freeipa/ticket/1711
2011-08-24 15:24:19 -04:00
Petr Vobornik
950a5da34d Validation of details facet before update https://fedorahosted.org/freeipa/ticket/1676 The ticket is a duplicate of server error, but it revealed few UI errors.
Newly performs validation of details facet before update. If validation fails, notification dialog is shown and command isn't executed.
Fixed integer minimum and maximum value checking.
Read-only and non-writable fields are no longer considered required.
2011-08-25 00:50:52 +00:00
Rob Crittenden
109b79a7ac Change the way has_keytab is determined, also check for password.
We need an indicator to see if a keytab has been set on host and
service entries. We also need a way to know if a one-time password is
set on a host.

This adds an ACI that grants search on userPassword and
krbPrincipalKey so we can do an existence search on them. This way
we can tell if the attribute is set and create a fake attribute
accordingly.

When a userPassword is set on a host a keytab is generated against
that password so we always set has_keytab to False if a password
exists. This is fine because when keytab gets generated for the
host the password is removed (hence one-time).

This adds has_keytab/has_password to the user, host and service plugins.

ticket https://fedorahosted.org/freeipa/ticket/1538
2011-08-24 14:12:01 +02:00
Jan Cholasta
610faff6f3 Verify that the external CA certificate files are correct.
ticket 1572
2011-08-23 01:23:41 -04:00
Jr Aquino
1077343d1a Improve sudorule documentation
Added brief explanations for the various Sudo components in the
top level doc.  Added doc entries for RunAs User and RunAs
Group.

https://fedorahosted.org/freeipa/ticket/1657
2011-08-23 00:21:27 -04:00
Endi S. Dewata
fca0f4dd65 Updated add and delete association dialog titles.
The association table widget and facet have been modified to accept
titles for the add and delete dialogs. The table and facet definitions
have been modified to specify the appropriate titles.

Some unused code have been removed.

Ticket #1629
2011-08-23 16:11:42 +00:00
Rob Crittenden
aa2bd245bf Fix wording in examples of delegation plugin.
https://fedorahosted.org/freeipa/ticket/1013
2011-08-19 02:54:33 -04:00
Rob Crittenden
d67b60079f Do batch logging on successful commands too, not just failures.
This was an oversight for previous logging patch, ticket 1598
2011-08-19 02:54:04 -04:00
Rob Crittenden
92780658b8 Log each command in a batch separately.
This also fixes command logging in general, it wasn't working in most
cases as a regression in ticket 1322.

https://fedorahosted.org/freeipa/ticket/1598
2011-08-19 01:21:22 -04:00
Martin Kosek
e856310d75 Fix automountlocation-import conflicts
Do not fail import operation with DuplicateEntry when imported
maps/keys conflict with maps/keys pre-created by
automountlocation-add command. Currently, this applies for map
'auto.direct' and key '/-'.

https://fedorahosted.org/freeipa/ticket/1551
2011-08-18 22:49:01 -04:00
Endi S. Dewata
b1f0f32522 Replaced page dirty dialog title.
The title of page dirty dialog has been changed to 'Unsaved Changes'.

Ticket #1653
2011-08-19 16:43:09 +00:00
Endi S. Dewata
6bf90a472b Removed 'Hide already enrolled' checkbox.
The 'Hide already enrolled' has been removed from the enrollment
dialog because it is checked by default and entries that are already
enrolled cannot be enrolled again.

Ticket #1638
2011-08-19 16:43:00 +00:00
Martin Kosek
d28f1c3b7c Fix automountkey-mod
Fix automountkey-mod so that automountkey attribute is correctly
updated. Add this test case to the unit tests.

Make automountkey required for automountkey-mod, otherwise it would
cause internal server error.

Make --newinfo optional so that automountkey may be just renamed
without changing its info attribute.

https://fedorahosted.org/freeipa/ticket/1528
2011-08-18 20:35:12 -04:00
John Dennis
05bdfc6852 ticket 1659 - invalid i18n string in dns.py
dns.py at line 976 has an invalid i18n string and cannot be processed
during message extraction causing message catalog generation to fail.

The format parameters are trapped inside the i18n string. Also it's
not necessary to promote the i18n string literal to unicode via the u
prefix because the _() function returns unicode.
2011-08-18 13:19:11 +02:00
Alexander Bokovoy
dca6cf1666 Propagate environment when it is required.
https://fedorahosted.org/freeipa/ticket/1549
https://fedorahosted.org/freeipa/ticket/1550
2011-08-17 02:05:13 -04:00
Martin Kosek
76a56d0741 Add missing attribute labels for sudorule
https://fedorahosted.org/freeipa/ticket/1571
2011-08-17 00:53:09 -04:00
John Dennis
b6006f78f0 ticket 1569 - Test DN object non-latin Unicode support
The DN unittest was lacking a test for i18n. The unittest was
updated to store "Hello" in Arabic with both utf-8 and unicode
and verify the values could be properly retrieved and converted
to dn string syntax.

During the testing a few problems were discovered and corrected.

* passing in utf-8 caused an ASCII decode error becuase of Python's
  silly default encoding of ASCII. The fix was to explictly use
  the utf-8 codec.

* there were a couple of places where encode/decode were not
  called correctly.

* the internal attr and value members of the AVA class were renamed
  to explicitly show they are stored as unicode.

Of course the unittest was updated as well.
2011-08-16 23:28:31 -04:00
John Dennis
fae07f8154 ticket 1568 - DN objects should support the insert method
Add dn.insert() and update unittest
2011-08-16 23:25:01 -04:00
Petr Vobornik
e8b64be673 error dialog for batch command
https://fedorahosted.org/freeipa/ticket/1597
https://fedorahosted.org/freeipa/ticket/1592

Added option to show multiple errors in error dialog.
2011-08-17 17:27:57 +00:00
Alexander Bokovoy
bc8ea3ae4e Pass empty options as empty arrays for supported dns record types. https://fedorahosted.org/freeipa/ticket/1632 2011-08-15 00:33:55 -04:00
Endi S. Dewata
d08dcb40e1 Fixed facet group labels.
The facet group labels have been modified according to UXD spec.
Some facet groups will have more descriptive labels. Some others
will not have any labels because the facet tab is self-explanatory.

Ticket #1423, #1561
2011-08-08 12:00:07 -04:00
Martin Kosek
31e4801f30 Improve dnszone-add error message
Check that NS address passed in dnszone-add is a domain name and
not an IP address. Make this clear also the parameter help.

https://fedorahosted.org/freeipa/ticket/1567
2011-08-08 17:48:25 +02:00
Martin Kosek
07837082f4 Hide continue option from automountkey-del
This option makes no sense for automount keys. This should be
removed in future versions.

https://fedorahosted.org/freeipa/ticket/1529
2011-08-02 02:16:54 -04:00
Rob Crittenden
d8c479731e Deprecated managing users and runas user/group in sudorule add/mod
We have helpers to manage these values so they shouldn't be available
via add/mod. There is no logic behind them to do the right thing.

https://fedorahosted.org/freeipa/ticket/1307
https://fedorahosted.org/freeipa/ticket/1320
2011-07-29 15:40:01 +02:00
Alexander Bokovoy
dd296eec13 Add hbactest command. https://fedorahosted.org/freeipa/ticket/386
HBAC rules control who can access what services on what hosts and from where.
You can use HBAC to control which users or groups on a source host can
access a service, or group of services, on a target host.

Since applying HBAC rules implies use of a production environment,
this plugin aims to provide simulation of HBAC rules evaluation without
having access to the production environment.

 Test user coming from source host to a service on a named host against
 existing enabled rules.

 ipa hbactest --user= --srchost= --host= --service=
              [--rules=rules-list] [--nodetail] [--enabled] [--disabled]

 --user, --srchost, --host, and --service are mandatory, others are optional.

 If --rules is specified simulate enabling of the specified rules and test
 the login of the user using only these rules.

 If --enabled is specified, all enabled HBAC rules will be added to simulation

 If --disabled is specified, all disabled HBAC rules will be added to simulation

 If --nodetail is specified, do not return information about rules matched/not matched.

 If both --rules and --enabled are specified, apply simulation to --rules _and_
 all IPA enabled rules.

 If no --rules specified, simulation is run against all IPA enabled rules.

EXAMPLES:

    1. Use all enabled HBAC rules in IPA database to simulate:
    $ ipa  hbactest --user=a1a --srchost=foo --host=bar --service=ssh
    --------------------
    Access granted: True
    --------------------
      notmatched: my-second-rule
      notmatched: my-third-rule
      notmatched: myrule
      matched: allow_all

    2. Disable detailed summary of how rules were applied:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --nodetail
    --------------------
    Access granted: True
    --------------------

    3. Test explicitly specified HBAC rules:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --rules=my-second-rule,myrule
    ---------------------
    Access granted: False
    ---------------------
      notmatched: my-second-rule
      notmatched: myrule

    4. Use all enabled HBAC rules in IPA database + explicitly specified rules:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --rules=my-second-rule,myrule --enabled
    --------------------
    Access granted: True
    --------------------
      notmatched: my-second-rule
      notmatched: my-third-rule
      notmatched: myrule
      matched: allow_all

    5. Test all disabled HBAC rules in IPA database:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --disabled
    ---------------------
    Access granted: False
    ---------------------
      notmatched: new-rule

    6. Test all disabled HBAC rules in IPA database + explicitly specified rules:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --rules=my-second-rule,myrule --disabled
    ---------------------
    Access granted: False
    ---------------------
      notmatched: my-second-rule
      notmatched: my-third-rule
      notmatched: myrule

    7. Test all (enabled and disabled) HBAC rules in IPA database:
    $ ipa hbactest --user=a1a --srchost=foo --host=bar --service=ssh --enabled --disabled
    --------------------
    Access granted: True
    --------------------
      notmatched: my-second-rule
      notmatched: my-third-rule
      notmatched: myrule
      notmatched: new-rule
      matched: allow_all

Only rules existing in IPA database are tested. They may be in enabled or
disabled disabled state.

Specifying them through --rules option explicitly enables them only in
simulation run.

Specifying non-existing rules will not grant access and report non-existing
rules in output.
2011-07-28 18:01:44 -04:00
Endi S. Dewata
1983193d47 Fixed missing memberof definition in HBAC service.
The HBAC service class has been modified to define the memberof
relationship with HBAC service group.

Ticket #1546
2011-07-28 21:40:03 -04:00
Adam Young
970018f206 dns section header i18n.
https://fedorahosted.org/freeipa/ticket/1493
2011-07-28 19:11:17 +00:00
Adam Young
b36df6e9b9 removing setters setup and init
change widget and widget unit tests to hold on to entity, not entity name.
    Replacing entity_name with entity.name  in most places.
       The one exception is columns for table_widget.
       Widgets that refer to other entities have to have late resolution of the entity object, due to circular dependencies.

    cleanup entity assignment.
    removed template and layout,
    merged setup into create
    adder dialogs adjust height for external
    removed init from widget, isection, association, facet, host and service

    Make unit tests use factory.
    fix functional tests to click find link correctly.
    tweak to activation test, but still broken.
    moved initialization code to the end
    use --all for hbacrule find, so the type shows up now

    fixed dns exception code and exception handling for get_entity
    replace metadata look up with value from entity.
    fixed author lines
    removed duplicate columns in managed by facets.
    tweak to nav fix in order to initialize tab.
    more defensive code
    update metadata for true false
    one line init for entity_name in widget
    move init code to end of constructor functions
    moved constants to start of function for adder_dialog
    external fields for dialogs initialized at dialog creation
    sudo sections: move add fields and columns to widget definition.

   The parameter validation in IPA.column ...This is precondition checking.  Note that it merely throws an exception if the entity_name is not set.  I want this stuff at the top of the function so that it is obvious to people looking to use them what is required.  I added a comment to make this clear, but I'd like to keep precondition checking at the top of the function.

   decreased the scope of the pkey_name and moved the initiailzation fof columns into the setup_column function for association_tables

   return false at the end of click handler

   removed blank labels in sudo command section

   fix radio buttons for sudo category

   fixed table side for adder dialogs with external fields
    comments for future direction with add_columns

    https://fedorahosted.org/freeipa/ticket/1451
    https://fedorahosted.org/freeipa/ticket/1462
    https://fedorahosted.org/freeipa/ticket/1493
    https://fedorahosted.org/freeipa/ticket/1497
    https://fedorahosted.org/freeipa/ticket/1532
    https://fedorahosted.org/freeipa/ticket/1534
2011-07-28 14:17:25 -04:00
John Dennis
264ed38fa2 Make AVA, RDN & DN comparison case insensitive. No need for lowercase normalization.
Replace deepcopy with constructor (i.e. type call)
Can now "clone" with configuration changes by passing object
of the same type to it's constructor, e.g.
dn1 = DN(('cn', 'foo'))
dn2 = DN(dn1)
dn2 = DN(dn1, first_key_match=False)

Remove pairwise grouping for RDN's. Had previously removed it
for DN's, left it in for RDN's because it seemed to make sense
because of the way RDN's work but consistency is a higher goal.

Add keyword constructor parameters to pass configuration options.

Make first_key_match a configuration keyword.

Updated documentation.

Updated unit test.

FWIW, I noticed the unittest is now running 2x faster, not sure why,
removal of deepcopy? Anyway, hard to argue with performance doubling.
2011-07-27 20:58:48 -04:00
Martin Kosek
18aa73e06e Fix invalid issuer in unit tests
Fix several test failures when issuer does not match the one
generated by make-testcert (CN=Certificate Authority,O=<realm>).

https://fedorahosted.org/freeipa/ticket/1527
2011-07-27 20:56:16 -04:00
Rob Crittenden
62445b8673 Don't leave dangling map if adding an indirect map fails
When using the add_indirect helper we create a new map and then add a key
for it all in one step. If adding the key fails for any reason be sure to
remove the map we added.

https://fedorahosted.org/freeipa/ticket/1520
2011-07-27 00:02:28 -04:00
Martin Kosek
e7118a5f28 Fix automountkey commands summary
The summary value was set to primary key. However, the primary key
may contain also an info option as a workaround for multiple direct
maps problem.

This patch sets the result 'value' and thus summary text to
expected and consistent value.

https://fedorahosted.org/freeipa/ticket/1524
2011-07-27 18:05:26 +02:00
Rob Crittenden
87821f2049 Revert use of 'can be at least' to 'must be at least' in minvalue validator
BZ https://bugzilla.redhat.com/show_bug.cgi?id=723969
2011-07-26 01:58:41 -04:00
Petr Vobornik
9a4ce988df fixed empty dns record update
https://fedorahosted.org/freeipa/ticket/1477

Redirection after updating empty DNS Record (which is deleted).
Added hook to details facet for post update operation.
2011-07-25 23:06:59 -04:00
Rob Crittenden
a49d294845 Don't check for leading/trailing spaces in a File parameter
https://fedorahosted.org/freeipa/ticket/1505
2011-07-25 09:10:27 +02:00
Rob Crittenden
abb5ee22d2 Autofill the default revocation reason
https://fedorahosted.org/freeipa/ticket/1514
2011-07-22 08:57:31 +02:00
Rob Crittenden
506cbaa1fb Hide the HBAC access type attribute now that deny is deprecated.
It won't appear in the UI/CLI but is still available via XML-RPC.
allow is the default and deny will be rejected.

https://fedorahosted.org/freeipa/ticket/1495
2011-07-21 01:11:45 -04:00
John Dennis
ad3cf68ac2 Ticket 1485 - DN pairwise grouping
The pairwise grouping used to form RDN's and AVA's proved to be
confusing in practice, this patch removes that functionality thus
requiring programmers to explicitly pair attr,value using a tuple or
list.

In addition it was discovered additional functionality was needed to
support some DN operations in freeipa. DN objects now support
startswith(), endswith() and the "in" membership test. These functions
and operators will accept either a DN or RDN.

The unittest was modified to remove the pairwise tests and add new
explicit tests. The unittest was augmented to test the new
functionality. In addition the unittest was cleaned up a bit to use
common utilty functions for improved readabilty and robustness.

The documentation was updated.

fix test_role_plugin use of DN to avoid pairwise grouping
2011-07-21 00:29:38 -04:00
Martin Kosek
d4310c07a9 Add missing automount summaries
https://fedorahosted.org/freeipa/ticket/1509
https://fedorahosted.org/freeipa/ticket/1510
2011-07-21 00:19:50 -04:00
Rob Crittenden
7ce57e38c4 Only call entry_from_entry() after waiting for the new entry.
This fixes an indentation problem.
2011-07-19 21:45:03 -04:00
Rob Crittenden
e8c7eaf260 Set a default minimum value for class Int, handle long values better.
Allow a long to get as far as the min/max constraints where we can
compare it to min/max int values and reject with a proper error message.

https://fedorahosted.org/freeipa/ticket/1494
2011-07-19 20:32:00 -04:00
Rob Crittenden
eda4d20264 Fix regression when calculating external groups.
The members should be the current members of the entry, not the refreshed
copy
2011-07-19 01:38:26 -04:00
Rob Crittenden
e5a5c781f9 A removed external host is shown in output when removing external hosts.
This is just a display problem, the host is actually removed from the entry.

https://fedorahosted.org/freeipa/ticket/1492
2011-07-18 19:30:43 -04:00
Martin Kosek
07e6353373 Fix sudorule-remove-user
Removed sudorule "External User" is displayed in the output when
"--all" switch is used.

https://fedorahosted.org/freeipa/ticket/1489
2011-07-19 15:23:53 +02:00
Rob Crittenden
1dd9e14073 Optionally wait for 389-ds postop plugins to complete
Add a new command that lets you wait for an attribute to appear in
a value. Using this you can do things like wait for a managed entry
to be created, adding a new objectclass to the parent entry.

This is controlled by a new booleon option, wait_for_attr, defaulting
to False.

https://fedorahosted.org/freeipa/ticket/1144
2011-07-19 13:06:16 +02:00
Jr Aquino
0359e2a043 Return correct "RunAs External Group" when removing members
If you used sudorule-remove-runasgroup to remove a member that member
still appeared in the command output when --all was included (it isn't a
default attribute). This was due to post-processing to evaluate external
users/groups, the entry was actually updated properly.

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

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

https://fedorahosted.org/freeipa/ticket/1141
2011-07-17 22:14:24 -04:00
Martin Kosek
bc8be0a41e Improve long integer type validation
Passing a number of "long" type to IPA Int parameter invokes
user-unfriendly error message about incompatible types. This patch
improves Int parameter with user understandable message along with
maximum value he can pass.

https://fedorahosted.org/freeipa/ticket/1346
2011-07-18 16:02:07 +02:00
Martin Kosek
47f1d86e35 Add new dnszone-find test
Implement a test for new dnszone-find option --forward-only.
Fix example for reverse zone (zone was not fully qualified and
DNS plugin would forbid adding PTR records).

https://fedorahosted.org/freeipa/ticket/1473
2011-07-18 09:50:23 +02:00
Jan Cholasta
b203756a88 Add ability to specify DNS reverse zone name by IP network address.
In order for this to work, chaining of parameters through
default_from is made possible.

ticket 1474
2011-07-15 02:21:23 -04:00
Rob Crittenden
bea7818add Remove the ability to create new HBAC deny rules.
New rules will all be allow type. Existing rules cannot be changed to
deny.

The type attribute now defaults to allow with autofill so it won't be
prompted in interactive mode in the cli.

https://fedorahosted.org/freeipa/ticket/1432
2011-07-14 19:23:17 -04:00
Rob Crittenden
9dfdf55034 In sudo labels we should use RunAs and not Run As.
https://fedorahosted.org/freeipa/ticket/1328
2011-07-14 19:18:02 -04:00
Rob Crittenden
ef29207047 Document registering to an entitlement server with a UUID as not implemented.
It was my understanding that we would be able to pass in an existing UUID
when registering to connect to an existing registration (for the case where
IPA is re-installed). This is supported in the REST API but not python-rhsm.

https://fedorahosted.org/freeipa/ticket/1216
2011-07-14 19:15:15 -04:00
Endi S. Dewata
4bd85ceb90 Fixed label capitalization
The CSS text-transform sometimes produces incorrect capitalization,
so the code has been modified to use translated labels that already
contain the correct capitalization.

Ticket #1424
2011-07-14 11:44:48 -04:00
Martin Kosek
0cb65fd9f6 Filter reverse zones in dnszone-find
Implements a new option to filter out reverse zones.

This patch also do some clean up in dns plugin - debug prints were
accidentally left here in the last dns patch.

https://fedorahosted.org/freeipa/ticket/1471
2011-07-13 15:06:13 +02:00
Alexander Bokovoy
b93e0b8bbf Convert nsaccountlock to always work as bool towards Python code
https://fedorahosted.org/freeipa/ticket/1259

Python code will see nsaccountlock as bool. JavaScript code will also see it as bool.

This allows native boolean operations with the lock field. Passes both CLI and WebUI tests.
2011-07-13 12:02:46 +02:00
Endi S. Dewata
b2c5b2b4b5 Fixed object_name and object_name_plural internationalization
The object_name, object_name_plural and messages that use these
attributes have been converted to support translation. The label
attribute in the Param class has been modified to accept unicode
string.

Ticket #1435
2011-07-12 16:33:08 -04:00
Martin Kosek
e6c68e9993 Add DNS record modification command
The DNS record plugin does not support modification of a record. One
can only add A type addresses to a DNS record or remove the current
ones. To actually change a DNS record value it has to be removed and
then added with a desired value.

This patch adds a new DNS plugin command "dnsrecord-mod" which enables
user to:
 - modify a DNS record value (note than DNS record can hold multiple values
   and those will be overwritten)
 - remove a DNS record when an empty value is passed

New tests for this new command have been added to the CLI test suite.

https://fedorahosted.org/freeipa/ticket/1137
2011-07-12 14:20:16 -04:00
Rob Crittenden
2415ba6d37 Fix error in AttrValueNotFound exception example 2011-07-11 19:21:47 -04:00
Rob Crittenden
d9627ab165 find_entry_by_attr() should fail if multiple entries are found
It will only ever return one entry so if more than one are found
then we raise an exception. This is most easily seen in the host
plugin where we search on the server shortname which can be the
same across sub-domains (e.g. foo.example.com &
foo.lab.example.com).

https://fedorahosted.org/freeipa/ticket/1388
2011-07-11 18:45:49 -04:00
Rob Crittenden
3a5e26a01c Enforce class rules when query=True, continue to not run validators.
This started as a problem in allowing leading/trailing whitespaces
on primary keys. In nearly every command other than add query is True
so all rules were ignored on the primary key. This meant that to
enforce whitespace we would need to define a validator for each one.

I decided instead to set self.all_rules to just the class rules if
query == True. So the minimum set of validators will be executed
against each type but param-specific validators will only run on add.

https://fedorahosted.org/freeipa/ticket/1285
https://fedorahosted.org/freeipa/ticket/1286
https://fedorahosted.org/freeipa/ticket/1287
2011-07-11 18:43:32 -04:00
Endi S. Dewata
3229eee074 Added sudo options.
A table has been added into sudo rule details page for managing
sudo options.

Ticket #1447
2011-07-11 22:11:40 +00:00
Adam Young
a38ad1d433 password expiration label 2011-07-05 18:00:05 -04:00
Endi S. Dewata
6083df1b02 Fixed object_name usage.
The object_name attribute was used as both an identifier and a
label which sometimes require different values (e.g. hbacrule
vs. HBAC rule). The code that uses object_name as an identifier
has been changed to use the 'name' attribute instead. The values
of the object_name attribute have been fixed to become proper
labels.

Ticket #1217
2011-07-05 16:19:10 -04:00
Rob Crittenden
cd237e5f54 Add pwd expiration notif (ipapwdexpadvnotify) to config plugin def attr list
https://fedorahosted.org/freeipa/ticket/1416
2011-07-05 00:13:55 -04:00
Endi S. Dewata
58eec70884 Removed invalid associations.
The following invalid associations have been removed:
 - group's memberindirect netgroup and role
 - hostgroup's memberofindirect host

Ticket #1366
Ticket #1367
2011-07-01 00:59:34 -04:00
Endi S. Dewata
c27a6de2a6 Added confirmation dialog for user activation.
The IPA.user_status_widget has been modified such that it checks
the facet dirty status and asks the admin to either Update or Reset
the changes. Then the widget shows a dialog to confirm whether
the admin wants to activate/deactivate the user.

Ticket #1395
2011-07-01 02:49:12 +00:00
Adam Young
9d8ddb5d46 config widgets entity select default group checkbox for migration 2011-06-30 22:26:19 -04:00
Endi S. Dewata
2a52723465 Fixed hard-coded messages.
Hard-coded messages in the UI have been replaced with I18n messages.

Ticket #1396
2011-06-30 14:50:09 -04:00
Adam Young
2352fcbcc3 config fields
https://fedorahosted.org/freeipa/ticket/1403
https://fedorahosted.org/freeipa/ticket/1404
https://fedorahosted.org/freeipa/ticket/1405
https://fedorahosted.org/freeipa/ticket/1406

fields and sections for config screen
Using multivalue controls for object classes
2011-06-30 11:23:58 -04:00
Jan Cholasta
67b807d640 Replace the 'private' option in netgroup-find with 'managed'.
The 'private' option is kept in to maintain API compatibility, but
is hidden from the user.

ticket 1120
2011-06-28 01:57:11 -04:00
Alexander Bokovoy
716a25a784 Convert Bool to TRUE/FALSE when working with LDAP backend https://fedorahosted.org/freeipa/ticket/1259
According to RFC4517 the only valid values for a boolean in LDAP are TRUE or FALSE.
This commit adds support to recognize TRUE and FALSE as valid Bool constants when converting from LDAP attribute values
and enforces TRUE or FALSE string for account locking.
2011-06-27 23:03:23 -04:00
Adam Young
d2d5278c52 optional uid
Make the uid field optional
2011-06-27 16:33:35 -04:00
Endi S. Dewata
7452b6d3cb Fixed entity labels.
The entity labels in the following locations have been fixed:
 - search facet title: plural
 - details facet title: singular
 - association facet title: singular
 - breadcrumb: plural
 - adder dialog title: singular
 - deleter dialog title: plural

Some entity labels have been changed into the correct plural form.
Unused file install/ui/test/data/i18n_messages.json has been removed.

Ticket #1249
Ticket #1387
2011-06-27 12:11:22 -04:00
Endi S. Dewata
8d9575605d Added singular entity labels.
A new attribute label_singular has been added to all entities which
contains the singular form of the entity label in lower cases except
for acronyms (e.g. HBAC) or proper nouns (e.g. Kerberos). In the Web
UI, this label can be capitalized using CSS text-transform.

The existing 'label' attribute is intentionally left unchanged due to
inconsistencies in the current values. It contains mostly the plural
form of capitalized entity label, but some are singular. Also, it
seems currently there is no comparable capitalization method on the
server-side. So more work is needed before the label can be changed.

Ticket #1249
2011-06-27 12:11:22 -04:00
Jr Aquino
d49bf3871b oneliner correct typo in ipasudorunas_group
https://fedorahosted.org/freeipa/ticket/1326
2011-06-26 20:30:54 -04:00
Rob Crittenden
b02b77f8d7 Slight performance improvement by not doing some checking in production mode
These changes save a few hundred ms but every little bit helps.

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

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

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

ticket 1052
2011-06-23 02:11:34 -04:00
John Dennis
8c95eb68d2 Use DN class in get_primary_key_from_dn to return decoded value 2011-06-22 01:26:01 -04:00
John Dennis
032b77ac23 Add backslash escape support for cvs reader 2011-06-22 01:20:27 -04:00
John Dennis
1a7d05cc0f Module for DN objects plus unit test 2011-06-22 01:05:44 -04:00
Rob Crittenden
dd69c7dbe6 Make data type of certificates more obvious/predictable internally.
For the most part certificates will be treated as being in DER format.
When we load a certificate we will generally accept it in any format but
will convert it to DER before proceeding in normalize_certificate().

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

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

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

ticket 32
2011-06-21 19:09:50 -04:00
Rob Crittenden
1aee9df3bc Do lazy LDAP schema retrieval in json handler.
It was possible to get to this point without a schema if the first
handled request resulted in a Kerberos error.

https://fedorahosted.org/freeipa/ticket/1354
2011-06-21 16:40:07 -04:00
Adam Young
eeed975bc6 ipaddress for host add
updated label triggered an API change
2011-06-20 20:53:15 -04:00
Jan Cholasta
574d07be1f Improve IP address handling in the host-add command.
IP addresses are more strictly checked. Netmasks can be specified
and are used in DNS PTR record creation.

ticket 1234
2011-06-19 20:44:19 -04:00
Rob Crittenden
a2a3782efb Require an imported certificate's issuer to match our issuer.
The goal is to not import foreign certificates.

This caused a bunch of tests to fail because we had a hardcoded server
certificate. Instead a developer will need to run make-testcert to
create a server certificate generated by the local CA to test against.

ticket 1134
2011-06-16 19:27:17 -04:00
Jr Aquino
ed7a3e005a Don't add empty tuple to entry_attrs['externalhost']
https://fedorahosted.org/freeipa/ticket/1339
2011-06-16 19:22:15 -04:00
Jr Aquino
44cdf8ef54 Raise DuplicateEntry Error when adding a duplicate sudo option
https://fedorahosted.org/freeipa/ticket/1276
https://fedorahosted.org/freeipa/ticket/1277
https://fedorahosted.org/freeipa/ticket/1308

Added new Exception: AttrValueNotFound
Fixed XML Test for Sudorule remove_option
1276 (Raise AttrValueNotFound when trying to remove a non-existent option from Sudo rule)
1277 (Raise DuplicateEntry Error when adding a duplicate sudo option)
1308 (Make sudooption a required option for sudorule_remove_option)
2011-06-16 19:21:07 -04:00
Martin Kosek
0377123b19 Fix doc for sudorule runasuser commands
https://fedorahosted.org/freeipa/ticket/1324
2011-06-17 15:44:13 +02:00
Martin Kosek
04bc564e73 Missing krbprincipalname when uid is not set
When user_add command is executed without uid parameter filled, user
account is created without 'krbprincipalname' attribute. This renders
the user account unusable.

https://fedorahosted.org/freeipa/ticket/1279
2011-06-15 17:21:04 +02:00
Rob Crittenden
cbc5df4536 Return an error message when revocation reason 7 is used
7 is undefined as a revocation reason.

https://fedorahosted.org/freeipa/ticket/1318
2011-06-15 16:42:29 +02:00
Rob Crittenden
ae775ec169 Add message output summary to sudorule del, mod and find.
https://fedorahosted.org/freeipa/ticket/1255
2011-06-15 16:02:14 +02:00
Martin Kosek
613804083d Add a list of managed hosts
Enhance Host plugin to provide not only "Managed By" list but also
a list of managed hosts. The new list is generated only when --all
option is passed.

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

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

https://fedorahosted.org/freeipa/ticket/1261
2011-06-15 09:02:09 +02:00
Martin Kosek
058e3d0306 Add ignore lists to migrate-ds command
When user migrates users/groups from an old DS instance, the
migration may fail on unsupported object classes and/or
relevant LDAP object attributes.

This patch implements a support for object class and attribute
ignore lists that can be used to suppress these migration issues.

Additionally, a redundant "dev/null" file is removed from git repo
(originally added in 26b0e8fc98).

https://fedorahosted.org/freeipa/ticket/1266
2011-06-15 08:36:32 +02:00
Jr Aquino
6e5885d109 Display remaining external hosts when removing from sudorule
https://fedorahosted.org/freeipa/ticket/1269
https://fedorahosted.org/freeipa/ticket/1270
2011-06-14 00:04:08 -04:00
Rob Crittenden
bee4e6a85a Remove automountinformation as part of the DN for automount.
To support multiple direct maps we added description to the DN of
automount key entries. The downside of this is that to display a key
you had to know the information as well, which was rather pointless if
that is what you were trying to get.

So now both modes are supported. It will first look for just a key
in the description and fall back to including automountinformation
if it needs to.

Multiple direct maps are still supported and for those the info is
always required.

ticket 1229
2011-06-13 22:59:27 -04:00
Adam Young
6f1b62fb1a JSON marshalling list
Lists are sometimes marshalled as arrays.  Before, we assumed they were CSV strings.
2011-06-10 14:37:54 -04:00
Martin Kosek
6ee9480b7b Handle LDAP search references
LDAP search operation may return a search reference pointing to
an LDAP resource. As the framework does not handle search
references, skip these results to prevent result processing
failures.

Migrate operation crashed when the migrated DS contained search
references. Now, it correctly skips these records and prints the
failed references to user.

https://fedorahosted.org/freeipa/ticket/1209
2011-06-10 08:34:27 +02:00
Rob Crittenden
4ef8b58c26 Add UID, GID and e-mail to the user default attributes.
ticket https://fedorahosted.org/freeipa/ticket/1265
2011-06-08 23:30:11 +00:00
Martin Kosek
31bf405fe3 Localization fails for MaxArgumentError
When MaxArgumentError si raised, the string localized by ngettext
is not printed properly.

https://fedorahosted.org/freeipa/ticket/1148
2011-06-06 13:22:36 -04:00
Jr Aquino
d7c60205a6 Add sudorule and hbacrule to memberof and indirectmemberof attributes
Add Add tests for users, groups, hosts and hostgroups to verify membership

Update API to version 2.3

https://fedorahosted.org/freeipa/ticket/1170
2011-06-06 13:14:38 -04:00
Martin Kosek
585083c1d7 Improve interactive mode for DNS plugin
Interactive mode for commands manipulating with DNS records
(dnsrecord-add, dnsrecord-del) is not usable. This patch enhances
the server framework with new callback for interactive mode, which
can be used by commands to inject their own interactive handling.

The callback is then used to improve aforementioned commands'
interactive mode.

https://fedorahosted.org/freeipa/ticket/1018
2011-06-02 09:00:35 +02:00
Jan Cholasta
db78f36235 Honor netmask in DNS reverse zone setup.
ticket 910
2011-05-30 13:37:03 +02:00
Rob Crittenden
868d4e734e Do a lazy retrieval of the LDAP schema rather than at module load.
Attempt to retrieve the schema the first time it is needed rather than
when Apache is started. A global copy is cached for future requests
for performance reasons.

The schema will be retrieved once per Apache child process.

ticket 583
2011-05-30 09:16:30 +02:00
Rob Crittenden
e91aa64d4a Include the word 'member' with autogenerated optional member labels.
There were reports of confusion over what was being prompted for, hopefully
adding member will make things clearer.

ticket 1062
2011-05-27 13:54:31 -04:00
Rob Crittenden
9cc0754b71 Add option to limit the attributes allowed in an entry.
Kerberos ticket policy can update policy in a user entry. This allowed
set/addattr to be used to modify attributes outside of the ticket policy
perview, also bypassing all validation/normalization. Likewise the
ticket policy was updatable by the user plugin bypassing all validation.

Add two new LDAPObject values to control this behavior:

limit_object_classes: only attributes in these are allowed
disallow_object_classes: attributes in these are disallowed

By default both of these lists are empty so are skipped.

ticket 744
2011-05-27 13:51:37 -04:00
Rob Crittenden
ac23fa7e54 Fix migration to work between v2 servers and remove search/size limits.
Migration from a v2 server would fail because of our fake memberofindirect
attribute. This isn't in any objectclass so would cause entries to fail
to migrate. We can safely just remove it.

Also remove any limits on time/size when searching for entries on the
remote server. Otherwise only the number of entries configured in the
local IPA server can be migrated.

ticket 1124
2011-05-26 16:37:03 -04:00
Adam Young
1636d64926 automount UI
automount implemented using standard facets and containing_entity pkey generation

sample data fixtures for automount.

messages for automount and HBAC.

modified form of the search facet used to nest the automount entities

Add works for nested entities.  Delete works for all but keys.  Since the API for this is going to change, I'm not going to fix it pre-checkin.

All the places the PKEY prefix is needed uses a single function. Added breadcrumb trail into title.

update ipa_init sample data

add redirect logic for pages without pkeys.

add and delete link to appropriate entities for nested search facet.

Using on demand entities.  Fixed breadcrumbs.
2011-05-26 14:53:40 -04:00
Martin Kosek
dea578a357 A new flag to disable creation of UPG
Automatic creation may of User Private Groups (UPG) may not be
wanted at all times. This patch adds a new flag --noprivate to
ipa user-add command to disable it.

https://fedorahosted.org/freeipa/ticket/1131
2011-05-25 08:39:47 +02:00
Endi S. Dewata
2a4edbda4d Fixed adder dialog title.
The IPA.entity_builder has been fixed to use the correct title
for the entity's adder dialog.

Ticket #1239
2011-05-24 12:41:11 -04:00
Rob Crittenden
4027b12371 Test for forwarded Kerberos credentials cache in wsgi code.
We should more gracefully handle if the TGT has not been forwarded
than returning a 500 error.

Also catch and display KerberosErrors from ping() in the client better.

ticket 1101
2011-05-18 09:35:04 +02:00
Endi S. Dewata
a7f9814ab7 Read-only association facet.
The IPA.association_facet has been modified to take a read_only parameters.
If the parameter is set to true, the Enroll and Delete buttons will not be
shown. All facets under the memberindirect and memberofindirect facet groups
are marked as read-only.

Ticket #1030
2011-05-16 21:05:49 -04:00
Endi S. Dewata
f9a8d772e3 Customizable facet groups.
The IPA.entity has been modified to support customizable facet groups.
The default list of facet groups is defined in IPA.entity_header and can
be overriden in the entity definition.

Ticket #1219
2011-05-16 13:18:51 -04:00
Jan Cholasta
6c66d37655 Assume ipa help for plugins.
ticket 914
2011-05-13 13:25:34 -04:00
Martin Kosek
8d35089780 Limit passwd plugin to user container
Improve performance by specifying basedn to find_entry_by_attr()
function in ldap2 and passwd plugins.

https://fedorahosted.org/freeipa/ticket/1165
2011-05-12 16:22:06 -04:00
Jan Cholasta
3edb8ed545 Fix regressions introduced by pylint false positive fixes.
ticket 1198
2011-05-11 16:50:01 +02:00
Yuri Chornoivan
be0308cf68 Typos in freeIPA messages and man page
https://fedorahosted.org/freeipa/ticket/1128
2011-05-10 08:46:57 +02:00
Endi S. Dewata
a4aba826a0 Added facet container.
Facet container has been added to hold facet header (i.e. title,
search fields, buttons, links) and facet content. Each facet now
occupies separate container, so it can be shown/hidden without
having to redraw the content.
2011-05-05 14:57:45 -05:00
Jan Cholasta
7e0d4531c3 Several improvements of the lint script.
Report missing python packages, inform about false positives, fail
gracefully if pylint isn't installed. Fixed a bug in the ignore
list and added few more files/directories to it.

ticket 1184
2011-05-05 11:54:07 +02:00
Martin Kosek
7811200c62 pwpolicy-mod doesn't accept old attribute values
When the pwpolicy attribute "cospriority" is passed to pwpolicy-mod
command and the old value is kept, the command should succeed
if there was at least one other attribute changed. Current
pwpolicy-mod raises exception in this case which may lead to issues
in the WebUI.

https://fedorahosted.org/freeipa/ticket/1104
2011-04-29 09:27:52 +02:00
Rob Crittenden
d3b0c64fce Modify the default attributes shown in user-find to match the UI design.
This change means the UI can stop using the --all option and have to
retrieve significantly less information from the server. It also
speeds up user-find as it doesn't have to calculate membership.

This adds a new baseclass parameter, search_display_attributes, which
can provide a separate list from default_attributes just for find
commands.

The UI will need to be changed to switch from using cn to using
givenname and sn.

ticket 1136
2011-04-22 14:49:20 -04:00
Rob Crittenden
f746121824 Convert manager from userid to dn for storage and back for displaying.
ticket 1151
2011-04-22 14:49:20 -04:00
Martin Kosek
bc6f9accd9 Need force option in DNS zone adder dialog
When adding a new DNS zone in the WebUI, IPA server will verify
whether the nameserver is in DNS. Sometimes it is necessary to
skip the verification.

This patch adds a --force option already available in CLI which
can skip this the verification.

https://fedorahosted.org/freeipa/ticket/1105
2011-04-21 19:03:38 +00:00
Jan Cholasta
5700920627 Fix uninitialized attributes. 2011-04-21 10:41:29 +02:00
Rob Crittenden
ccde115421 Provide attributelevelrights for the aci components in permission_show.
Since the broken-out components are just part of the aci just copy right
access rights for aci.

ticket 943
2011-04-21 08:25:53 +02:00
Rob Crittenden
740416c8fb Always ask members in LDAP*ReverseMember commands.
This changes the API but alwaysask is enforced on the client only
so doesn't change the wire API so I'm not updating the API version.

ticket 1081
2011-04-15 13:12:16 +02:00
Endi S. Dewata
e3ec1fb7ef Entitlement registration.
The entitlement facet will show buttons according to the entitlement
status. If it's unregistered, the facet will show a Register button.
If it's registered, the facet will show a Consume button.
2011-04-14 23:05:09 +00:00
Rob Crittenden
9cac1d88fc Sort entries returned by *-find by the primary key (if any).
Do a server-side sort if there is a primary key.

Fix a couple of tests that were failing due to the new sorting.

ticket 794
2011-04-13 17:29:16 +02:00
Jan Cholasta
1ac3ed2c27 Fix lint false positives. 2011-04-13 15:58:45 +02:00
Jan Cholasta
b007233470 Fix double definition of output_for_cli. 2011-04-13 12:09:45 +02:00
Endi S. Dewata
9645d50912 Entitlements. 2011-04-11 16:04:12 +00:00
Martin Kosek
960e730f3e Improve DNS PTR record validation
Current PTR validation is unclear and may misled the user. This
patch improves the validation process so that the eventual exception
is clearer. New check that the PTR record is fully qualified has
been added to ensure that the reverse zone resolution behaves as
expected.

Additionally, several strings in the DNS plugin were prepared for
localization.

https://fedorahosted.org/freeipa/ticket/1129
2011-04-11 10:20:13 +02:00
Martin Kosek
6784ebe169 Password policy commands do not include cospriority
Most of the pwpolicy_* commands do include cospriority in the result
and potentially in the attribute rights (--all --rights). Especially
when --raw output is requested. This patch fixes it for all
pwpolicy commands.

https://fedorahosted.org/freeipa/ticket/1103
2011-04-11 10:20:07 +02:00
Rob Crittenden
316efbc32f postalCode should be a string not an integer.
postalCode is defined as an Int. This means you can't define one that has
a leading zero nor can you have dashes, letters, etc.

This changes the data type on the server. It will still accept an int
value if provided and convert it into a string.

Bump the API version to 2.1.

ticket 1150
2011-04-05 21:51:34 -04:00
Rob Crittenden
deaf029023 Change default gecos from uid to first and last name.
ticket 1146
2011-04-05 14:18:55 -04:00
Adam Young
dd2d9fc1c4 Fixed labels for sudo and hbac rules 2011-03-31 17:29:33 -04:00
Martin Kosek
e7fda0652d Inconsistent error message for duplicate user
When duplicate user is added an inconsistent error message to the rest
of the framework is printed. This patch changes this to standard
duplicate error message.

https://fedorahosted.org/freeipa/ticket/1116
2011-03-29 13:54:32 -04:00
Pavel Zuna
509c772f13 Fix gidnumber option of user-add command.
Ticket #1127
2011-03-29 13:45:40 -04:00
Martin Kosek
0693b67f20 Prevent stacktrace when DNS AAAA record is added
This patch fixes a stacktrace that is printed out when a IPv6
AAAA record with subnet prefix length (e.g. /64) is added.
The same error message as when IPv4 record with subnet prefix
length is used.

https://fedorahosted.org/freeipa/ticket/1115
2011-03-22 13:37:23 -04:00
Endi S. Dewata
ba5e0c4307 Removed nested role from UI.
Nested role is not supported in 2.0.x, so the association facet
for it should be removed from the UI. The attribute_members in
role.py needs to be fixed because it is used to generate the
association facet automatically.

Ticket 1092.
2011-03-18 16:52:10 -04:00
Rob Crittenden
4d0e739345 Fix style and grammatical issues in built-in command help.
There is a rather large API.txt change but it is only due to changes
in the doc string in parameters.

ticket 729
2011-03-04 11:09:43 -05:00
Adam Young
bd3e4990fe Better truncated message 2011-03-03 19:33:49 -05:00
Pavel Zuna
eb6b3c7afc Fix error in user plugin email normalizer for empty --setattr=email=.
ticket 1048
2011-03-03 14:01:22 -05:00
Adam Young
07c896e204 typo in truncation message 2011-03-03 17:12:40 -05:00
Endi S. Dewata
697af3e1f8 Save changes before modifying association.
In a details page, usually any changes done to the fields will not be
applied until the user clicks the Update button. However, if the page
contains an association table, any addition/deletion to the table will
be applied immediately.

To avoid any confusion, the user is now required to save or reset all
changes to the page before modifying the association. A dialog box will
appear if the page contains any unsaved changes.
2011-03-02 12:26:24 -05:00
Adam Young
3f88bc1484 Revert "Set hard limit on number of commands in batch request to 256."
This reverts commit 79d22f8341.
2011-03-01 17:35:56 -05:00
Rob Crittenden
07ba40f33e Use Sudo rather than SUDO as a label.
ticket 1005
2011-03-01 16:48:35 -05:00
Pavel Zuna
1eb3033311 Final i18n unit test fixes. 2011-03-01 10:31:43 -05:00
Pavel Zuna
fc842e3650 Use pygettext to generate translatable strings from plugin files.
This patch replaces xgettext with a custom pygettext to generate
translatable strings from plugin files in ipalib/plugins. pygettext
was modified to handle plural forms (credit goes to Jan Hendrik Goellner)
and had some bugs fixed by myself. We only use it for plugins, because
it's the only place where we need to extract docstrings for the built-in
help system.

I also had to make some changes to the way the built-in documentation
systems gets docstrings from modules for this to work.
2011-03-01 10:31:42 -05:00
Pavel Zuna
f3de95ce99 Fix translatable strings in ipalib plugins.
Needed for xgettext/pygettext processing.
2011-03-01 10:31:40 -05:00
Pavel Zuna
8145952752 Translate docstrings. 2011-03-01 10:31:39 -05:00
Pavel Zuna
bbc94034b0 Fallback to default locale (en_US) if env. setting is corrupt. 2011-03-01 10:31:37 -05:00
Pavel Zuna
bfca99b420 Send Accept-Language header over XML-RPC and translate on server.
Fix #904
Fix #917
2011-03-01 10:31:37 -05:00
Pavel Zuna
6eb70ea8e2 Remove deprecated i18n code from ipalib/request and all references to it.
Ticket #903
2011-03-01 10:31:36 -05:00
Rob Crittenden
d57dfc4e98 Sudo command groups are not supposed to allow nesting.
It was a design decision to not allow nesting sudo command groups,
remove it.

ticket 1004
2011-02-23 18:44:28 -05:00
Rob Crittenden
af9f905239 Collect memberof information for sudo commands.
We weren't searching the cn=sudo container so all members of a
sudocmdgroup looked indirect.

Add a label for sudo command groups.

Update the tests to include verifying that membership is done
properly.

ticket 1003
2011-02-23 18:44:23 -05:00
Jr Aquino
1770750b8a Create default disabled sudo bind user
Read access is denied to the sudo container for unauthenticated users.
This shared user can be used to provide authenticated access to the
sudo information.

https://fedorahosted.org/freeipa/ticket/998
2011-02-23 15:32:24 -05:00
Rob Crittenden
523eaa9749 Fix typo, add example for when user krbtpolicy takes effect.
ticket 594
2011-02-23 14:57:58 -05:00
Rob Crittenden
b5e43bb866 Make permission and privilege help text clearer
ticket 996
2011-02-23 11:57:10 -05:00
Adam Young
5eca488d6a Net group to Netgroup 2011-02-22 14:58:25 -05:00
Endi S. Dewata
39a00b496c I18n update for dialog box buttons.
https://fedorahosted.org/freeipa/ticket/899
2011-02-22 13:26:09 -05:00
Rob Crittenden
79d22f8341 Set hard limit on number of commands in batch request to 256.
ticket 984
2011-02-22 09:09:46 -05:00
Jakub Hrozek
6e7815a30e Validate NAPTR records
https://fedorahosted.org/freeipa/ticket/840
2011-02-22 09:08:11 -05:00
Endi S. Dewata
88870b1abe Fixed error message for invalid Kerberos ticket.
https://fedorahosted.org/freeipa/ticket/490
2011-02-21 15:53:00 -05:00
Rob Crittenden
2f82112bb3 Add handling for indirect memberof other entries.
This creates a new custom attribute, memberofindirect_[plugin].
Using this you can tell the difference between being an actual memberof
another entry and being a memberof as the result if inheritence. This is
particularly useful when trying to remove members of an entry, you can
only remove direct members.

I had to add a couple of short sleep calls to make things work a little
better. The memberof plugin runs as a postop and we have no way of knowing
when it has done its work. If we don't pause we may show some stale
data that memberof hasn't updated yet. .3 seconds is an arbitrary choice.

ticket 966
2011-02-21 11:21:23 -05:00
Jakub Hrozek
18be4ebec3 Better doc for idnssoaminimum 2011-02-18 15:36:07 -05:00
Jr Aquino
478186e485 Cleanup for netgroup search https://fedorahosted.org/freeipa/ticket/963 2011-02-18 10:32:35 -05:00
Endi S. Dewata
e245b6da9b Updated json_metadata and i18n_messages.
The json_metadata() has been updated to return ipa.Objects and
ipa.Methods. The i18n_messages() has been updated to include other
messages that are not available from the metadata.
2011-02-18 10:10:35 -05:00
Endi S. Dewata
fa75959486 Fixed parameter for user city.
Previously the user's city parameter is defined to use the 'locality'
attribute. This was a problem because the attribute would be returned
as 'l' by the directory server causing a mismatch. Now the parameter
has been changed to use the 'l' attribute.
2011-02-18 10:10:35 -05:00
Rob Crittenden
4211eee992 Special handling for nsaccountlock attribute in user.
nsaccountlock doesn't have a visible Param but we want do so
some basic validation to be sure garbage doesn't get in there so
do it in the pre_callback of add and mod.

ticket 968
2011-02-17 17:11:06 -05:00
Jan Zeleny
23234094c3 Validate that the reverse DNS record is correct
This patch ensures that PTR records added by FreeIPA are compliant with
RFC.

https://fedorahosted.org/freeipa/ticket/839
2011-02-17 16:08:50 -05:00
Jan Zeleny
2d97f4b335 Document the --rights output format
https://fedorahosted.org/freeipa/ticket/563
https://fedorahosted.org/freeipa/ticket/588
2011-02-17 16:05:14 -05:00
Jan Zeleny
27785b6794 Fixed user-add help
https://fedorahosted.org/freeipa/ticket/735
2011-02-17 16:05:14 -05:00
Rob Crittenden
86fe47b87d Don't allow host cn to be changed (it isn't used anyway).
We are required by LDAP schema to have a cn value. Don't let
users change it thinking they are actually doing something.

tickets 706 and 707
2011-02-16 22:19:12 -05:00
Martin Kosek
2f0e8e3a3d Service/Host disable command output clarification
When a service/host is disabled, the resulting summary message states
that a Kerberos key was disabled. However, Kerberos key may not have
been enabled before this command at all, which makes this information
confusing for some users. Also, the summary message didn't state
that an SSL certificate was disabled too.

This patch rather changes the summary message to a standard phrase
known from other plugins disable command and states all disable
command steps in a respective command help.

https://fedorahosted.org/freeipa/ticket/872
2011-02-16 22:14:43 -05:00
Jakub Hrozek
36070555d1 Validate and convert certificate SN
The cert plugin only worked OK with decimal certificate serial numbers.
This patch allows specifying the serial number in hexadecimal, too. The
conversion now works such that:
 * with no explicit radix, a best-effort conversion is done using int(str,
   0) in python. If the format is ambiguous, decimal takes precedence.
 * a hexadecimal radix can be specified explicitly with the traditional
   0x prefix

https://fedorahosted.org/freeipa/ticket/958
https://fedorahosted.org/freeipa/ticket/953
2011-02-16 22:04:44 -05:00
Jr Aquino
d781dbd045 17-2 Managed netgroups should be invisible https://fedorahosted.org/freeipa/ticket/963 2011-02-16 17:52:21 -05:00
Martin Kosek
e5d57d237b HBAC plugin inconsistent output
This patch adds a proper summary text to HBAC command which is
then printed out in CLI. Now, HBAC plugin output is consistent
with other plugins.

https://fedorahosted.org/freeipa/ticket/596
2011-02-16 10:39:16 -05:00
Jakub Hrozek
a9dc175bc5 Validate MX records
https://fedorahosted.org/freeipa/ticket/967
2011-02-16 09:56:29 -05:00
Rob Crittenden
c4206d6462 Fix typo in rewording of help for the user module.
I was too quick on the patch push and didn't see a nack on the wording.
2011-02-16 08:47:42 -05:00
Jan Zeleny
b249cb2427 Reword help for the user module
https://fedorahosted.org/freeipa/ticket/351
2011-02-16 08:41:00 -05:00
Endi S. Dewata
eb8f091c9b Fixed association facets.
The association config has been removed because it incorrectly assumes there is only one association between two entities. Now each association is defined separately using association facets.

The service.py has been modified to specify the correct relationships. The API.txt has been updated.

https://fedorahosted.org/freeipa/ticket/960
2011-02-15 17:45:46 -05:00
Rob Crittenden
f558ffe294 Fix service validator, ensure the service isn't blank.
ticket 961
2011-02-15 15:46:08 -05:00
Jan Zeleny
9c9a513664 Add group members to default output of sudorule-show
https://fedorahosted.org/freeipa/ticket/915
2011-02-15 14:44:27 -05:00
Pavel Zuna
fd0a6b4849 Fix setattr mail bug in user plugin.
The email normalizer expects a list or tuple, but when using setattr
it gets a string and interates on it as if it was a list/tuple.
2011-02-15 14:42:58 -05:00
Rob Crittenden
edcdd87bc8 A privilege cannot be a member of a permission, remove it from metadata
ticket 970
2011-02-15 13:39:49 -05:00
Rob Crittenden
dab452442d The --out option wasn't working at all with cert-show.
Also fix some related problems in write_certificate(), handle
either a DER or base64-formatted incoming certificate and don't
explode if the filename is None.

ticket 954
2011-02-14 16:43:48 -05:00
Rob Crittenden
0e4f0528cf Add missing import for netaddr
ticket 964
2011-02-14 16:22:29 -05:00
Jakub Hrozek
04597f4e36 Remove obsolete record types from DNS
https://fedorahosted.org/freeipa/ticket/923
2011-02-14 14:50:57 -05:00
Rob Crittenden
81020a2ffa A mod command should not be able to remove a required attribute.
Some attribute enforcement is done by schema, others should be done
by the required option in a Parameter. description, for example, is
required by many plugins but not the schema. We need to enforce in the
framework that required options are provided.

After all the setattr/addattr work is done run through the modifications
and ensure that no required values will be removed.

ticket 852
2011-02-14 14:46:29 -05:00
Jan Zeleny
25c5c43ed4 Changed dns permission types
Recent change of DNS module to version caused that dns object type
was replaced by dnszone and dnsrecord. This patch corrects dns types
in permissions class.

https://fedorahosted.org/freeipa/ticket/646
2011-02-14 11:32:03 -05:00
Jan Zeleny
da1fe966de Fixed type of argument in class help 2011-02-14 10:32:37 -05:00
Martin Kosek
34efc7bc24 Support of user default email domain
This patch fixes the default domain functionality for user email(s).
This setting may be configured via:

ipa config-mod --emaildomain=example.com

Then, when user is added/modified and --mail option is passed,
the default domain is appended if the passed attribute does not
contain another domain already.

https://fedorahosted.org/freeipa/ticket/598
2011-02-14 10:30:09 -05:00
Rob Crittenden
29706fb13b Add default success/failure output logging.
Request logging on the server only happened if you added verbose=True
or debug=True to the IPA config file. We should log the basics at
least: who, what, result.

Move a lot of entries from info to debug logging as well.

Related to ticket 873
2011-02-14 10:23:52 -05:00
Jakub Hrozek
284dd32040 Fix checking for arguments in DNS plugins
https://fedorahosted.org/freeipa/ticket/956
2011-02-14 10:21:27 -05:00
Rob Crittenden
3ac3130fc9 Convert json strings to unicode when they are unmarshalled.
This patch removes some individual work-arounds of converting strings
to unicode, they only masked the problem. String values are not
passed to the validator or normalizers so things like adding the
realm automatically to services weren't happening.

ticket 941
2011-02-11 13:36:15 -05:00
Jan Zeleny
978be50666 Provide a way to display CLI-LDAP relation
Since some LDAP attributes have their cli_name value defined,
so they can be more user friendly, it can be difficult for user to find
out which attributes do the parameteres given to CLI really represent.
This patch provides new command, which will take another IPA command as
and argument and display attributes which given command takes and what
LDAP attributes are they mapped to.

https://fedorahosted.org/freeipa/ticket/447
2011-02-10 15:11:26 -05:00
Rob Crittenden
c187b276ad Fix test failures caused by the performance patch.
It isn't safe to assume there is an environment or mode in any given
object. Only skip the extra work if the object explicitly has production
in it.
2011-02-10 13:52:29 -05:00