I am generating a Kerberos token using Python
def generate_kerberos_token(self):
kinit = '/usr/bin/kinit'
kinit_args = [ kinit, '%s@%s' % (self.username, self.realm) ]
kinit = Popen(kinit_args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
kinit.stdin.write('{}\n'.format(self.password).encode("utf-8"))
kinit.stdin.flush()
kinit.wait()
My app has stopped working after 5 days. I checked the knit.config file. It mentioned:
renew_lifetime = 5d
I want to regenerate the token after five. as my data is not get updated due to authentication is not happening after 5 days.
How to re-new token in-order to authentication process?