Commit Graph

1730 Commits

Author SHA1 Message Date
Endi Sukma Dewata
c1d0f72c20 Fixed I18n labels for HBAC Test
Hard-coded labels in HBAC Test have been moved into internal.py to
allow translation.

Ticket #388
2011-12-07 15:33:38 +00:00
Endi S. Dewata
8f642bbe08 Added commands into metadata.
The json_metadata command has been modified to accept some new
options and return the commands metadata. The API.txt has been
updated as well. The UI has been modified to use commands metadata
instead of methods metadata.

Ticket #388
2011-12-06 22:07:35 +00:00
Rob Crittenden
181e6da9d8 Mark some attributes required to match the schema.
This makes no changes to the functionality in the command-line or
GUI because these all have defaults anyway. This is mostly to show
them properly in the UI and prevent someone from trying to erase the
value (and getting a nasty schema error in response).

https://fedorahosted.org/freeipa/ticket/2015
2011-12-05 22:29:02 -05:00
Ondrej Hamada
8956fdbf40 Sort password policy by priority
'ipa pwpolicy-find' output is now sorted by priority of the policies.
Lower position means lower priority. Global policy is then at the bottom.

The changes has also affected LDAPSearch class in baseldap.py:
LDAPSearch class sorts the search results by primary key be default
(which is usually 'cn'). Therefor a function pointer entries_sortfn
was added. If no sorting function exists, default sorting by primary key
is used.

Sorting function had to be introduced due to the fact that pwpolicy's
primary key is also it's 'cn' and global policy is not allowed to have any
priority.

https://fedorahosted.org/freeipa/ticket/2045
2011-12-01 18:04:30 -05:00
Martin Kosek
f66fa48bb7 Fix config migration option
Make sure that --enable-migration in config plugin works correctly
and user can use to both enable and disable migration.

https://fedorahosted.org/freeipa/ticket/2150
2011-11-30 23:41:48 -05:00
John Dennis
167813f343 Restore default log level in server to INFO
The default log level for server messages captured by httpd's
error_log historically was INFO. The log_manager patch had it set to
ERROR, this patch resets it back to INFO.

Although it would have been trival to set the default_level to INFO in
IPALogManager.configure_from_env() that is not logically the correct
place. It would be much better if the default_level can be reset by
simply assigning it to the log_mgr. To accomplish that
LogManager.default_level was converted to a property with a getter and
setter. The setter runs LogManager.apply_configuratin() after the
default_level is modified. LogManager.set_default_level() was also
added to allow simultaneously updating the configure_state.

While testing some minor problems were observed and also fixed:

* Removed some print statement which had been left in by mistake

* Removed the ability to set the handler level in the config file
  because of chicken-and-egg issues of when handlers get created.
  The Env config file format is too inflexible to support detailed
  logging configuration. If the Env config format is ever made more
  flexible we can come back and add this back in. The handler config
  setting in Env had never been used and never worked so there is no
  issue in removing it.
2011-12-01 08:34:02 +01:00
Jan Cholasta
135ccf89de Parse comma-separated lists of values in all parameter types. This can be enabled for a specific parameter by setting the "csv" option to True.
Remove "List" parameter type and replace all occurences of it with appropriate
multi-valued parameter ("Str" in most cases) with csv enabled.

Add new parameter type "Any", capable of holding values of any type. This is
needed by the "batch" command, as "Str" is not suitable type for the "methods"
parameter.

ticket 2007
2011-11-30 17:08:35 +01:00
Martin Kosek
6d97444620 Change default DNS zone manager to hostmaster
Change our default zone manager to hostmaster@<domain> (as per
RFC 2142 recommendation).

https://fedorahosted.org/freeipa/ticket/1981
2011-11-29 17:16:32 +01:00
Martin Kosek
3f0eb1417c Improve zonemgr validator and normalizer
The validator has been improved to support better both SOA format
(e-mail address in a domain name format, without '@') and standard
e-mail format. Allow '\.' character in a SOA format encoding the
standard '.' in the local-part of an e-mail. Normalization code
has been moved to one common function.

