I'm looking for an example to decrypt Kerberos ticket and get the username using keytab
file.
I came across the library kerb5, and the function krb5_server_decrypt_ticket_keytab()
looks perfect for the job.
I saw a few examples (example 1, example 2) but they require parameters that I do not understand: ccache
, type
, etc.
I have 2 parameters: ticket
(base64 encode) and keytab
file, but even with the help of these examples I am not sure how to verify the ticket and get the username.
What is ccache
is used for?
I would love an explanation of the various parameters and how the examples can be run.