Commit Graph

116 Commits

Author SHA1 Message Date
Rob Crittenden
2c3bca7e74 Remove deprecated comment on plugin naming conventions 2009-09-14 09:46:35 -04:00
Pavel Zuna
356375ef18 Make ldap2.add_entry proof to None values, because python-ldap hate'em. 2009-09-08 13:38:25 -04:00
Martin Nagy
205a41205b Add A and PTR records of ourselves during installation
If the DNS zones already exist but don't contain our own records, add
them. This patch introduces the ipalib.api into the installers. For now,
the code is still little messy. Later patches will abandon the way we
create zones now and use ipalib.api exclusively.
2009-09-02 22:04:25 +02:00
Martin Nagy
4e5a68397a Use DNS forwarders in /etc/named.conf
This patch adds options --forwarder and --no-forwarders. At least one of
them must be used if you are doing a setup with DNS server. They are
also mutually exclusive. The --forwarder option can be used more than
once to specify more servers. If the installer runs in interactive mode,
it will prompt the user if none of these option was given at the command
line.
2009-09-02 19:09:28 +02:00
Pavel Zuna
91d01a532a Introduce a list of attributes for which only MOD_REPLACE operations are generated. 2009-08-28 13:18:21 -04:00
Rob Crittenden
38ae093c7b Add the CA constraint to the self-signed CA we generate
514027
2009-08-27 16:49:09 -04:00
Rob Crittenden
559c76f761 Add option to the installer for uid/gid starting numbers.
This also adds a new option to the template system. If you include
eval(string) in a file that goes through the templater then the
string in the eval will be evaluated by the Python interpreter. This is
used so one can do $UIDSTART+1. If any errors occur during the evaluation
the original string is is returned, eval() and all so it is up to the
developer to make sure the evaluation passes.

The default value for uid and gid is now a random value between
1,000,000 and (2^31 - 1,000,000)
2009-08-27 14:15:26 -04:00
Rob Crittenden
cab5525076 Enable ldapi connections in the management framework.
If you don't want to use ldapi then you can remove the ldap_uri setting
in /etc/ipa/default.conf. The default for the framework is to use
ldap://localhost:389/
2009-08-27 13:36:58 -04:00
Rob Crittenden
08fc563212 Generate CRLs and make them available from the IPA web server 2009-08-26 09:51:19 -04:00
Rob Crittenden
d9c54cd83e Clean up additional issues discovered with pylint and pychecker 2009-08-20 09:20:56 -04:00
Rob Crittenden
8780751330 Clean up some problems discovered with pylint and pychecker
Much of this is formatting to make pylint happy but it also fixes some
real bugs.
2009-08-12 13:18:15 -04:00
Pavel Zuna
b4d173d844 Fix bug in _get_syntax (it was always returning None).
Also prevent a few cases of double processing of arguments.
2009-08-03 23:01:44 -06:00
Jason Gerard DeRose
03a80f512c Fixed whitespace indentation error in certs.py 2009-07-27 19:23:31 -06:00
Rob Crittenden
5bbe1108d5 Identify CAs to trust from an imported PKCS#12 file
We used to use certutil -O to determine the cert chain to trust. This
behavior changed in F-11 such that untrusted CAs are not displayed.
This is only used when we import PKCS#12 files so use pk12util -l to
display the list of certs and keys in the file to determine the nickname(s)
of the CAs to trust.

509111
2009-07-27 16:04:53 -06:00
Rob Crittenden
5767c6b37d Fix deprecation warning for the sha library on Python 2.6
sha has been replaced by hashlib. We need to support Python 2.4 - 2.6 so
this will use hashlib if available but fall back onto sha if not.
Fortunately they use the same API for the function we need.

509042

Signed-off-by: Jason Gerard DeRose <jderose@redhat.com>
2009-07-23 20:03:01 -06:00
Rob Crittenden
b382755fee No need to trust NSS built-in CA's, more specific regex for finding CA nickname
- Add some logging so we have a better idea of what happened if things fail
- Default to self-signed CA to trust if one is not found. This will fix
  the self-signed CA case where certutil doesn't return untrusted CA's in
  -O output.
- Remove unused httplib import

Signed-off-by: Jason Gerard DeRose <jderose@redhat.com>
2009-07-23 13:45:45 -06:00
Martin Nagy
de53d0a26e Make --setup-dns work on replica installation
The ipa-replica-install script will setup the DNS if user specifies the
--setup-dns option. It will only add the zone into LDAP if the
cn=dns,$SUFFIX container doesn't exist. For now, however, we do not add
the records.
2009-07-22 18:02:22 +02:00
Martin Nagy
a09d2c3498 Add a reverse zone with server's PTR record
Also, small cosmetic change in dns.ldif.
2009-07-22 18:02:22 +02:00
Rob Crittenden
8d164569d0 Allow replicas of an IPA server using an internal dogtag server as the CA
This involves creating a new CA instance on the replica and using pkisilent
to create a clone of the master CA.

Also generally fixes IPA to work with the latest dogtag SVN tip. A lot of
changes to ports and configuration have been done recently.
2009-07-15 09:00:01 -04:00
Simo Sorce
9fe707a3f2 Basic changes to get a default principal for DNS
Also moves delagation layout installation in dsinstance.
This is needed to allow us to set default membership in
other modules like bindinstance.

