Resolve FQDN from ip address and use that as host passed to SASLClient

Description

The documentation for setting up kerberos authentication for datastax enterprise demonstrates setting up principals for each C* node using FQDNs.

The service URI generated by the driver will effectively be dse@<rpc_address>, which may in fact work when used as the service principal depending on the kerberos server implementation, but it's possible it will not. For some reason the same kerberos server implementation i am using will handle IP addresses in service uris fine when using a FQDN principal on linux, but not on OS X.

The driver should by default resolve FQDN hostnames from ip address using some mechanism that ultimately uses getnameinfo (socket.getnameinfo() maybe?). Alternatively, there should be a mechanism to allow the user to override this behavior if they want to use IPs as is or some other strategy.

Environment

None

Pull Requests

None

Activity

Show:
Greg Bestland
June 3, 2016, 8:21 AM

PR with optional flag for fix and test case are located here.
https://github.com/datastax/python-driver-dse/pull/16

Adam Holmberg
June 8, 2016, 5:05 AM

Thanks for addressing that. I merged with formatting tweaks and a unit test.

Greg Bestland
June 9, 2016, 7:40 AM

Looks great, everything runs clean. Moving to done.

Jeremiah Jordan
June 15, 2016, 1:51 AM

What version is this fixed in?

Adam Holmberg
June 15, 2016, 3:05 AM
Edited

On master now. t will be included in the 1.0 GA.

Fixed

Assignee

Unassigned

Reporter

Andy Tolbert

Fix versions

None

Labels

Reproduced in

None

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Components

Priority

Major