Base64 Encoded Keytab


Question 

I have my keystore but Lenses Azure HDInsight Enterprise Security needs a base64 encoded keystore.

Answer 

For this example, let us assume your keytab is called krb5.keytab and is located under /etc/krb5.keytab

Before you generate a base64 encoded string from keytab, first make a backup of the keytab

cp /etc/krb5.keytab /etc/krb5.keytab.backup

Then to generate the encoded string, issue

base64 < krb5.keytab | tr -d '\n'

Example creating a base64 encoded string from the keytab 

base64 <  /etc/krb5.keytab | tr -d '\n'
BQIAAABIAAEAFUxPQ0FMSE9TVC5MT0NBTERPTUFJTgAMbGVuc2VzLWFkbWluAAAAAV+2o+sBABcAEOtP85t0sMvOIKT2Lb0eNYUAAAAB

The encode string above starting from BQ until the end is your base64 encoded keytab

--
Last modified: April 17, 2024