Signed-off-by: Martin Nagy <mnagy@redhat.com>
2009-07-10 09:42:22 -04:00
Pavel Zuna
3b613091bb Import explode_dn from ldap.functions for backward compatibility with older version of python-ldap. Fix bug in add_entry_to_group.
Resolves 510149
2009-07-08 12:15:58 -04:00
Rob Crittenden
45a40635bb Add class variable to indicate whether SSL is required or not.
Older python-ldap versions will crash if you call ldap.get_option()
on a value that has not been set.
2009-07-07 22:57:23 -04:00
Pavel Zuna
f59cab1ccd Fix bug in ldap2.modify_password and make adding/removing members slightly more efficient. 2009-07-07 22:56:56 -04:00
Pavel Zuna
79ac9c6c78 Add conversion of attribute name synonyms when generating modlists. 2009-06-15 13:11:44 -04:00
Pavel Zuna
ad54fc3399 Add support for incomplete (truncated) search results.
ldap2.find_entries now returns a tuple containing 2 values. First,
a list of entries (dn, entry_attrs), Second, the truncated flag. If
the truncated flag is True, search results hit a server limitation
and are incomplete.

This patch also removes decoding of non-string scalar python types into
unicode (they are left unchanged).
2009-06-15 11:18:55 -04:00
Pavel Zuna
6e84f08143 Fix bugs in ldap2. 2009-06-12 15:10:57 -04:00
Pavel Zuna
87bfd6b21a Fix bug in ldap2.normalize_dn.
DN was always returned as lower-case, sometimes resulting in 2 RDN values with different cases when creating entries.
2009-06-10 11:51:15 -04:00
Martin Nagy
1bc786e379 Use LDAP instead of flat file for zone storage 2009-06-02 12:32:01 +02:00
Martin Nagy
d1b3f39258 Move the __ldap_mod function to the Service class
We were duplicating it for KrbInstance and DsInstance. Since we will
also need it for BindInstance as well, it will be better if it is in the
Service class instead.
2009-06-02 12:30:59 +02:00
Pavel Zuna
85bc20b0df Make it easier to search for a single entry by attribute value (find_entry_by_attr). Fix minor search filter generation issues. 2009-05-26 13:40:46 -04:00
Pavel Zuna
708fe4dfe5 Make ldap2 always return attribute names as lowercase. Add Encoder to ldap2 base classes and use encode_args/decode_retval where applicable. 2009-05-22 15:58:00 -06:00
Rob Crittenden
762d38a734 Fix password setting on python 2.4 systems (it doesn't like None for oldpw) 2009-05-21 22:43:10 -04:00
Rob Crittenden
e5bec4ae39 Schema change so the nisnetgroup triples work properly.
If we use cn for hostname there is no easy way to distinguish between
a host and a hostgroup. So adding a fqdn attribute to be used to store
the hostname instead.
2009-05-19 09:54:17 -04:00
Rob Crittenden
7ac2b8ae45 Use the csv module instead of my own hackish lexer.
The first character in a line is used to determine how the line will be
quoted. If it begins with no quote we use '. If it begins with either
' or " we use that character. So if you have a quoted string and you don't
want it to be considered a comma-separated value put the other quote string
around the whole block.
2009-05-19 09:49:01 -04:00
Rob Crittenden
9147f0da69 Don't pass non-existent arguments to _handle_errors() 2009-05-19 09:48:35 -04:00
Rob Crittenden
252e9b61eb Fix a comment and some typos 2009-05-13 14:18:01 -04:00
Rob Crittenden
f06bb4fca7 Drop the binary subtype. This usage is deprecated according to Rich M. 2009-05-13 14:17:31 -04:00
Rob Crittenden
1c31b5bc08 Add a reason to the NotFound exception so we can provide more robust errors 2009-05-13 14:16:44 -04:00
Rob Crittenden
064240def3 Fix replica installation for self-signed CA (no dogtag) 2009-05-04 17:42:03 -04:00
Rob Crittenden
0dfb451c3f Utilize the new dogtag library for retrieving the CA cert chain 2009-05-04 16:58:28 -04:00
Rob Crittenden
dfe9db5548 Add signing profile to CA installation so we can sign the firefox jar file.
Use the requestId we get back from the CA when requesting the RA agent cert
and use that to issue the certificate rather than hardcoding 7.

This also adds some clean-up of file permissions and leaking fds
2009-05-04 16:54:42 -04:00
Pavel Zuna
8eabf068fb Make search filter generation a bit safer. Minor bug fixes/code improvements. 2009-04-30 16:17:44 -04:00
Pavel Zuna
24790748fe Add method to generate DN from attribute directly, without making RDN first. 2009-04-30 13:27:49 -04:00
Rob Crittenden
b7438c3da2 Use XML rather than string routines to handle response from dogtag Remove trailing CR/LF from the password file 2009-04-28 17:16:18 -04:00
Pavel Zuna
7d0bd4b895 Rename errors2.py to errors.py. Modify all affected files. 2009-04-23 10:29:14 -04:00
Pavel Zuna
5fa7c76f72 Fix filter generator in ldapapi. Shouldn't produce invalid filters anymore. 2009-04-23 10:23:28 -04:00
Pavel Zuna
32ad0ab011 Throw AlreadyGroupMember instead of EmptyModlist when trying to re-add member to a group. 2009-04-22 15:18:51 -04:00
Pavel Zuna
9943b80841 Change ldap2.__handle_errors into the global _handle_errors function. 2009-04-22 15:17:32 -04:00
Pavel Zuna
58c10898c7 Make it possible to construct partial match filters using make_filter_* methods. Add missing _sasl_auth variable. 2009-04-22 15:17:28 -04:00
Rob Crittenden
cf8ed7b77a Convert the RA plugin to use nsslib and remove the configure methods 2009-04-20 14:01:24 -04:00