Commit Graph

4218 Commits

Author SHA1 Message Date
Rob Crittenden
e4b62d0529 Remove 389-ds upgrade state during uninstall
When we perform an upgrade 389-ds is set to listen only on its
ldapi port. Theoretically it should be restored to the previous
state regardless of whether the upgrades were successful or not.

To be sure that a subsequent re-install will be successful go ahead
and remove the state for these options. Think of it as wearing a
belt and suspenders. Otherwise a re-install could return an error
message that IPA is already configured.

https://fedorahosted.org/freeipa/ticket/1667
2011-08-25 20:52:46 -04:00
Rob Crittenden
de83684c75 Remove more 389-ds files/directories on uninstallation.
We were orphaning a few files/directories when uninstalling 389-instances
both for IPA and dogtag. This should remove everything but the logs.

ticket https://fedorahosted.org/freeipa/ticket/1700
2011-08-25 20:49:23 -04:00
Rob Crittenden
a750ccb5a2 Disable reverse lookups in ipa-join and ipa-getkeytab
This prevents broken DNS from causing enrollment problems.

https://fedorahosted.org/freeipa/ticket/1693
2011-08-25 20:38:11 -04:00
Endi S. Dewata
9dd689ff9d Fixed host keytab status after setting OTP.
The host details page has been modified to update the keytab status
based on the data returned by the host-mod command for setting OTP.

Ticket #1710
2011-08-26 15:19:22 +00: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
Simo Sorce
586e2eaf6c v3-schema: Add new ipaExternalGroup objectclass
This construct allows to have a group of ipaExternalMember attributes, that can
be nested in a normal ipa Group ('memberOf' is allowed).