https://fedorahosted.org/freeipa/ticket/2053
2011-11-29 17:14:28 +01:00
Martin Kosek
1b0b9645d1 Add --delattr option to complement --setattr/--addattr
Add a --delattr option to round out multi-valued attribute
manipulation. The new option is available for all LDAPUpdate based
commands. --delattr is evaluated last, it can remove any value
present either in --addattr/--setattr option or in current LDAP
object.

--*attr processing was completely refactored and placed to one
independent function available for all baseldap commands. For this
purpose a missing common base class for all baseldap commands has
been implemented. The new class should serve not only for --*attr
processing but also for other common baseldap methods and
attributes.

This approach will also benefit other custom commands based neither
on LDAPCreate nor LDAPUpdate. They can easily integrate --*attr
option processing when needed.

https://fedorahosted.org/freeipa/ticket/1929
2011-11-29 10:08:28 +01:00
Rob Crittenden
2f4b3972a0 Add plugin framework to LDAP updates.
There are two reasons for the plugin framework:
1. To provide a way of doing manual/complex LDAP changes without having
   to keep extending ldapupdate.py (like we did with managed entries).
2. Allows for better control of restarts.

There are two types of plugins, preop and postop. A preop plugin runs
before any file-based updates are loaded. A postop plugin runs after
all file-based updates are applied.

A preop plugin may update LDAP directly or craft update entries to be
applied with the file-based updates.

Either a preop or postop plugin may attempt to restart the dirsrv instance.
The instance is only restartable if ipa-ldap-updater is being executed
as root. A warning is printed if a restart is requested for a non-root
user.

Plugins are not executed by default. This is so we can use ldapupdate
to apply simple updates in commands like ipa-nis-manage.

https://fedorahosted.org/freeipa/ticket/1789
https://fedorahosted.org/freeipa/ticket/1790
https://fedorahosted.org/freeipa/ticket/2032
2011-11-22 23:57:10 -05:00
John Dennis
56401c1abe ticket 2022 - modify codebase to utilize IPALogManager, obsoletes logging
change default_logger_level to debug in configure_standard_logging

add new ipa_log_manager module, move log_mgr there, also export
root_logger from log_mgr.

change all log_manager imports to ipa_log_manager and change
log_manager.root_logger to root_logger.

add missing import for parse_log_level()
2011-11-23 09:36:18 +01:00
Jan Cholasta
e7a6d10555 Finalize plugin initialization on demand.
This patch changes the way plugins are initialized. Instead of
finalizing all the plugins at once, plugins are finalized only after
they are accessed (currently applies to Command, Object and
Attribute subclasses, only in CLI by default).

This change provides significant performance boost, as only the
plugins that are actually used are finalized.

ticket 1336
2011-11-22 00:52:24 -05:00
Rob Crittenden
06a9b7d9af Clarify usage of --posix argument in group plugin.
Contributed by Jérôme Fenal
2011-11-16 18:42:40 -05:00
Martin Kosek
151001ac48 Let PublicError accept Gettext objects
Make sure that PublicError does not crash when it receives
Gettext/NGettext object. Instead of throwing a type error, do the
translation to receive the required unicode text.

https://fedorahosted.org/freeipa/ticket/2096
2011-11-16 10:59:55 +01:00
Martin Kosek
2a3a4ae64a Fix LDAP object parameter encoding
Parameters in LDAP objects missed an information if they are real
LDAP attributes or not. Real LDAP attributes are written to
entry_attrs dictionary in plugin callbacks and are being encoded.
This causes issues when plugin callbacks does not expect that
the parameters values are already encoded for submission to LDAP.

This patch introduces a new flag "noattribute" used to mark that
a parameter is not an LDAP attribute and thus should not be encoded
or added to entry_attrs. Param documentation is improved to describe
the meaning of this and other Param flags or attributes.

https://fedorahosted.org/freeipa/ticket/2097
2011-11-15 13:17:44 +01:00
Endi S. Dewata
d6d24be289 Refactored permission target section.
The permission target section has been modified to use widgets
to create the target selection and handle multiple fields.

Ticket #2098
2011-11-14 16:47:08 -05:00
Martin Kosek
62c110a3b8 Polish ipa config help
Remove config-mod options help from config module help to keep the
option doc on one place and without unnecessary redundancy. The new
format is more consistent with the rest of the plugins. Also fix
several inconsistencies in the labels/doc, including:
- using abbreviation when not needed
- using '.' at the end of options help

