Commit Graph
100 Commits
Author SHA1 Message Date
Rob Crittenden aafdb755a3 Install the ldapi ldif file 2009-08-28 08:46:54 -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 7a7041045e Fix service_mod and add a test case 2009-08-26 09:51:15 -04:00
Rob Crittenden dacfddfdc8 Remove Python 2.6 BaseException.message deprecation warning 2009-08-20 15:16:52 -06: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
Rob Crittenden c781e8a57d Add a new objectclass, ipaObject, that will add a UUID to many IPA objects
ipaObject is defined as an auxiliary objectclass so it is up to the
plugin author to ensure that the objectclass is included an a UUID generated.
ipaUniqueId is a MUST attribute so if you include the objectclass you must
ensure that the uuid is generated.

This also fixes up some unrelated unit test failures.
2009-08-10 16:38:42 -06:00
Rob Crittenden dbeb409ebd Include schema for key escrow management
https://fedoraproject.org/wiki/Disk_encryption_key_escrow_in_IPA
2009-08-10 16:38:18 -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
rcrit a9f70edb87 Add conditional for new SELinux capabilities available in Fedora 11 2009-07-23 14:59:20 -04: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
Rob Crittenden 904e555404 Catch and handle HTTP exceptions (like 401, 404, etc) 2009-07-15 08:59:58 -04:00
Rob Crittenden c0b6a78040 Require a password only once when it is passed in via a pipe 2009-07-10 16:47:35 -04:00
Rob Crittenden d6e1e15fcd Add a one-character option for parameters 2009-07-10 16:46:34 -04:00
Rob Crittenden c21e003cdf Let anonymous users browse the VLV index
This is needed for automount support on Solaris

http://docs.sun.com/app/docs/doc/819-5201/6n7a588i7?l=en&a=view
2009-07-10 16:45:45 -04:00
Rob Crittenden fe84ffd0f1 Add a return value to exceptions.
Returning the exception value doesn't work because a shell return value
is in the range of 0-255.

The default return value is 1 which means "something went wrong." The only
specific return value implemented so far is 2 which is "not found".
2009-07-10 16:44:54 -04:00
Rob Crittenden 0e29dd7226 Add textui function to display and prompt user for selection for *-find.
Since we may end up executing a *-show when an entry is selected we need
to defer destroying the connection context.
2009-07-10 16:44:22 -04:00
Rob Crittenden e31d5fb1cf Implement support for non-LDAP-based actions that use the LDAP ACI subsystem.
There are some operations, like those for the certificate system, that
don't need to write to the directory server. So instead we have an entry
that we test against to determine whether the operation is allowed or not.

This is done by attempting a write on the entry. If it would succeed then
permission is granted. If not then denied. The write we attempt is actually
invalid so the write itself will fail but the attempt will fail first if
access is not permitted, so we can distinguish between the two without
polluting the entry.
2009-07-10 16:41:05 -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
Rob Crittenden ac2970e52f Add unit test for password plugin 2009-07-07 22:56:45 -04:00
rcrit 9352d2fc10 Add a local implementation of httplib.SSLFile and httplib.FakeSocket
Python 2.6 changed its internal implementation which makes it difficult
to override in a way that is backwards compatible.