It cannot contain normal ipa users/groups and cannot be nested with another
group of the same type ('member' is not allowed).
2011-08-26 08:26:13 -04:00
Simo Sorce
19cb08e579 schema: Split ipadns definitions from basev2 ones 2011-08-26 08:26:13 -04:00
Simo Sorce
dfa944da24 daemons: Remove ipa_kpasswd
Now that we have our own database we can properly enforce stricter constraints
on how the db can be changed. Stop shipping our own kpasswd daemon and instead
use the regular kadmin daemon.
2011-08-26 08:26:08 -04:00
Simo Sorce
a60a71497b install: Use proper case for boolean values 2011-08-26 08:24:50 -04:00
Simo Sorce
d8de2d1b7b ipa-kdb: Be flexible
Although the proper values for booleans from LDAP should be only uppercase,
389ds does allow wrong cased values without complaining. And we still have some
places where the wrong case is used.
Avoid getting frustrating errors when reading these values out.
2011-08-26 08:24:50 -04:00
Simo Sorce
8cb2aee626 install: Remove uid=kdc user
The ipadb DAL driver gets access to the ldap server as Directory Manager now so
this user is not needed anymore.
2011-08-26 08:24:50 -04:00
Simo Sorce
195a65d5c2 ipa-kdb: Change install to use the new ipa-kdb kdc backend
Use ipakdb instead of kldap and change install procedures accordingly
Note that we do not need to store the master key in a keytab as we can
read it off of ldap in our driver.
2011-08-26 08:24:50 -04:00
Simo Sorce
35e15f6c91 ipa-pwd-extop: Allow kadmin to set krb keys
Prevent the ipa-pwd-extop plugin from re-generating keys when kadimn is storing
a new set of keys. Only generate the userPassword and sambaXXPassword hashes.
Also avoid checking policies in this case and if history is provided avoid
regenerating the passwordHistory too.
2011-08-26 08:24:50 -04:00
Simo Sorce
0d048d7b49 ipa-kdb: add password policy support
Use default policy for new principals created by kadmin
2011-08-26 08:24:50 -04:00
Simo Sorce
7ea0b5d56e ipa-pwd-extop: Use common password policy code 2011-08-26 08:24:50 -04:00
Simo Sorce
a1637d47c0 util: add password policy manipulation functions 2011-08-26 08:24:49 -04:00
Simo Sorce
452fcdccdc ipa-kdb: implement change_pwd function 2011-08-26 08:24:49 -04:00
Simo Sorce
49c25dbdf5 ipa-kdb: implement function to retrieve password policies 2011-08-26 08:24:49 -04:00
Simo Sorce
0a4f7960b9 ipa-kdb: Get/Store Master Key directly from LDAP 2011-08-26 08:24:49 -04:00
Simo Sorce
e9e426354f ipa-kdb: add functions to change principals 2011-08-26 08:24:49 -04:00
Simo Sorce
d25370a579 ipa-kdb: add function to iterate over principals 2011-08-26 08:24:49 -04:00
Simo Sorce
2f8caeab48 ipa-kdb: add functions to delete principals 2011-08-26 08:24:49 -04:00
Simo Sorce
8d5c67a9f8 ipa-kdb: add function to free principals 2011-08-26 08:24:49 -04:00
Simo Sorce
abd424889b ipa-kdb: functions to get principal 2011-08-26 08:24:49 -04:00
Simo Sorce
46c803a08d ipa-kdb: add common utility ldap wrapper functions 2011-08-26 08:24:49 -04:00
Simo Sorce
b5ba0f7f48 ipa-kdb: implement get_time function 2011-08-26 08:24:49 -04:00
Simo Sorce
6e010fedaa ipa-kdb: initialize module functions
Initialize module also on ipadb_create invocation. This is what
kdb5_util expects.
2011-08-26 08:24:49 -04:00
Simo Sorce
579a159915 ipa-kdb: add exports file
limit exported symbols only to the ones actually needed by krb5kdc
2011-08-26 08:24:49 -04:00
Simo Sorce
bac6f2dd13 ipa-kdb: Initial plugin skeleton 2011-08-26 08:24:49 -04:00
Simo Sorce
7d41e7b4d4 ipa-pwd-extop: make encsalt parsing function common
It is going to be used by the ipa-kdb module too.
2011-08-26 08:24:49 -04:00
Simo Sorce
eed401306c ipa-pwd-extop: Move encoding in common too
Also to be used by ipa-kdb
2011-08-26 08:24:49 -04:00
Simo Sorce
4928229093 ipa-pwd-extop: Move encryption of keys in common
This way we can reuse the same code from ipa-kdb later
2011-08-26 08:24:49 -04:00
Simo Sorce
b4aab3d98d ipa-pwd-extop: Use common krb5 structs from kdb.h
This removes custom structures and allows easier sharing of code with ipa-kdb
2011-08-26 08:24:49 -04:00
Simo Sorce
672035cbba ipa-pwd-extop: re-indent code using old style 2011-08-26 08:24:49 -04:00
Simo Sorce
229b9a209c ipa-pwd-extop: Use the proper mkvno number in keys
Setting 0 will work as MIT KDCs assume the current master key when that is
found. But it is a legacy compatibility mode and we should instead set the
proper mkvno number on keys so changeing master key becomes possible w/o
having to do a dump reload and stopping the service. This is especially
important in replicated environments.
2011-08-26 08:24:49 -04:00
Simo Sorce
5746bbe92a ipa-pwd-extop: do not append mkvno to krbExtraData
mkvno is actually available as part of the key material.
There is no need to store it in the krbExtraData field as it is unused there.
2011-08-26 08:24:49 -04:00
Simo Sorce
d1cc660db2 ipa-pwd-extop: Remove unused variables and code to set them 2011-08-26 08:24:49 -04:00
Simo Sorce
f2c39b1a30 krbinstance: use helper function to get realm suffix 2011-08-26 08:24:49 -04:00
Simo Sorce
c42cf02405 ipa-pwd_extop: use endian.h instead of nih function 2011-08-26 08:24:48 -04:00
Simo Sorce
e261c55626 Fix build warnings
Some are actual bugs.
2011-08-26 08:24:48 -04: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
John Dennis
f4ad749126 ticket 1707 - add documentation validation to makeapi tool
Iterate over all API commands and perform the following validation:

* Every command must have documentation
  and it must be marked for international translation

* Every module hosting a command must have documentation
  and it must be marked for international translation

* Every module topic must be marked for international translation

For every error found emit a diagnostic.
Emit a summary of total errors found.

Return error flag if errors found, zero otherwise.
2011-08-24 23:03:48 -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
Petr Vobornik
50a898855c Modify serial associator to use batch
https://fedorahosted.org/freeipa/ticket/1688

The serial associator is used to execute a command multiple times with different parameters. This is used for adding/removing a user into/from multiple groups. It has some issues:

Each command is executed one-by-one, so it could be slow.
  * If there's a failure the rest of the commands will not be executed.
  * This can be fixed by putting the commands into a batch and execute them at once.
2011-08-25 15:57:00 +00:00
Endi S. Dewata
fcd927a126 Fixed default map type in automount map adder dialog.
The adder dialog for automount map has been modified to select the
direct map by default.

Ticket #1698
2011-08-25 13:57:08 +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
Rob Crittenden
a6b3309fe6 Add additional pam ftp services to HBAC, and a ftp HBAC service group
This adds proftpd, pure-ftpd, vsftpd and gssftp.

https://fedorahosted.org/freeipa/ticket/1703
2011-08-24 15:21:41 -04:00