I am using gokrb5 library to authenticate my client application using Kerberos.
The examples from this library use a keytab file.
But I could find info on how should this keytab file be created.
I referred few online resources and created a keytab file using ktpass adding a princ and mapped the logon user to it.
However when my application tries login using the keytab file I get decrypt error as below:
GOKRB5 Client: 2023/09/24 17:01:48 could not login client: [Root cause: Decrypting_Error] KRBMessage_Handling_Error: AS Exchange Error: AS_REP is not valid or client password/keytab incorrect < Decrypting_Error: error decrypting EncPart of AS_REP < Decrypting_Error: error decrypting AS_REP encrypted part: matching key not found in keytab. Looking for "testuser" realm: MYDOMAIN.LOCAL kvno: 3 etype: 18
Any one familiar with this library provide guidance on how this keytab file should be created? Thank you.