508953
2009-07-01 08:51:23 -04:00
rcrit 79029e8179 Fix configure with newer auto* and libtool on Fedora-11 2009-07-01 08:51:18 -04:00
Rob Crittenden e46fd3401e Two new arguments for the help built-in command: topics and commands
ipa help topics will show all topics (equivalent to ipa help)
ipa help commands will show list of all available commands
2009-06-15 14:03:12 -04:00
Rob Crittenden b83badd73b Fix typo in variable name, object_classs->object_class 2009-06-15 13:55:58 -04:00
Rob Crittenden 16f19990ae Fix plugin API errors 2009-06-03 09:49:14 -04:00
Rob Crittenden 3e8aac875f Fix the help text 2009-06-03 09:46:42 -04:00
Rob Crittenden e396cc26bf Add memberOf as a MAY to ipaHost
499731
2009-05-26 14:26:49 -04:00
Rob Crittenden 0353be6810 Dogtag keeps telling me to use port 9444 and not 9443, use it. 2009-05-26 14:25:52 -04: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 cac8ebb866 Fix typo, occured -> occurred 2009-05-21 22:43:07 -04:00
Rob Crittenden b1e1188ccc Move ipalib to the ipa-python subpackage and bump up min version of slapi-nis. 2009-05-21 15:37:22 -06:00
Rob Crittenden 067b5c122c Add a format to the generic KerberosError class 2009-05-21 15:37:12 -06:00
Rob Crittenden 13696ae18b Raise an exception if the certificate chain is not returned from the CA 2009-05-21 17:34:00 -04:00
Rob Crittenden 7da22cf8c7 Enable the portmap or rpcbind service if the NIS service is enabled 2009-05-21 14:51:04 -06:00
Rob Crittenden fe012f4ff2 Fix a few issues introduced by the new Param.use_in_context() patch 2009-05-21 14:33:23 -04:00
Rob Crittenden 86472a94ee Fix quoting to work with new csv handler in ldapupdate 2009-05-19 11:50:39 -06: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 7ef34b8cda Own the Apache configuration files that ipa-server-install creates 2009-05-19 09:53:57 -04:00
Rob Crittenden 2d0624cff5 Add schema-compat translation from our netgroup schema to nisNetgroup triples 2009-05-19 09:53:40 -04:00
Rob Crittenden 4376ad0b10 Add taskgroup and ACI for writing host principal keys (so ipa-getkeytab works) 2009-05-19 09:52:21 -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 5e3cdb9643 Remove all services when a host is removed Revoke certificate (if any) when a service is removed 2009-05-13 14:17:21 -04:00
Rob Crittenden 014f3ff1c6 Improve revocation_reason argument 2009-05-13 14:17:03 -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 de88954b91 New tool to enable/disable DS plugin to act as NIS server 2009-05-13 14:09:56 -04:00
Rob Crittenden a2c99b0360 Bump version to 2.0.0pre1 2009-05-11 16:26:55 -04:00
Rob Crittenden 1dd85475fc Added Rob's 'srpms' make target 2009-05-11 15:38:07 -04:00
Rob Crittenden 7ab9c3363f Add missing attribute to fix netgroups test 2009-05-07 10:54:32 -04:00
Rob Crittenden 0d6aaef2e1 We decided not to issue a certificate on join 2009-05-07 10:54:21 -04:00
Rob Crittenden 8f1df0fe8a Store the new certificate in a service record. Clean up some argument names to match the current standard. 2009-05-07 10:54:14 -04:00
Rob Crittenden 0d538b20f2 Make MalformedServicePrincipal take a reason arg and add Base64DecodeError 2009-05-06 11:29:11 -04:00
Rob Crittenden 5405c01025 Add validator and normalizer for service principals Add --certificate argument Update default objectclasses Use the crud.Search method for service-find 2009-05-06 11:28:49 -04:00
Rob Crittenden 82223f3ed1 Fix breakage on python 2.4 with missing object subclass 2009-05-05 14:05:40 -04:00
Rob Crittenden c0020955a5 Some minor cosmetic changes 2009-05-04 18:01:06 -04:00
Rob Crittenden a7a16272b1 When reading a password, if there is no tty, read from stdin instead.
This will allow one to pipe a password in:

