Commit Graph

68 Commits

Author SHA1 Message Date
Rob Crittenden
4348b5f8c4 Add NotImplementedError type so CA plugins can return client-friendly errors
Ignore NotImplementedError when revoking a certificate as this isn't
implemented in the selfsign plugin.

Also use the new type argument in x509.load_certificate(). Certificates
are coming out of LDAP as binary instead of base64-encoding.
2009-12-01 23:18:05 -07:00
John Dennis
0d880b3ee3 add new error class for certificate operations
add new error class for certificate operations
2009-11-19 14:52:17 -05:00
John Dennis
76fc1f75f9 error strings in documentation were missing unicode specifier
error strings in documentation were missing unicode specifier
2009-11-19 14:51:49 -05:00
Jason Gerard DeRose
b35849b47d Change Password param so (password, confirm_password) can be passed to _convert_scalar() 2009-10-18 00:35:05 -06:00
Jason Gerard DeRose
f58ff2921d Giant webui patch take 2 2009-10-13 11:28:00 -06:00
Rob Crittenden
eca7cdc94a Raise more specific error when an Objectclass Violation occurs Fix the virtual plugin to work with the new backend 2009-09-14 09:46:39 -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
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
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
cac8ebb866 Fix typo, occured -> occurred 2009-05-21 22:43:07 -04: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
Jason Gerard DeRose
3a4828b372 Fixed doctest for errors.NotFound 2009-05-19 13:53:45 -06:00
Jason Gerard DeRose
87480b7bde Re-enable doctest, fix broken docstrings 2009-05-13 14:22:09 -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
0d538b20f2 Make MalformedServicePrincipal take a reason arg and add Base64DecodeError 2009-05-06 11:29:11 -04:00
Pavel Zuna
7d0bd4b895 Rename errors2.py to errors.py. Modify all affected files. 2009-04-23 10:29:14 -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
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
5717c9d668 Applied Rob's errors patch 2009-02-03 15:29:04 -05:00
Jason Gerard DeRose
0d3ddef93b Started fleshing out reoganization of errors in errors.py (with gettext support) 2009-01-03 02:35:36 -07:00
Jason Gerard DeRose
4390523b7f Improved Plugin.call() method and added its unit test 2008-12-21 17:12:00 -07:00
Jason Gerard DeRose
6fdf5d1e7b Merge branch 'master' of git://git.engineering.redhat.com/users/rcritten/freeipa2 2008-12-20 15:00:00 -07:00
Jakub Hrozek
360f95341a Fix show_api command 2008-12-17 17:21:25 -07:00
Jakub Hrozek
f0bbe1b5a0 Add body for the NameSpaceError exception 2008-12-17 17:17:02 -07:00
Rob Crittenden
e41fcf19fe Raise an error on bad principals instead of printing one when changing passwords
Fix logic in determining what to do with an incoming principal
2008-12-11 10:31:27 -05:00
Rob Crittenden
fc8ac69372 Port plugins to use the new output_for_cli() argument list
Fix some errors uncovered by the nosetests
2008-12-10 14:15:19 -05:00
Jason Gerard DeRose
7e21ea5ad8 Fixed Warning messages about log dir in unit test 2008-12-08 16:56:24 -07:00
Jason Gerard DeRose
7350ccbffe Started fleshing out doodles in xmlrpc.execute() 2008-11-25 11:54:51 -07:00
Jason Gerard DeRose
2d458a1233 Stared some RPC-related error cleanup; started work on ipa_server.rcp.xmlrpc plugin 2008-11-24 21:34:01 -07:00
Jason Gerard DeRose
f5594dd489 Started work on cleaning up how exceptions are caught and sys.exit() is called in ipalib.cli.CLI 2008-11-13 23:29:35 -07:00
Rob Crittenden
34520981ee Don't allow service-add to create host/ principals 2008-10-24 14:17:20 -04:00
Jason Gerard DeRose
59a2cffff4 IPAError now more appropriately subclasses from StandardError instead of Exception 2008-10-23 21:21:51 -06:00
Rob Crittenden
b045f22069 Add mod_python-based XML-RPC server.
Use -e kerberos on the command-line to use the mod_python server, otherwise
it defaults to use the simple-server URL.
2008-10-16 23:33:44 -04:00
Rob Crittenden
6d2705b363 Implement user lock and unlock 2008-10-13 17:17:00 -04:00
Rob Crittenden
5c07d97865 Slight change to how exceptions are handled 2008-10-10 03:36:57 -04:00
Rob Crittenden
83bb41faeb Mechanism to convert from xmlrpclib.Fault to an IPAError exception
Include slew of new exceptions, not all of which are used yet
2008-10-10 03:36:56 -04:00
Jason Gerard DeRose
fec6fc2e8c Fixed example in raise_TypeError() docstring (thanks, mnagy) 2008-10-07 22:35:45 -06:00
Jason Gerard DeRose
100492d98a 285: Started work on Command.args_to_kw() method; added unit test for functionality so far in args_to_kw() 2008-09-10 20:05:45 +00:00
Jason Gerard DeRose
490eaee8a9 248: Removed depreciated SetError and TwiceSetError exceptions 2008-09-03 22:41:53 +00:00
Jason Gerard DeRose
296d59d27a 247: Added unit tests for errors.RequirementError 2008-09-03 22:29:01 +00:00
Jason Gerard DeRose
004e989dc4 246: Added unit tests for errors.RuleError 2008-09-03 22:14:25 +00:00
Jason Gerard DeRose
62533bfb2b 245: Removed depreciated NormalizationError 2008-09-03 21:55:44 +00:00
Jason Gerard DeRose
6f739bcf67 244: Added unit tests for errors.ConversionError 2008-09-03 21:53:15 +00:00
Jason Gerard DeRose
390c1aa4ba 243: Added unit tests for errors.ValidationError 2008-09-03 20:05:24 +00:00
Jason Gerard DeRose
5e8f945a1e 242: Started cleanup of custom exceptions; added unit tests for errors.IPAError 2008-09-03 19:38:39 +00:00
Jason Gerard DeRose
9b9615df79 241: Added additional index=None kwarg to errors.ValidationError.__init__() 2008-09-03 18:48:58 +00:00
Jason Gerard DeRose
085ea3f62f 239: Added errors.ConversionError; started big clean up of how ValidationError is raised so it works well with multivalues 2008-09-03 18:32:49 +00:00