RFC: pykerberos exception handling (Ticket #51)
Hi, attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I'm posting this here for comments: Things I'm unsure about are: * how should the exception format look like? Currently I've chosen: (errmsg_maj, errcode_maj)(errmsg_min, errcode_min) so code like: try: rc = kerberos.authGSSClientStep(vc, ""); except kerberos.KrbError, a: print a gives: (('Miscellaneous failure', 851968), ('No credentials cache found', -1765328189)) or in the case the exception is unhandled: KrbError: (('Miscellaneous failure', 851968), ('Permission denied', 13)) Should we better choose different exception classes for every type of problem (modeled after the error conditions listed in gssapi.h) - looks like overkill to me - we can add functions to analyze the error code in more detail at any later stage since we pass both major and minor code up to the application. * What exception classes do we want. What about: KrbError as base class KrbBasicAuthError(KrbError): exceptions in the basic auch module KrbGssAuthError(krbError): excpetions in the GSS module I'd be happy about any comments on this. Cheers, -- Guido
On Wed, Sep 27, 2006 at 03:57:06PM +0200, Guido Guenther wrote:
attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I've put an updated patch (that also handles Basic Auth as described) here: http://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling.diff In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. Cheers, -- Guido
Hi, On Wed, Sep 27, 2006 at 07:13:09PM +0200, Guido Guenther wrote:
On Wed, Sep 27, 2006 at 03:57:06PM +0200, Guido Guenther wrote:
attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I've put an updated patch (that also handles Basic Auth as described) here: http://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling.diff In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. any comments on this one? I'd be very happy to see this fixed as soon as possible since this changes the API. Cheers, -- Guido
On Wed, Sep 27, 2006 at 07:13:09PM +0200, Guido Guenther wrote:
On Wed, Sep 27, 2006 at 03:57:06PM +0200, Guido Guenther wrote:
attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I've put an updated patch (that also handles Basic Auth as described) here: http://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling.diff In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. Ping? -- Guido
Hi Guido, --On October 5, 2006 6:26:35 PM +0200 Guido Guenther <agx@sigxcpu.org> wrote:
On Wed, Sep 27, 2006 at 03:57:06PM +0200, Guido Guenther wrote:
attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I've put an updated patch (that also handles Basic Auth as described) here: http://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling. diff In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. Ping?
I am working on some Kerberos/authentication stuff right now and will review/integrate your changes shortly. -- Cyrus Daboo
On Thu, Oct 05, 2006 at 06:26:35PM +0200, Guido Guenther wrote:
On Wed, Sep 27, 2006 at 07:13:09PM +0200, Guido Guenther wrote:
On Wed, Sep 27, 2006 at 03:57:06PM +0200, Guido Guenther wrote:
attached is a patch that implements basic exception handling in pykerberos GSS path. This way we can get more information about the what actually failed (current pykerberos only knows success or AUTH_FAILED). I've put an updated patch (that also handles Basic Auth as described) here: http://honk.sigxcpu.org/unsorted-patches/pykerberos-exception-handling.diff In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. Ping? Ping Ping? -- Guido
Hi Guido, --On October 12, 2006 9:19:26 AM +0200 Guido Guenther <agx@sigxcpu.org> wrote:
In case this can be applied I'd convert calendarserver/twistedcaldav/authekrb.py over to handle the exceptions. Ping? Ping Ping?
Should be done soon. -- Cyrus Daboo
participants (2)
-
Cyrus Daboo
-
Guido Guenther