echo -e "secret123\secret123\n" | ipa password someuser
2009-05-04 17:43:14 -04:00
Rob Crittenden d4076915cd Add posixGroup to the objectclass list if gidnumber is set
498335
2009-05-04 17:43:00 -04:00
Rob Crittenden 064240def3 Fix replica installation for self-signed CA (no dogtag) 2009-05-04 17:42:03 -04:00
Rob Crittenden c8ee910ff6 Issue an SSL server cert when joining the IPA domain 2009-05-04 17:41:06 -04:00
Rob Crittenden 2f7c6bc3db Add python-nss as a dependency 2009-05-04 17:01:57 -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 8424ea8c03 A class for dealing with a temporary NSS certificate database 2009-05-04 16:56:12 -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
Rob Crittenden 21ccdec860 Add missing required attribute, nisdomainname 2009-04-30 13:26:27 -04:00
Rob Crittenden 536b215078 Use correct attribute for e-mail address
Resolves 498269
2009-04-29 13:51:47 -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
Rob Crittenden bbbac4b24f Fix bind zone installer 2009-04-27 15:44:26 -04:00
Rob Crittenden d5290a60f9 Utilities for dealing with dogtag 2009-04-24 16:22:38 -04:00
Rob Crittenden 298d5fbce4 Import the RequiresRoot error and make note to replace this at some point 2009-04-24 16:22:22 -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
Rob Crittenden 9182c10b03 Issue DS and Apache server certs during CA installation.
Notes:
- will create a CA instance (pki-ca) if it doesn't exist
- maintains support for a self-signed CA
- A signing cert is still not created so Firefox autoconfig still won't work
2009-04-20 14:01:00 -04:00
Rob Crittenden fdf03cb07b Remove unwanted white space 2009-04-20 13:59:41 -04:00
Rob Crittenden 64fa3dd4c3 Finish work replacing the errors module with errors2
Once this is committed we can start the process of renaming errors2 as errors.
I thought that combinig this into one commit would be more difficult to
review.
2009-04-20 13:58:26 -04:00
Rob Crittenden a9387b48e6 Handle GSSAPI exceptions more gracefully 2009-04-20 13:44:08 -04:00
Rob Crittenden e6171404bf Make parentmap a autofill variable and add tests when parentmap is not passed 2009-04-13 15:22:49 -04:00
Rob Crittenden 8821d8cac3 Fill in default values for os and platform 2009-04-13 14:54:16 -04:00
Rob Crittenden 44afa977a8 The new admin tool 'ipa' uses a different configuration file, create it. 2009-04-13 14:53:08 -04:00
Rob Crittenden ab73041174 Renaming the backend ldap plugin to ldapapi.py to prevent module import issues 2009-04-06 13:52:32 -04:00
Rob Crittenden 484eff1016 Implement an installer for the Dogtag certificate system.
The CA is currently not automatically installed. You have to pass in the
--ca flag to install it.

What works:
- installation
- unistallation
- cert/ra plugins can issue and retrieve server certs

What doesn't work:
- self-signed CA is still created and issues Apache and DS certs
- dogtag and python-nss not in rpm requires
- requires that CS be in the "pre" install state from pkicreate
2009-04-03 14:06:09 -04:00
Rob Crittenden 0c63ed3f5e Fill in the ACIs and taskgroups for most of the plugins.
This adds:
group administration
host administration
host group administration
delegation administration
service administration
automount administration
netgroup administration
2009-04-01 10:33:43 -04:00
Rob Crittenden c00281a9f9 Name update files so they can be easily sorted.
We want to process some updates in a particular order (schema, structural).
Using an init-inspired ordering mechanism.
2009-03-25 11:03:07 -04:00
Rob Crittenden d6814f3aae Implement a few new targets for ACIs
Also switch to the StrEnum parameter type for some options so we let the
framework do the enforcement
2009-03-25 11:03:03 -04:00
Rob Crittenden fcfcc76524 Translate variables on all lines and sort files to be updated
Only the dn and the first line of any entry that was spread across
multiple lines were getting passed through the template engine.

If we are given a directory to process, sort the files in that directory
so the order can be predicted. Some updates rely on others.
2009-03-25 11:02:59 -04:00
Rob Crittenden 7d19cee7fc DNA is now configured using an update file 2009-03-25 11:02:55 -04:00
Rob Crittenden cf09aab18b Allow a search using only the exact search filter 2009-03-25 11:02:52 -04:00
Rob Crittenden 1b1f9af01c Add a 'showall' command so one can pick from a list of tasks to add to a role 2009-03-25 11:02:49 -04:00
Rob Crittenden 5aed824a6c Use tuples instead of lists for class variables 2009-03-25 11:02:47 -04:00
Rob Crittenden 233a4cb5fd Raise a more specific error when a user lacks the proper permissions.
The info part of the message will contain details on what permission
failed on what attribute.
2009-03-25 11:02:44 -04:00
Rob Crittenden 65e6259075 Always print the dn first when printing an entry 2009-03-25 11:02:42 -04:00
Rob Crittenden a8a2664190 Add new type List that converts delimited values into a tuple 2009-03-20 09:29:44 -04:00
Rob Crittenden c39a29e0cf Converted to use new baseclass, remove the one with the f_ prefix 2009-03-20 09:28:26 -04:00
Rob Crittenden ad4819ff66 Add tests for posix groups 2009-03-20 09:28:23 -04:00
Rob Crittenden b627f50121 Convert to use the new basegroup framework 2009-03-20 09:28:18 -04:00