Resolve the canonical hostname when constructing the Kerberos server principal
Kerberos authentication will fail if the server principal uses a CNAME. Resolving the hostname in the server URL to the canonical hostname associated with the IP address allows authentication to succeed.
This commit is contained in:
parent
ae71801f29
commit
42647193fb
1 changed files with 1 additions and 1 deletions
|
|
@ -1724,7 +1724,7 @@ class ClientSession(object):
|
|||
def _serverPrincipal(self, cprinc):
|
||||
"""Get the Kerberos principal of the server we're connecting
|
||||
to, based on baseurl."""
|
||||
servername = self._host
|
||||
servername = socket.getfqdn(self._host)
|
||||
#portspec = servername.find(':')
|
||||
#if portspec != -1:
|
||||
# servername = servername[:portspec]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue