Custom kinit python

Yago Fernández Pinilla yagofp8 at
Thu Sep 4 02:56:09 EDT 2014


The idea is that we wanted to integrate everything in our tool and not
depending on an external binary.

I was able to do the same thing that kinit and kdestroy using the krb5 API

The problem that i have know and what i have been working is:

I would like to "export" the ticket in same way to send it to the user and
the be able to import it again.

This functionality seems to be present using the gssapi module but i don't
know how to obtain the object "creds".

Thanks in advance


On Wed, Sep 3, 2014 at 11:59 PM, Benjamin Kaduk <kaduk at> wrote:

> On Tue, 26 Aug 2014, Yago Fernández Pinilla wrote:
> > Hello,
> >
> > I would like to know if it is possible to implement a custom kinit in
> > Python, I know there are already implementations in C and Java but I
> would
> > like to have it in Python.
> >
> > I have seen different libraries in Python that have different methods but
> > they don't have this functionality.
> >
> >
> > If there is none, where should I start to work?
> I think what you should do depends on what your goal is.  'kinit' is just
> a tool to obtain a kerberos ticket and put it in a credentials cache,
> which may be on disk or in kernel memory or the memory of a helper
> service.  It's not clear to me what benefit is gained from having this
> tool be written in python, unless it is to be some sort of learning
> exercise, so I feel that I am misunderstanding the question.
> -Ben Kaduk

Yago Fernández Pinilla
e-mail: yagofp8 at

More information about the krbdev mailing list