Port of kerberos auth changes from https://github.com/takamatsutomoaki/webhdfs-with-krb5