https://fedorahosted.org/freeipa/ticket/1906
2011-11-10 20:18:40 -05:00
Rob Crittenden
6d9944cb93 Fix copy/paste error in parameter description.
Contributed by Jérôme Fenal
2011-11-10 19:53:21 -05:00
Martin Kosek
efc3e2c1f7 Improve DNS record data validation
Implement missing validators for DNS RR types so that we can capture
at least basic user errors. Additionally, a normalizer creating
a fully-qualified domain name has been implemented for several RRs
where name server may mis-interpret the domain name otherwise.

Unit tests exercising these new validators for the most common
RR types have been added. This patch also consolidates hard-coded
values in DNS test to one place.

https://fedorahosted.org/freeipa/ticket/1106
2011-11-10 18:48:41 -05:00
Ondrej Hamada
8089f2859c Misleading Keytab field
The 'Keytab' field in output of all 'user-*' commands was changed
to 'Kerberos keys available'. In order to do this change for 'user-*'
commands only, the flag 'has_keytab' had to be removed from common
output parametrs in ipalib/baseldap.py. This change also affected the
host.py and service.py, where the 'has_keytab' flag was added to their
local output params. Both host.py and service.py holds the old field
caption - 'Keytab' - because of compatibility with older clients.

https://fedorahosted.org/freeipa/ticket/1961
2011-11-10 14:11:02 +01:00
Martin Kosek
843c0787b7 Fix DNS zone --allow-dynupdate option behavior
--allow-dynupdate was implemented as a Flag parameter type, which
is not convenient for LDAP attributes. When a DNS zone with
permitted dynamic updates was modified and the --allow-dynupdate
flag was not set, dynamic updates were turned off.

This patch changes the option type to Bool parameter type which
behaves according to user expectations when modifying the zone.

https://fedorahosted.org/freeipa/ticket/2039
2011-11-09 15:31:50 +01:00
Martin Kosek
b5c049ae2e Allow custom server backend encoding
Server framework does not support encoding of native Python type
values stored in Param classes and sub-classes. When backend (LDAP)
value encoding differs from Python type value representation user
has to has to hard-code the encoders in his processing.

This patch introduces a method Param.encode which is used in server
context to encode native Python Param values. The new encode method
is used for Bool parameter to convert native Python bool type value
(True, False) to LDAP value ("TRUE", "FALSE").

https://fedorahosted.org/freeipa/ticket/2039
2011-11-09 15:31:19 +01:00
Rob Crittenden
b68ce0313c Don't allow default objectclass list to be empty.
https://fedorahosted.org/freeipa/ticket/1945
2011-11-09 08:50:17 +01:00
Endi S. Dewata
2eb6414372 Added current password field.
The reset password dialog for user has been modified to provide
a field to specify the current password when changing the user's
own password.

Ticket #2065
2011-11-07 14:18:25 +01:00
Martin Kosek
a486f49a37 Create pkey-only option for find commands
New option --pkey-only is available for all LDAPSearch based classes
with primary key visible in the output. This option makes LDAPSearch
commands search for primary attribute only.

This may be useful when manipulating large data sets. User can at
first retrieve all primary keys in a relatively small data package
and then run further commands with retrieved primary keys.

https://fedorahosted.org/freeipa/ticket/1262
2011-10-27 14:17:51 +00:00
Endi S. Dewata
6af5755de5 Fixed "enroll" labels.
Labels using the word "enroll" (except for host enrollment) have
been modified to use more relevant words.

The IPA.add_dialog has been renamed into IPA.entity_adder_dialog
for clarity.

Ticket #1642
2011-10-27 13:47:45 +00:00
Endi S. Dewata
f168afbeb6 Removed HBAC deny rule warning.
The HBAC deny rule is no longer supported so it's no longer necessary
to show the warning.

Ticket #1444
2011-10-26 12:53:28 +00:00
Martin Kosek
b26d0dcc04 Add --zonemgr/--admin-mail validator
Do at least a basic validation of DNS zone manager mail address.

Do not require '@' to be in the mail address as the SOA record
stores this value without it and people may be used to configure
it that way. '@' is always removed by the installer/dns plugin before
the DNS zone is created.

https://fedorahosted.org/freeipa/ticket/1966
2011-10-26 08:52:50 +02:00
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